From: Jim Meyering Date: Sun, 15 Nov 2020 17:00:37 +0000 (-0800) Subject: tests: protect against parallel false failure X-Git-Tag: v1.16.3~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=26ef6e7f3cfc603fe8e303d3cfa202a1334415c4;p=thirdparty%2Fautomake.git tests: protect against parallel false failure * t/parallel-tests-console-output.sh: Do not depend on the order of items in test summary. With a parallel test run, they may appear in a different order, e.g., when running tests like this: make check AM_TESTSUITE_MAKE='make -j14' Sort the expected output and the actual output before comparing. --- diff --git a/t/parallel-tests-console-output.sh b/t/parallel-tests-console-output.sh index 66bf89d59..df660a1a5 100644 --- a/t/parallel-tests-console-output.sh +++ b/t/parallel-tests-console-output.sh @@ -34,13 +34,13 @@ a/b/skip.log: sub/error2.log END cat > exp <<'END' -FAIL: fail.test -PASS: pass.test ERROR: error.test -XPASS: sub/xpass.test -XFAIL: xfail.test ERROR: sub/error2.test +FAIL: fail.test +PASS: pass.test SKIP: a/b/skip.test +XFAIL: xfail.test +XPASS: sub/xpass.test END mkdir sub a a/b @@ -93,7 +93,7 @@ for vpath in : false; do fi $srcdir/configure run_make -O -e FAIL check - LC_ALL=C grep '^[A-Z][A-Z]*:' stdout > got + LC_ALL=C grep '^[A-Z][A-Z]*:' stdout | sort > got cat got diff $srcdir/exp got cd $srcdir