tests: expose automake bug#14560
[platform/upstream/automake.git] / t / tap-plan-corner.sh
old mode 100755 (executable)
new mode 100644 (file)
index 3b9cd1f..7b64d3e
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2013 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # TAP support:
 #  - some corner cases for TAP plan
 
-am_parallel_tests=yes
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 # -------------------------------------------------------------------------
 
@@ -37,9 +36,7 @@ ok 1
 END
 
 for pos in leading trailing; do
-  TESTS="$pos-repeated.test" $MAKE -e check >stdout \
-    && { cat stdout; Exit 1; }
-  cat stdout
+  run_make -O -e FAIL TESTS="$pos-repeated.test" check
   count_test_results total=2 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=1
   grep "^ERROR: $pos-repeated\\.test - multiple test plans$" stdout
 done
@@ -60,14 +57,13 @@ ok 2
 1..2
 END
 
-env TESTS="leading-repeated.test trailing-repeated.test" \
-  $MAKE -e check >stdout && { cat stdout; Exit 1; }
-cat stdout
+run_make -O -e FAIL check \
+  TESTS='leading-repeated.test trailing-repeated.test'
 count_test_results total=6 pass=3 fail=0 xpass=0 xfail=0 skip=0 error=3
 grep "^ERROR: leading-repeated\\.test - multiple test plans$" stdout
 grep "^ERROR: trailing-repeated\\.test - multiple test plans$" stdout
 grep "^ERROR: trailing-repeated\\.test 2 # AFTER LATE PLAN$" stdout
-grep "leading .*AFTER LATE PLAN" stdout && Exit 1
+grep "leading .*AFTER LATE PLAN" stdout && exit 1
 
 # -------------------------------------------------------------------------
 
@@ -91,9 +87,7 @@ cat > 4.test <<END
 1..0 # SKIP
 END
 
-env TESTS="1.test 2.test 3.test 4.test" \
-  $MAKE -e check >stdout && { cat stdout; Exit 1; }
-cat stdout
+run_make -O -e FAIL check TESTS='1.test 2.test 3.test 4.test'
 count_test_results total=8 pass=0 fail=0 xpass=0 xfail=0 skip=4 error=4
 for i in 1 2 3 4; do
   grep "^ERROR: $i\\.test - multiple test plans$" stdout
@@ -113,8 +107,7 @@ ok 4
 ok 5
 END
 
-$MAKE -e check >stdout && { cat stdout; Exit 1; }
-cat stdout
+run_make -O -e FAIL check
 count_test_results total=8 pass=5 fail=0 xpass=0 xfail=0 skip=0 error=3
 
 cat > exp <<'END'
@@ -144,8 +137,7 @@ ok 2
 ok 3
 END
 
-$MAKE -e check >stdout && { cat stdout; Exit 1; }
-cat stdout
+run_make -O -e FAIL check
 count_test_results total=5 pass=2 fail=0 xpass=0 xfail=0 skip=0 error=3
 
 cat > exp <<'END'
@@ -175,8 +167,7 @@ ok 4
 ok 5
 END
 
-$MAKE -e check >stdout && { cat stdout; Exit 1; }
-cat stdout
+run_make -O -e FAIL check
 count_test_results total=7 pass=3 fail=0 xpass=0 xfail=0 skip=0 error=4
 
 cat > exp <<'END'