2 # Copyright (C) 2011-2012 Free Software Foundation, Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2, or (at your option)
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18 # - LOG_DRIVER variables can be AC_SUBST'd
25 cp "$am_testauxdir"/trivial-test-driver test-drivers/triv \
26 || fatal_ "failed to fetch auxiliary script trivial-test-driver"
27 cp "$am_scriptdir"/test-driver test-drivers/dflt \
28 || fatal_ "failed to fetch auxiliary script test-driver"
30 cat >> configure.ac <<'END'
31 AC_SUBST([LOG_DRIVER], ['${SHELL} test-drivers/triv'])
32 AC_SUBST([TEST_LOG_DRIVER], ['${SHELL} test-drivers/dflt'])
33 AC_SUBST([SH_LOG_DRIVER], ['${my_drv}'])
37 cat > Makefile.am <<'END'
38 TEST_EXTENSIONS = .test .sh
39 my_drv = $(SHELL) test-drivers/dflt
40 TESTS = foo bar.test baz.sh
42 .PHONY: check-autodefs
45 @echo LOG_DRIVER = $(LOG_DRIVER)
46 @echo TEST_LOG_DRIVER = $(TEST_LOG_DRIVER)
47 @echo SH_LOG_DRIVER = $(SH_LOG_DRIVER)
49 @echo ' ' $(LOG_DRIVER) ' ' | grep ' test-drivers/triv '
50 @echo ' ' $(TEST_LOG_DRIVER) ' ' | grep ' test-drivers/dflt '
51 @echo ' ' $(SH_LOG_DRIVER) ' ' | grep ' test-drivers/dflt '
63 exit 1 # Exit status should be ignored by the trivial-test-driver.
66 cat > bar.test <<'END'
76 chmod a+x foo bar.test baz.sh
79 st=0; $MAKE check >stdout || st=$?
85 test $st -eq 0 || Exit 1
86 count_test_results total=3 pass=1 fail=0 skip=1 xfail=1 xpass=0 error=0