--- ChangeLog | 27 +++++ automake.in | 34 ++++++- doc/automake.texi | 55 +++++++++++ lib/Automake/tests/Makefile.in | 4 +- lib/am/check2.am | 4 +- tests/Makefile.in | 4 +- tests/test-driver-custom-no-pt-driver.test | 63 ++++++++++++ tests/test-driver-custom-xfail-tests.test | 146 ++++++++++++++++++++++++++++ tests/test-driver-custom.test | 140 ++++++++++++++++++++++++++ 9 files changed, 465 insertions(+), 12 deletions(-) create mode 100755 tests/test-driver-custom-no-pt-driver.test create mode 100755 tests/test-driver-custom-xfail-tests.test create mode 100755 tests/test-driver-custom.test
diff --git a/ChangeLog b/ChangeLog index 2596930..f168133 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,32 @@ 2011-05-20 Stefano Lattarini <stefano.lattar...@gmail.com> + parallel-tests: allow custom wrapper scripts + Allow suffix-based definition of custom "driver script" for the + test scripts. These wrapper scripts will be responsible of + launching the tests (or their corresponding $(LOG_COMPILER), if + they have an associated one), interpreting the test results, and + writing the `.log' files. + This new API should allow easy and flexible use of different test + protocols in the future; in particular, we plan to use it will be + used to implement TAP and SubUnit harnesses. + * automake.in (handle_tests): Define default for $(LOG_DRIVER), + and, for any registered text extension `<ext>', define defaults + for $(<ext>_LOG_DRIVER). Substitute %DRIVER% using these new + variables, instead of the old internal $(am__pt_wrap). When + processing check2.am, also substitute %DRIVER_FLAGS%. + Require auxiliary script `pt-driver' only if no wrapper has been + explicitly defined for the test script kinds. + * am/check2.am (?GENERIC?%EXT%$(EXEEXT).log, ?GENERIC?%EXT%.log, + ?!GENERIC?%OBJ%): Pass the %DRIVER_FLAGS% to the %DRIVER% call. + * doc/automake.texi (Custom Test Drivers): New. + * tests/parallel-tests-no-pt-driver.test: New test. + * tests/test-driver-custom.test: Likewise. + * tests/test-driver-custom-xfail-tests.test: Likewise. + * tests/Makefile.am (TESTS): !!!TODO!!! + !!! TODO !!! ADD MORE TEST CASES. + +2011-05-20 Stefano Lattarini <stefano.lattar...@gmail.com> + parallel-tests: add auxiliary script 'pt-driver', refactor This refactoring should cause no API of functionality change, and is meant only to simplify the future implementation of TAP diff --git a/automake.in b/automake.in index 04c46b8..9a034d5 100644 --- a/automake.in +++ b/automake.in @@ -4991,10 +4991,6 @@ sub handle_tests if (my $parallel_tests = option 'parallel-tests') { - require_conf_file ($parallel_tests->{position}, FOREIGN, 'pt-driver'); - define_variable ('am__pt_driver', - "\$(SHELL) $am_config_aux_dir/pt-driver", - INTERNAL); define_variable ('TEST_SUITE_LOG', 'test-suite.log', INTERNAL); define_variable ('TEST_SUITE_HTML', '$(TEST_SUITE_LOG:.log=.html)', INTERNAL); my $suff = '.test'; @@ -5038,6 +5034,19 @@ sub handle_tests if substr ($obj, - length ($test_suffix)) eq $test_suffix; } $obj .= '.log'; + # The "test driver" program, deputed to handle tests protocol used by + # test scripts. By default, it's assumed that no protocol is used, + # so we fall back to the old "parallel-tests" behaviour, implemented + # by the `pt-driver' auxiliary script. + if (! var 'LOG_DRIVER') + { + require_conf_file ($parallel_tests->{position}, FOREIGN, 'pt-driver'); + define_variable ('LOG_DRIVER', + "\$(SHELL) $am_config_aux_dir/pt-driver", + INTERNAL); + } + my $driver = '$(LOG_DRIVER)'; + my $driver_flags = '$(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS)'; my $compile = 'LOG_COMPILE'; define_variable ($compile, '$(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)', INTERNAL); @@ -5045,7 +5054,8 @@ sub handle_tests GENERIC => 0, OBJ => $obj, SOURCE => $val, - DRIVER => '$(am__pt_driver)', + DRIVER => $driver, + DRIVER_FLAGS => $driver_flags, COMPILE =>'$(' . $compile . ')', EXT => '', am__EXEEXT => 'FALSE'); @@ -5076,6 +5086,17 @@ sub handle_tests { (my $ext = $test_suffix) =~ s/^\.//; $ext = uc $ext; + # See comments about definition of LOG_DRIVER, above. + if (! var "${ext}_LOG_DRIVER") + { + require_conf_file ($parallel_tests->{position}, FOREIGN, 'pt-driver'); + define_variable ("${ext}_LOG_DRIVER", + "\$(SHELL) $am_config_aux_dir/pt-driver", + INTERNAL); + } + my $driver = '$(' . $ext . '_LOG_DRIVER)'; + my $driver_flags = '$(AM_' . $ext . '_LOG_DRIVER_FLAGS) ' . + '$(' . $ext . '_LOG_DRIVER_FLAGS)'; my $compile = $ext . '_LOG_COMPILE'; define_variable ($compile, '$(' . $ext . '_LOG_COMPILER) $(AM_' . $ext . '_LOG_FLAGS)' @@ -5085,7 +5106,8 @@ sub handle_tests GENERIC => 1, OBJ => '', SOURCE => '$<', - DRIVER => '$(am__pt_driver)', + DRIVER => $driver, + DRIVER_FLAGS => $driver_flags, COMPILE => '$(' . $compile . ')', EXT => $test_suffix, am__EXEEXT => $am_exeext); diff --git a/doc/automake.texi b/doc/automake.texi index 5dd1099..bf032a5 100644 --- a/doc/automake.texi +++ b/doc/automake.texi @@ -317,6 +317,7 @@ Support for test suites * Simple Tests:: Listing programs and scripts in @code{TESTS} * Simple Tests using parallel-tests:: More powerful test driver +* Custom Test Drivers:: Using custom test drivers * DejaGnu Tests:: Interfacing with the external testing framework * Install Tests:: Running tests on installed packages @@ -8600,6 +8601,7 @@ are very similar. @menu * Simple Tests:: Listing programs and scripts in @code{TESTS} * Simple Tests using parallel-tests:: More powerful test driver +* Custom Test Drivers:: Using custom test drivers * DejaGnu Tests:: Interfacing with the external testing framework * Install Tests:: Running tests on installed packages @end menu @@ -8926,6 +8928,59 @@ semantics of FreeBSD and OpenBSD @command{make} conflict with this). In case of doubt you may want to require to use GNU @command{make}, or work around the issue with inference rules to generate the tests. +@node Custom Test Drivers +@section Custom Test Drivers + +@emph{TODO!} + +Explain why they can bu useful (handle custom or non-widespread +test protocols). + +@c This feature is designed to share infrastructure with parallel-tests. +@c Everything said for parallel-tests should apply here too, unless +@c explicitly noted otherwise. +@c +@c This feature can be activated by defining make variable LOG_DRIVER, or +@c <ext>_LOG_DRIVER for extension-specific test drivers. In this last +@c case, multiple test drivers can be used in the same Makefile. +@c +@c Like we allow for extension-specific "test runners" (<ext>_LOG_COMPILER), +@c we allow for extension specific "test drivers" (<ext>_LOG_DRIVER). +@c +@c The driver script should follow a simple protocol in order to really +@c work with Automake-generated test harnesses: +@c +@c * options that *must* be supported by the driver: +@c --test-name=NAME +@c --log-file=PATH +@c --color-tests={yes|no} +@c --enable-hard-errors={yes|no} +@c --expect-failure={yes|no} +@c The path specified by the `--log-file' *must* be correctly created +@c by the driver; the format of what gets written in there, as well as +@c the exact semantic of the other options, might be variable. In +@c particular, the driver is free to consider some of those options as +@c no-ops (but must recognize and handle them nonetheless). +@c +@c * Generated files: only the proper `.log' should be created (but the +@c driver can use temporary files if it needs to, only it should clean +@c them up properly). +@c +@c * driver-specific options (AM_LOG_DRIVER_FLAGS and LOG_DRIVER_FLAGS) +@c that get passed to the driver script by the Makefile. +@c +@c * what to exactly do with xfailing tests and disable-hard-errors +@c directive is up to the driver script, and might depend from the +@c test protocol it implements. +@c +@c * explain what kind of console output the driver is expected to produce; +@c it can have some leeway here, but IMHO should provide a "look & feel" +@c similar to the existing "parallel-tests" output. +@c +@c * not strictly necessary for the driver to to honour color-tests or +@c DISABLE_HARD_ERRORS; but usually it's nice to do so, in oder to provide +@c a better user experience. + @node DejaGnu Tests @section DejaGnu Tests diff --git a/lib/Automake/tests/Makefile.in b/lib/Automake/tests/Makefile.in index 4911185..43b0fea 100644 --- a/lib/Automake/tests/Makefile.in +++ b/lib/Automake/tests/Makefile.in @@ -165,11 +165,11 @@ esac; \ $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check check-html recheck recheck-html -am__pt_driver = $(SHELL) $(top_srcdir)/lib/pt-driver TEST_SUITE_LOG = test-suite.log TEST_SUITE_HTML = $(TEST_SUITE_LOG:.log=.html) am__test_logs1 = $(TESTS:=.log) TEST_LOGS = $(am__test_logs1:.pl.log=.log) +PL_LOG_DRIVER = $(SHELL) $(top_srcdir)/lib/pt-driver PL_LOG_COMPILE = $(PL_LOG_COMPILER) $(AM_PL_LOG_FLAGS) $(PL_LOG_FLAGS) TEST_LOGS_TMP = $(TEST_LOGS:.log=.log-t) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -459,7 +459,7 @@ recheck recheck-html: $(MAKE) $(AM_MAKEFLAGS) $$target AM_MAKEFLAGS='$(AM_MAKEFLAGS) TEST_LOGS="'"$$list"'"' .pl.log: @p='$<'; $(am__check_pre) \ - $(am__pt_driver) $(am__test_driver_flags) -- \ + $(PL_LOG_DRIVER) $(am__test_driver_flags) $(AM_PL_LOG_DRIVER_FLAGS) $(PL_LOG_DRIVER_FLAGS) -- \ $(PL_LOG_COMPILE) "$$tst" distdir: $(DISTFILES) diff --git a/lib/am/check2.am b/lib/am/check2.am index f3116c8..b7ed0ee 100644 --- a/lib/am/check2.am +++ b/lib/am/check2.am @@ -18,7 +18,7 @@ ?GENERIC?%EXT%.log: ?!GENERIC?%OBJ%: %SOURCE% @p='%SOURCE%'; $(am__check_pre) \ - %DRIVER% $(am__test_driver_flags) -- \ + %DRIVER% $(am__test_driver_flags) %DRIVER_FLAGS% -- \ %COMPILE% "$$tst" ## If no programs are built in this package, then this rule is removed @@ -28,6 +28,6 @@ if %am__EXEEXT% ?GENERIC?%EXT%$(EXEEXT).log: @p='%SOURCE%'; $(am__check_pre) \ - %DRIVER% $(am__test_driver_flags) -- \ + %DRIVER% $(am__test_driver_flags) %DRIVER_FLAGS% -- \ %COMPILE% "$$tst" endif %am__EXEEXT% diff --git a/tests/Makefile.in b/tests/Makefile.in index dd5a62e..f30cd27 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -170,12 +170,12 @@ esac; \ $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check check-html recheck recheck-html -am__pt_driver = $(SHELL) $(top_srcdir)/lib/pt-driver TEST_SUITE_LOG = test-suite.log TEST_SUITE_HTML = $(TEST_SUITE_LOG:.log=.html) TEST_EXTENSIONS = .test am__test_logs1 = $(TESTS:=.log) TEST_LOGS = $(am__test_logs1:.test.log=.log) +TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/lib/pt-driver TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ $(TEST_LOG_FLAGS) TEST_LOGS_TMP = $(TEST_LOGS:.log=.log-t) @@ -1474,7 +1474,7 @@ recheck recheck-html: $(MAKE) $(AM_MAKEFLAGS) $$target AM_MAKEFLAGS='$(AM_MAKEFLAGS) TEST_LOGS="'"$$list"'"' .test.log: @p='$<'; $(am__check_pre) \ - $(am__pt_driver) $(am__test_driver_flags) -- \ + $(TEST_LOG_DRIVER) $(am__test_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- \ $(TEST_LOG_COMPILE) "$$tst" distdir: $(DISTFILES) diff --git a/tests/test-driver-custom-no-pt-driver.test b/tests/test-driver-custom-no-pt-driver.test new file mode 100755 index 0000000..59fda92 --- /dev/null +++ b/tests/test-driver-custom-no-pt-driver.test @@ -0,0 +1,63 @@ +#! /bin/sh +# Copyright (C) 2011 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 +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +# Check that auxiliary script 'pt-driver' doesn't get needlessly +# installed or referenced if it's not used, i.e., if the user has +# defined his own `*LOG_DRIVER' variables. + +parallel_tests=yes +. ./defs || Exit 1 + +cat >> configure.in <<'END' +AC_PROG_CC +AC_CONFIG_FILES([sub1/Makefile sub2/Makefile]) +AC_SUBST([X_LOG_WRAPPER], [none]) +AC_OUTPUT +END + +mkdir sub1 sub2 + +cat > Makefile.am <<'END' +SUBDIRS = sub1 sub2 +LOG_DRIVER = +TEST_LOG_DRIVER = : +TESTS = foo bar.test +END + +cat > sub1/Makefile.am <<'END' +TEST_EXTENSIONS = .x .sh .pl +SH_LOG_DRIVER = dummy1 +PL_LOG_DRIVER = dummy2 +TESTS = a.pl b.sh c.x +END + +cat > sub2/Makefile.am <<'END' +TEST_EXTENSIONS = .bar +LOG_DRIVER = x +BAR_LOG_DRIVER = y +TESTS = 1 2.bar 3.test 4.t 5.tt $(check_PROGRAMS) +check_PROGRAMS = p1 p2$(EXEEXT) p3.bar p4.suf +END + +$ACLOCAL + +for opts in '' '--add-missing' '-a -c'; do + $AUTOMAKE $opts + $FGREP pt-driver Makefile.in sub1/Makefile.in sub2/Makefile.in && Exit 1 + find . | $FGREP pt-driver && Exit 1 +done + +: diff --git a/tests/test-driver-custom-xfail-tests.test b/tests/test-driver-custom-xfail-tests.test new file mode 100755 index 0000000..e50b2a5 --- /dev/null +++ b/tests/test-driver-custom-xfail-tests.test @@ -0,0 +1,146 @@ +#! /bin/sh +# Copyright (C) 2011 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 +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +# Custom test drivers: "abstract" XFAIL_TESTS support. + +parallel_tests=yes +. ./defs || Exit 1 + +cat >> configure.in <<'END' +AC_SUBST([nihil], []) +AC_SUBST([ac_xfail_tests], ['x5.test x6$(test_suffix)']) +AC_CONFIG_FILES([sub1/Makefile sub2/Makefile]) +AC_OUTPUT +END + +cat > Makefile.am <<'END' +SUBDIRS = . sub1 sub2 +TEST_LOG_DRIVER = $(srcdir)/tw +TESTS = pass.test xfail.test +XFAIL_TESTS = xfail.test +END + +mkdir sub1 sub2 + +cat > sub1/Makefile.am <<END +empty = + +TEST_LOG_DRIVER = \$(top_srcdir)/tw + +# XFAIL_TESTS should gracefully handle TAB characters, and multiple +# whitespaces. +XFAIL_TESTS =\$(empty)${tab}x1.test x2.test${tab}x3.test${tab}\ +x4.test ${tab} x5.test x6.test${tab}\$(empty) + +TESTS = pass.test x1.test x2.test x3.test x4.test x5.test x6.test +END + +cat > sub2/Makefile.am <<'END' +AUTOMAKE_OPTIONS = -Wno-portability-recursive + +TEST_LOG_DRIVER = $(srcdir)/../tw + +# XFAIL_TESTS should gracefully AC_SUBST @substitution@ and +# make variables indirections. +an_xfail_test = x1.test +test_suffix = .test +v0 = x3.test +v1 = v +v2 = 0 +XFAIL_TESTS = $(an_xfail_test) x2.test @nihil@ x3${test_suffix} +XFAIL_TESTS += $($(v1)$(v2)) x4.test @ac_xfail_tests@ + +TESTS = pass.test x1.test x2.test x3.test x4.test x5.test x6.test +END + +cat > pass.test <<'END' +#!/bin/sh +exit 0 +END + +cat > xfail.test <<'END' +#!/bin/sh +exit 1 +END + +chmod a+x pass.test xfail.test + +cp pass.test sub1/pass.test +cp pass.test sub2/pass.test + +for i in 1 2 3 4 5 6; do + cp xfail.test sub1/x$i.test + cp xfail.test sub2/x$i.test +done + +cat > tw <<'END' +#! /bin/sh +set -e +test_name=INVALID +log_file=/dev/null +expect_failure=no +while test $# -gt 0; do + case $1 in + --test-name) test_name=$2; shift;; + --expect-failure) expect_failure=$2; shift;; + --log-file) log_file=$2; shift;; + # Ignored. + --color-tests) shift;; + --enable-hard-errors) shift;; + # Explicitly terminate option list. + --) shift; break;; + # Shouldn't happen + *) echo "$0: invalid option/argument: '$1'" >&2; exit 2;; + esac + shift +done +st=0 +"$@" || st=$? +rm -f "$log_file" +case $st,$expect_failure in + 0,no) echo "PASS: $test_name"; exit 0;; + 1,no) echo "FAIL: $test_name"; exit 1;; + 0,yes) echo "XPASS: $test_name"; exit 1;; + 1,yes) echo "XFAIL: $test_name"; exit 0;; + *) echo "UNEXPECTED OUTCOME: $test_name"; exit 99;; +esac | tee "$log_file" +END +chmod a+x tw + +$ACLOCAL +$AUTOCONF +$AUTOMAKE + +./configure + +VERBOSE=yes $MAKE check +test -f test-suite.log +test -f sub1/test-suite.log +test -f sub2/test-suite.log + +for dir in sub1 sub2; do + cd $dir + cp pass.test x1.test + cp x2.test pass.test + VERBOSE=yes $MAKE check && Exit 1 + grep '^FAIL: pass\.test$' test-suite.log + grep '^XPASS: x1\.test$' test-suite.log + test `grep -c '^FAIL' test-suite.log` -eq 1 + test `grep -c '^XPASS' test-suite.log` -eq 1 + cd .. +done + +: diff --git a/tests/test-driver-custom.test b/tests/test-driver-custom.test new file mode 100755 index 0000000..b6a33d2 --- /dev/null +++ b/tests/test-driver-custom.test @@ -0,0 +1,140 @@ +#! /bin/sh +# Copyright (C) 2011 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 +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +# Custom test drivers: per-extension test drivers. + +parallel_tests=yes +. ./defs || Exit 1 + +cat >> configure.in << 'END' +AC_OUTPUT +END + +cat > Makefile.am << 'END' +# Automake shouldn't match the '/test' in 'sub/test' as '.test' suffix. +TESTS = 1.chk 2.test 3 4.c.chk 5.suf sub/test + +TEST_EXTENSIONS = .chk .test + +CHK_LOG_DRIVER = ./chk-wrapper +TEST_LOG_DRIVER = $(SHELL) $(srcdir)/test-wrapper +LOG_DRIVER = noext-wrapper + +AM_CHK_LOG_DRIVER_FLAGS = --am-chk +CHK_LOG_DRIVER_FLAGS = --chk +AM_TEST_LOG_DRIVER_FLAGS = -am-test +TEST_LOG_DRIVER_FLAGS = -test +AM_LOG_DRIVER_FLAGS = am +LOG_DRIVER_FLAGS = _ +END + +mkdir sub bin +PATH=`pwd`/bin$PATH_SEPARATOR$PATH; export PATH + +cat > wrapper.skel <<'END' +#! /bin/sh +set -e + +me=`echo "$0" | sed 's,^.*/,,'` +if test -z "$me"; then + echo "$0: cannot determine program name" >&2 + exit 99 +fi + +am_log_wflags='@am_log_wflags@' +log_wflags='@log_wflags@' + +test_name=INVALID +log_file=BAD.log +extra_opts= +while test $# -gt 0; do + case $1 in + --test-name) test_name=$2; shift;; + --log-file) log_file=$2; shift;; + # Ignored. + --expect-failure) shift;; + --color-tests) shift;; + --enable-hard-errors) shift;; + # Remembered in the same order they're passed in. + $am_log_wflags|$log_wflags) extra_opts="$extra_opts $1";; + # Explicitly terminate option list. + --) shift; break;; + # Shouldn't happen + *) echo "$0: invalid option/argument: '$1'" >&2; exit 2;; + esac + shift +done + +echo "$me" "$test_name" $extra_opts > "$log_file" + +exec "$@" +exit 127 +END + +sed -e 's|@am_log_wflags@|--am-chk|' \ + -e 's|@log_wflags@|--chk|' \ + < wrapper.skel > chk-wrapper + +sed -e 's|@am_log_wflags@|-am-test|' \ + -e 's|@log_wflags@|-test|' \ + < wrapper.skel > test-wrapper + +sed -e 's|@am_log_wflags@|am|' \ + -e 's|@log_wflags@|_|' \ + < wrapper.skel > bin/noext-wrapper + +# `test-wrapper' is deliberately not made executable. +chmod a+x chk-wrapper bin/noext-wrapper + +# Not needed anymore. +rm -f wrapper.skel + +cat > 1.chk << 'END' +#! /bin/sh +exit 0 +END +chmod a+x 1.chk +cp 1.chk 2.test +cp 1.chk 3 +cp 1.chk 4.c.chk +cp 1.chk 5.suf +cp 1.chk sub/test + +$ACLOCAL +$AUTOCONF +$AUTOMAKE + +./configure +$MAKE +VERBOSE=yes $MAKE check +ls -l . sub + +test ! -r BAD.log + +echo 'chk-wrapper 1.chk --am-chk --chk' > 1.exp +echo 'test-wrapper 2.test -am-test -test' > 2.exp +echo 'noext-wrapper 3 am _' > 3.exp +echo 'chk-wrapper 4.c.chk --am-chk --chk' > 4.c.exp +echo 'noext-wrapper 5.suf am _' > 5.suf.exp +echo 'noext-wrapper sub/test am _' > sub/test.exp + +st=0 +for x in 1 2 3 4.c 5.suf sub/test; do + cat $x.log + diff $x.exp $x.log || st=1 +done + +Exit $st -- 1.7.2.3