Skip test-sysroot.js on s390x
authorSimon McVittie <smcv@debian.org>
Tue, 6 Dec 2022 11:08:51 +0000 (11:08 +0000)
committerSimon McVittie <smcv@debian.org>
Tue, 6 Dec 2022 11:08:51 +0000 (11:08 +0000)
Mitigates: #1025532

debian/patches/debian/test-sysroot-Skip-on-s390x-by-default.patch [new file with mode: 0644]
debian/patches/series
debian/tests/control
debian/tests/flaky [deleted file]
debian/tests/flaky-concurrency [new file with mode: 0755]
debian/tests/flaky-sysroot [new file with mode: 0644]
debian/tests/gnome-desktop-testing

diff --git a/debian/patches/debian/test-sysroot-Skip-on-s390x-by-default.patch b/debian/patches/debian/test-sysroot-Skip-on-s390x-by-default.patch
new file mode 100644 (file)
index 0000000..6dcef39
--- /dev/null
@@ -0,0 +1,30 @@
+From: Simon McVittie <smcv@debian.org>
+Date: Tue, 6 Dec 2022 10:59:33 +0000
+Subject: test-sysroot: Skip on s390x by default
+
+This test regularly fails on the buildds, but I cannot reproduce the
+failure on a porterbox.
+
+Bug: https://github.com/ostreedev/ostree/issues/2527
+Bug-Debian: https://bugs.debian.org/1025532
+Forwarded: not-needed
+---
+ tests/test-sysroot.js | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/tests/test-sysroot.js b/tests/test-sysroot.js
+index d4f67ef..0855b3d 100755
+--- a/tests/test-sysroot.js
++++ b/tests/test-sysroot.js
+@@ -38,6 +38,11 @@ function libtestExec(shellCode) {
+     proc.wait_check(null);
+ }
++if (GLib.getenv('DEB_HOST_ARCH') === 's390x' && !GLib.getenv('DEB_ALLOW_FLAKY_TESTS')) {
++    print('1..0 # SKIP https://bugs.debian.org/1025532');
++    imports.system.exit(0);
++}
++
+ print('1..1')
+ libtestExec('setup_os_repository archive syslinux');
index 82f25e2ba330e3084266724cd65d0d7fa279c036..895738c48b77a942898a2318a16276225c256fb9 100644 (file)
@@ -1,2 +1,3 @@
-debian/Skip-test-pull-repeated-during-CI.patch
 configure-use-pkg-config-with-newer-gpgme-and-gpg-error.patch
+debian/Skip-test-pull-repeated-during-CI.patch
+debian/test-sysroot-Skip-on-s390x-by-default.patch
index 28691e703163a2d5db4bef9c31e90a53c025777f..f619ebc9ee1b0b197a1b52c5094cc344e5436e41 100644 (file)
@@ -1,4 +1,9 @@
-Tests: flaky
+Tests: flaky-concurrency
+Restrictions: flaky
+Depends: gnome-desktop-testing, ostree-tests
+
+Tests: flaky-sysroot
+Architecture: s390x
 Restrictions: flaky
 Depends: gnome-desktop-testing, ostree-tests
 
diff --git a/debian/tests/flaky b/debian/tests/flaky
deleted file mode 100644 (file)
index 09e64cc..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/sh
-
-set -e
-exec 2>&1
-
-# Ubuntu provides internet access via a proxy, but libostree doesn't need
-# that. However, libostree also doesn't support no_proxy, so it will try
-# to use Ubuntu's proxy for localhost, and fail to reach itself.
-unset ftp_proxy
-unset http_proxy
-unset https_proxy
-unset no_proxy
-
-exec gnome-desktop-testing-runner libostree/test-concurrency.py.test
diff --git a/debian/tests/flaky-concurrency b/debian/tests/flaky-concurrency
new file mode 100755 (executable)
index 0000000..09e64cc
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+set -e
+exec 2>&1
+
+# Ubuntu provides internet access via a proxy, but libostree doesn't need
+# that. However, libostree also doesn't support no_proxy, so it will try
+# to use Ubuntu's proxy for localhost, and fail to reach itself.
+unset ftp_proxy
+unset http_proxy
+unset https_proxy
+unset no_proxy
+
+exec gnome-desktop-testing-runner libostree/test-concurrency.py.test
diff --git a/debian/tests/flaky-sysroot b/debian/tests/flaky-sysroot
new file mode 100644 (file)
index 0000000..8865f9e
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+set -e
+exec 2>&1
+
+unset ftp_proxy
+unset http_proxy
+unset https_proxy
+unset no_proxy
+export DEB_ALLOW_FLAKY_TESTS=1
+
+exec gnome-desktop-testing-runner libostree/test-sysroot.js.test
index e4346cac9af5572c316304657673b0c131a246fe..b041ae0d7275da317e5335a33cb6e5c95614bb5f 100755 (executable)
@@ -11,7 +11,9 @@ unset http_proxy
 unset https_proxy
 unset no_proxy
 
-tests="$(gnome-desktop-testing-runner -l libostree | while read -r t; do
+namespace=libostree/
+
+tests="$(gnome-desktop-testing-runner -l "$namespace" | while read -r t; do
        t="${t%% *}"
 
        case "$t" in
@@ -20,11 +22,24 @@ tests="$(gnome-desktop-testing-runner -l libostree | while read -r t; do
                        # https://github.com/ostreedev/ostree/issues/1620
                        continue
                        ;;
+
+               (libostree/test-sysroot.js.test)
+                       # https://bugs.debian.org/1025532
+                       # https://github.com/ostreedev/ostree/issues/2527
+                       if [ "${DEB_HOST_ARCH-}" = s390x ] || [ "$(uname -m)" = s390x ]; then
+                               continue
+                       fi
+                       ;;
        esac
 
        echo "$t"
 done)"
 
+if [ -z "$tests" ]; then
+       echo "Error: no installed-tests found matching $namespace" >&2
+       exit 1
+fi
+
 # Deliberately word-splitting
 # shellcheck disable=SC2046
 exec gnome-desktop-testing-runner $tests