# Auxiliary script for tests on TAP support: checking testsuite summary.
-am_parallel_tests=yes
-. ./defs || Exit 1
+. ./defs || exit 1
br='============================================================================'
cat > configure.ac <<END
AC_INIT([GNU AutoTAP], [5.12], [bug-automake@gnu.org])
-AM_INIT_AUTOMAKE([parallel-tests])
+AM_INIT_AUTOMAKE
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
END
cat all.test
st=0
if test $use_colors = yes; then
- make_cmd="env TERM=ansi AM_COLOR_TESTS=always $MAKE -e"
+ # Forced colorization should take place also with non-ANSI terminals;
+ # hence the "TERM=dumb" definition.
+ make_cmd="env TERM=dumb AM_COLOR_TESTS=always $MAKE -e"
else
make_cmd=$MAKE
fi
$make_cmd check > stdout || st=$?
cat stdout
if test $expect_failure = yes; then
- test $st -gt 0 || Exit 1
+ test $st -gt 0 || exit 1
else
- test $st -eq 0 || Exit 1
+ test $st -eq 0 || exit 1
fi
$PERL "$am_testauxdir"/extract-testsuite-summary.pl stdout >summary.got \
|| fatal_ "cannot extract testsuite summary"
else
compare=diff
fi
- $compare summary.exp summary.got || Exit 1
+ $compare summary.exp summary.got || exit 1
}
if test $use_colors = yes; then
- red='\e[0;31m'
- grn='\e[0;32m'
- lgn='\e[1;32m'
- blu='\e[1;34m'
- mgn='\e[0;35m'
- brg='\e[1m'
- std='\e[m'
- echo AUTOMAKE_OPTIONS = color-tests >> Makefile.am
+ red="$esc[0;31m"
+ grn="$esc[0;32m"
+ lgn="$esc[1;32m"
+ blu="$esc[1;34m"
+ mgn="$esc[0;35m"
+ brg="$esc[1m"
+ std="$esc[m"
else
red= grn= lgn= blu= mgn= brg= std=
fi
# Lots of non-failures (300 per kind).
(cat tap && cat tap && cat tap) > all.test
-test `wc -l <all.test` -eq 900 || Exit 99 # Sanity check.
+test $(wc -l <all.test) -eq 900 || exit 99 # Sanity check.
echo 1..900 >> all.test # Test plan.
do_check --pass <<END
$success_header
# 1 failure and lots of non-failures means failure.
(cat tap && echo "not ok" && cat tap) > all.test
-test `wc -l <all.test` -eq 601 || Exit 99 # Sanity check.
+test $(wc -l <all.test) -eq 601 || exit 99 # Sanity check.
echo 1..601 >> all.test # Test plan.
do_check --fail <<END
$failure_header
# 1 error and lots of non-failures means failure.
(cat tap && sed 30q tap && echo 'Bail out!') > all.test
-test `wc -l <all.test` -eq 331 || Exit 99 # Sanity check.
+test $(wc -l <all.test) -eq 331 || exit 99 # Sanity check.
echo 1..331 >> all.test # Test plan.
do_check --fail <<END
$failure_header