2 # Copyright (C) 2011-2013 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
24 cp "$am_testaux_srcdir"/trivial-test-driver test-drivers/triv \
25 || fatal_ "failed to fetch auxiliary script trivial-test-driver"
26 cp "$am_scriptdir"/test-driver test-drivers/dflt \
27 || fatal_ "failed to fetch auxiliary script test-driver"
29 cat >> configure.ac <<'END'
30 AC_SUBST([LOG_DRIVER], ['${SHELL} test-drivers/triv'])
31 AC_SUBST([TEST_LOG_DRIVER], ['${SHELL} test-drivers/dflt'])
32 AC_SUBST([SH_LOG_DRIVER], ['${my_drv}'])
36 cat > Makefile.am <<'END'
37 TEST_EXTENSIONS = .test .sh
38 my_drv = $(SHELL) test-drivers/dflt
39 TESTS = foo bar.test baz.sh
41 .PHONY: check-autodefs
44 @echo LOG_DRIVER = $(LOG_DRIVER)
45 @echo TEST_LOG_DRIVER = $(TEST_LOG_DRIVER)
46 @echo SH_LOG_DRIVER = $(SH_LOG_DRIVER)
48 @echo ' ' $(LOG_DRIVER) ' ' | grep ' test-drivers/triv '
49 @echo ' ' $(TEST_LOG_DRIVER) ' ' | grep ' test-drivers/dflt '
50 @echo ' ' $(SH_LOG_DRIVER) ' ' | grep ' test-drivers/dflt '
62 exit 1 # exit status should be ignored by the trivial-test-driver.
65 cat > bar.test <<'END'
75 chmod a+x foo bar.test baz.sh
78 run_make -O -e IGNORE check
83 test $am_make_rc -eq 0
84 count_test_results total=3 pass=1 fail=0 skip=1 xfail=1 xpass=0 error=0