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/>.
17 # parallel-tests support: redirection of file descriptors with
18 # AM_TESTS_FD_REDIRECT, even when using tests without suffix.
19 # The sister 'parallel-tests-fd-redirect-exeext.sh' do a similar
20 # check for tests that are binary executables.
21 # See also the more generic test 'check-fd-redirect.sh'.
25 cat >> configure.ac
<< 'END'
29 cat > Makefile.am
<< 'END'
30 AM_TESTS_FD_REDIRECT
= 9>&1
31 TEST_EXTENSIONS
= .
test .sh
56 grep '^bar\.log:.*bar' Makefile || st
=1
57 grep '^foo\.log:' Makefile
&& st
=1
58 test $st -eq 0 || fatal_
"doesn't cover expected code paths"
60 st
=0; $MAKE check
>stdout || st
=1
65 grep "^ foofoofoo$" stdout
66 grep "^ barbarbar$" stdout
67 $EGREP '(foofoofoo|barbarbar)' *.log
&& exit 1