Andreas Tille pushed to branch master at Debian Med / gwyddion
Commits:
2e220995 by Andreas Tille at 2026-05-07T16:09:52+02:00
Different handling of flaky tests
- - - - -
3 changed files:
- + debian/patches/flaky.patch
- debian/patches/series
- debian/rules
Changes:
=====================================
debian/patches/flaky.patch
=====================================
@@ -0,0 +1,38 @@
+--- a/tests/runtest.sh.in
++++ b/tests/runtest.sh.in
+@@ -2,3 +2,35 @@
+ test_name=$(echo "$1" | sed -e 's,.*/,,' -e 's,--,/,g' -e 's,\..*$,,')
+ shift
+ ./testlibgwy@EXEEXT@ -p /testlibgwy/$test_name "$@"
++
++#!/bin/bash
++test_name=$(echo "$1" | sed -e 's,.*/,,' -e 's,--,/,g' -e 's,\..*$,,')
++shift
++
++# Tests known to be flaky in some build environments — retry before failing
++FLAKY_TESTS="\
++ field/filter/derivative/laplace/planar/as-derivative/other \
++ field/fit-poly/masked \
++ field/laplace-solve/numbered \
++ field/tip/blind-estimate \
++ math/refine-maximum/1d \
++ serialization/extra-item \
++ serialization/less-trivial/32bit \
++ serialization/less-trivial/64bit \
++ serialization/less-trivial/native \
++"
++
++run_test() {
++ ./testlibgwy@EXEEXT@ -p /testlibgwy/"$test_name" "$@"
++}
++
++set -x
++if echo " $FLAKY_TESTS " | grep -qF " $test_name "; then
++ for attempt in 1 2 3; do
++ run_test && exit 0
++ echo "Flaky test $test_name failed (attempt $attempt/3), retrying..."
>&2
++ done
++ exit 1
++else
++ run_test
++fi
=====================================
debian/patches/series
=====================================
@@ -1,2 +1,3 @@
launcher.patch
skip_test.patch
+flaky.patch
=====================================
debian/rules
=====================================
@@ -15,26 +15,6 @@ execute_after_dh_install:
override_dh_auto_test-arch:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
-ifneq (,$(filter $(DEB_HOST_ARCH),arm64))
- sed -i '/field.*fit-poly.*masked/d' tests/test-list.txt
-endif
-ifneq (,$(filter $(DEB_HOST_ARCH),loong64))
- sed -i '/math.*refine-maximum.*1d/d' tests/test-list.txt
-endif
-ifneq (,$(filter $(DEB_HOST_ARCH),ppc64el))
- sed -i -e '/field.*tip.*blind-estimate/d' \
- -e '/field.*laplace-solve.*numbered/d' \
- -e
'/field.*filter.*derivative.*laplace.*planar.*as-derivative.*other/d'
tests/test-list.txt
-endif
-ifneq (,$(filter $(DEB_HOST_ARCH),ppc64))
- sed -i -e '/serialization.*less-trivial.*native/d' \
- -e '/serialization.*less-trivial.*64bit/d' \
- -e '/serialization.*less-trivial.*32bit/d' \
- -e '/serialization.*extra-item/d' tests/test-list.txt
-endif
-ifneq (,$(filter $(DEB_HOST_ARCH),hurd-amd64))
- sed -i '/field.*stats.*variation.*nonsquare/d' tests/test-list.txt
-endif
dh_auto_test
endif
View it on GitLab:
https://salsa.debian.org/med-team/gwyddion/-/commit/2e22099514f27937fe3ec4cff2565e440a78f70a
--
View it on GitLab:
https://salsa.debian.org/med-team/gwyddion/-/commit/2e22099514f27937fe3ec4cff2565e440a78f70a
You're receiving this email because of your account on salsa.debian.org. Manage
all notifications: https://salsa.debian.org/-/profile/notifications | Help:
https://salsa.debian.org/help
_______________________________________________
debian-med-commit mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-med-commit