]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
tests: protect against parallel false failure
authorJim Meyering <meyering@fb.com>
Sun, 15 Nov 2020 17:00:37 +0000 (09:00 -0800)
committerJim Meyering <meyering@fb.com>
Sun, 15 Nov 2020 17:00:37 +0000 (09:00 -0800)
* 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.

t/parallel-tests-console-output.sh

index 66bf89d59667307f69476c35078a971298a04d42..df660a1a5476e70a03c7063a8aad610d7779dd97 100644 (file)
@@ -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