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 # Check that the global testsuite log file referenced in the testsuite
18 # summary and in the global testsuite log itself is correct.
23 mv configure.ac configure.stub
31 cat configure.stub - > configure.ac <<'END'
35 cat > Makefile.am << 'END'
36 TEST_SUITE_LOG = my_test_suite.log
49 $MAKE check >stdout && { cat stdout; Exit 1; }
51 grep '^See \./my_test_suite\.log$' stdout
54 TEST_SUITE_LOG=bar/bar.log $MAKE -e check >stdout && { cat stdout; Exit 1; }
56 grep '^See \./bar/bar\.log$' stdout
60 echo SUBDIRS = sub > Makefile.am
62 echo TESTS = fail > sub/Makefile.am
65 cat configure.stub - > configure.ac <<'END'
66 AC_CONFIG_FILES([sub/Makefile])
75 $MAKE check >stdout && { cat stdout; Exit 1; }
77 grep '^See sub/test-suite\.log$' stdout
79 $MAKE check >stdout && { cat stdout; Exit 1; }
81 grep '^See sub/test-suite\.log$' stdout
84 TEST_SUITE_LOG=foo.log $MAKE -e check >stdout && { cat stdout; Exit 1; }
86 grep '^See sub/foo\.log$' stdout