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/>.
17 # Custom test drivers: check that the test name passed to the test
18 # driver has any VPATH prefix stripped.
23 ocwd
=`pwd` || fatal_
"cannot get current working directory"
26 mv install-sh missing configure.
in src
31 cat >> configure.
in << 'END'
35 cat > Makefile.am
<< 'END'
36 # The directories of the `bar.test' and `baz.test' tests are deliberately
37 # called as the source directory, to verify that the VPATH-stripping code
38 # doesn't get too easily confused.
39 # The $(empty) are for eliciting VPATH rewrites on make implementations
40 # that support it (e.g., Solaris make), to improve coverage.
42 TESTS
= $
(empty
) foo.
test src
/bar.
test .
/src
/baz.
test $
(empty
)
44 TEST_LOG_DRIVER
= $
(srcdir
)/checkstrip-driver
45 EXTRA_DIST
= checkstrip-driver
48 cat > checkstrip-driver
<<'END'
51 while test $# -gt 0; do
53 --log-file) log_file=$2; shift;;
54 --trs-file) trs_file=$2; shift;;
55 --test-name) test_name=$2; shift;;
56 --expect-failure|--color-tests|--enable-hard-errors) shift;;
58 *) echo "$0: invalid option/argument: '$1'" >&2; exit 2;;
62 echo "test name: $test_name" # For debugging.
64 foo.test|./foo.test|src/ba[rz].test|./src/ba[rz].test);;
67 echo dummy > "$log_file"
68 echo dummy > "$trs_file"
70 chmod a
+x checkstrip-driver
81 # "$MAKE -n" is for debugging, should highlight any VPATH rewrite.
89 # "$MAKE -n" is for debugging, should highlight any VPATH rewrite.