From: Simon McVittie Date: Sat, 14 May 2022 14:48:08 +0000 (+0100) Subject: d/rules, d/run-tests.sh: Move loop through backends into run-tests.sh X-Git-Tag: archive/raspbian/4.6.5+ds-1+rpi1~1^2~12 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=90f5035c7afdb7a800442710ec85b81ea951d60c;p=gtk4.git d/rules, d/run-tests.sh: Move loop through backends into run-tests.sh This means that if an X11 test fails, we try the Wayland tests (if we are running them at all) before failing the build. --- diff --git a/debian/rules b/debian/rules index 372face80e..8c72b13555 100755 --- a/debian/rules +++ b/debian/rules @@ -256,18 +256,18 @@ ifeq (big,$(DEB_HOST_ARCH_ENDIAN)) endif override_dh_auto_test: - set -e; for backend in $(test_backends); do \ - env BUILDDIR=debian/build/deb \ - FUZZY_GSK_COMPARE="$(fuzzy_gsk_compare)" \ - FUZZY_REFTESTS="$(fuzzy_reftests)" \ - IGNORE_GSK_COMPARE="$(ignore_gsk_compare)" \ - IGNORE_REFTESTS="$(ignore_reftests)" \ - XFAIL_GSK_COMPARE="$(xfail_gsk_compare)" \ - XFAIL_REFTESTS="$(xfail_reftests)" \ - BACKEND=$$backend \ - debian/run-tests.sh -t $(test_timeout_multiplier) \ - $(addprefix --no-suite=,$(skipped_suites)); \ - done + env \ + BUILDDIR=debian/build/deb \ + FUZZY_GSK_COMPARE="$(fuzzy_gsk_compare)" \ + FUZZY_REFTESTS="$(fuzzy_reftests)" \ + IGNORE_GSK_COMPARE="$(ignore_gsk_compare)" \ + IGNORE_REFTESTS="$(ignore_reftests)" \ + XFAIL_GSK_COMPARE="$(xfail_gsk_compare)" \ + XFAIL_REFTESTS="$(xfail_reftests)" \ + BACKENDS="$(test_backends)" \ + debian/run-tests.sh -t $(test_timeout_multiplier) \ + $(addprefix --no-suite=,$(skipped_suites)) \ + $(NULL) override_dh_auto_install: dh_auto_install --builddirectory=debian/build/deb --destdir=debian/install/deb diff --git a/debian/run-tests.sh b/debian/run-tests.sh index 3337f285f2..5a6b42ceea 100755 --- a/debian/run-tests.sh +++ b/debian/run-tests.sh @@ -3,7 +3,7 @@ set -ex BUILDDIR=${BUILDDIR:-debian/build/deb} -BACKEND=${BACKEND:-x11} +BACKENDS=${BACKENDS:-x11} FUZZY_GSK_COMPARE=${FUZZY_GSK_COMPARE:-} IGNORE_GSK_COMPARE=${IGNORE_GSK_COMPARE:-} @@ -62,41 +62,43 @@ mkdir -p "$test_data/glib-2.0/schemas/" cp gtk/org.gtk.* "$test_data/glib-2.0/schemas/" glib-compile-schemas "$test_data/glib-2.0/schemas/" -# Remove LD_PRELOAD so we don't run with fakeroot, which makes dbus-related tests fail -env \ - -u LD_PRELOAD \ - GIO_MODULE_DIR=/nonexistent \ - GIO_USE_VFS=local \ - GIO_USE_VOLUME_MONITOR=unix \ - dbus-run-session -- \ - debian/tests/run-with-display "$BACKEND" \ - debian/tests/run-with-locales \ - --generate de_DE.UTF-8 \ - --generate en_GB.UTF-8 \ - --generate en_US.UTF-8 \ - --generate sv_SE=ISO-8859-1 \ - -- \ - meson test -C "$BUILDDIR" \ - --print-errorlogs \ - --setup="$BACKEND" \ - "$@" \ - || touch "$test_data/tests-failed" - -# Don't base64-encode the image results for tests that upstream -# expect to fail -for reftest in $XFAIL_REFTESTS; do - rm -f "$BUILDDIR/testsuite/reftests/output/$BACKEND/$reftest.diff.png" -done +for BACKEND in $BACKENDS; do + # Remove LD_PRELOAD so we don't run with fakeroot, which makes dbus-related tests fail + env \ + -u LD_PRELOAD \ + GIO_MODULE_DIR=/nonexistent \ + GIO_USE_VFS=local \ + GIO_USE_VOLUME_MONITOR=unix \ + dbus-run-session -- \ + debian/tests/run-with-display "$BACKEND" \ + debian/tests/run-with-locales \ + --generate de_DE.UTF-8 \ + --generate en_GB.UTF-8 \ + --generate en_US.UTF-8 \ + --generate sv_SE=ISO-8859-1 \ + -- \ + meson test -C "$BUILDDIR" \ + --print-errorlogs \ + --setup="$BACKEND" \ + "$@" \ + || touch "$test_data/tests-failed" + + # Don't base64-encode the image results for tests that upstream + # expect to fail + for reftest in $XFAIL_REFTESTS; do + rm -f "$BUILDDIR/testsuite/reftests/output/$BACKEND/$reftest.diff.png" + done -for renderer in cairo gl; do - for reftest in $XFAIL_GSK_COMPARE; do - rm -f "$BUILDDIR/testsuite/gsk/compare/$renderer/$BACKEND/$reftest.diff.png" + for renderer in cairo gl; do + for reftest in $XFAIL_GSK_COMPARE; do + rm -f "$BUILDDIR/testsuite/gsk/compare/$renderer/$BACKEND/$reftest.diff.png" + done done -done -if [ -e "$test_data/tests-failed" ]; then - head -v -n-0 "$BUILDDIR/meson-logs/testlog-$BACKEND.txt" -fi + if [ -e "$test_data/tests-failed" ]; then + head -v -n-0 "$BUILDDIR/meson-logs/testlog-$BACKEND.txt" + fi +done # Put the rest in the log as base64 since we don't have an # equivalent of AUTOPKGTEST_ARTIFACTS for buildds