2 # Copyright (C) 2008-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 singular and plural in test summaries.
19 # This test only makes sense for the older serial testsuite driver.
23 cat >> configure.ac
<< 'END'
27 cat > Makefile.am
<< 'END'
28 TESTS
= fail pass skip xfail xpass fail2 pass2 skip2 xfail2 xpass2
29 XFAIL_TESTS
= xfail xpass xfail2 xpass2
44 chmod a
+x pass fail skip
59 # Do not check for failure in this subshell
61 env TESTS
=pass
$MAKE -e check
62 env TESTS
=fail
$MAKE -e check
63 env TESTS
=skip
$MAKE -e check
64 env TESTS
=xfail
$MAKE -e check
65 env TESTS
=xpass
$MAKE -e check
66 env TESTS
="pass pass2" $MAKE -e check
67 env TESTS
="fail fail2" $MAKE -e check
68 env TESTS
="skip skip2" $MAKE -e check
69 env TESTS
="xfail xfail2" $MAKE -e check
70 env TESTS
="xpass xpass2" $MAKE -e check
71 env TESTS
='pass skip xfail' $MAKE -e check
74 ) >stdout ||
{ cat stdout
; exit 1; }
77 grep '1 [tT]ests' stdout
&& exit 1
78 grep '[02-9] [tT]est ' stdout
&& exit 1
79 grep '1 .* were ' stdout
&& exit 1
80 grep '[02-9].* was .*run' stdout
&& exit 1
81 grep 'All 1 ' stdout
&& exit 1
82 $EGREP '1 (un)?expected (failures|passes)' stdout
&& exit 1
83 $EGREP '[^1] (un)?expected (failure|pass)\)' stdout
&& exit 1