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 # Test the example of usage of generic and extension-specific
18 # LOG_COMPILER and LOG_FLAGS given in the manual.
23 cat >> configure.ac
<<END
24 AC_SUBST([PERL], ['$PERL'])
29 cat > Makefile.am
<< 'END'
30 TESTS
= foo.pl bar.py baz
31 TEST_EXTENSIONS
= .pl .py
32 PL_LOG_COMPILER
= $
(PERL
)
34 PY_LOG_COMPILER
= $
(PYTHON
)
36 LOG_COMPILER
= .
/wrapper-script
40 echo 'my $a =+ 2; exit (0);' > foo.pl
41 echo 'import sys; sys.exit(0);' > bar.py
44 cat > wrapper-script
<<'END'
46 echo "wrapper args: $*"
48 chmod a
+x wrapper-script
61 test $st -eq 0 ||
exit $st
63 # Check that the wrappers have been run with the expected flags.
64 grep '[rR]eversed.*+=.*operator.*foo\.pl' foo.log
65 grep '^# *[cC]lear.*sys\.argv' bar.log
66 grep '^wrapper args:.* -d .*baz' baz.log