#! /bin/sh
-# Copyright (C) 2005-2012 Free Software Foundation, Inc.
+# Copyright (C) 2005-2013 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# Make sure 'make -k check' processes all directories.
-. ./defs || Exit 1
+# For gen-testsuite-part: ==> try-with-serial-tests <==
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_FILES([dir/Makefile])
$AUTOCONF
$AUTOMAKE --add-missing
-./configure --prefix "`pwd`/inst"
+./configure --prefix "$(pwd)/inst"
-$MAKE check >stdout && { cat stdout; Exit 1; }
-cat stdout
+run_make -O -e FAIL -- check
grep '^FAIL: fail\.sh *$' stdout
-grep '^PASS: ok\.sh *$' stdout && Exit 1
+grep '^PASS: ok\.sh *$' stdout && exit 1
# The exit status of 'make -k' can be anything
# (depending on the Make implementation)
-$MAKE -k check >stdout || :
-cat stdout
+run_make -O -e IGNORE -- -k check
grep '^FAIL: fail\.sh *$' stdout
grep '^PASS: ok\.sh *$' stdout
# Should also works when -k is not in first position.
-$MAKE -s -k check >stdout || :
-cat stdout
+run_make -O -e IGNORE -- -s -k check
grep '^FAIL: fail\.sh *' stdout
grep '^PASS: ok\.sh *' stdout
# Try with a long-option that do not have a short option equivalent
# (here, --no-print-directory). That should cause all options to
# appear verbatim in MAKEFLAGS.
- $MAKE --no-print-directory -k check >stdout || :
- cat stdout
+ run_make -e FAIL -O -- --no-print-directory -k check
grep '^FAIL: fail\.sh *$' stdout
grep '^PASS: ok\.sh *$' stdout
fi