# We require that the shell can correctly trap EXIT when 'set -e' is in
# effect (OSF1/Tru64 sh failed to do so, see commit v1.10b-52-g9fe8259).
#
+# We want to able to define shell aliases with the same name of shell
+# builtins.
+#
# We also prefer shells that, when 'set -x' is in effect, do not also
# redirect traces upon stderr redirections. For example,
# $ set -x; echo x 2>file
[(set -x; P=1 true 2>&3) 3>&1 2>/dev/null | grep P=1],
[am_score=9], [])
+ echo 'alias false=echo' > conftest-alias.sh
+ echo 'false && test "$(false 97)" = 97' >> conftest-alias.sh
+ _AM_CHECK_SHELL_FEATURE([$1],
+ [supports alias named like shell builtins],
+ [. ./conftest-alias.sh],
+ [rm -f conftest-alias.sh],
+ [rm -f conftest-alias.sh; am_score=1; break])
+
break
done])
sub write_wrapper_script ($$$)
{
my ($file_handle, $wrapped_test, $shell_setup_code, $creator_name) = @_;
- # FIXME: we use some creative quoting in the generated scripts,
- # FIXME: to please maintainer-check.
print $file_handle unindent <<EOF;
#! /bin/sh
# This file has been automatically generated. DO NOT EDIT BY HAND!
- . ./defs-static || exit '99';
+ . ./defs-static || exit 1
$shell_setup_code
# In the spirit of VPATH, we prefer a test in the build tree
# over one in the source tree.
fi
done
echo "\$0: cannot find wrapped test '$wrapped_test'" >&2
- exit '99'
+ exit 99
EOF
}
# Automatically generated test. DO NOT EDIT BY HAND!
@vars_init
required="@required"
- . ./defs || Exit 1
+ . ./defs || exit 1
plan_ $planned
. "\$am_testauxdir/depcomp.sh"; exit "\$?"
EOF
exit 1; \
fi
-## Tests should never call exit directly, but use Exit.
-## This is so that the exit status is transported correctly across the 0 trap.
-## Ignore comments and our testsuite's own self tests.
+## Tests should no more call 'Exit', just 'exit'. That's because we
+## now have in place a better workaround to ensure the exit status is
+## transported correctly across the exit trap.
sc_tests_Exit_not_exit:
- @found=false; for file in $(xtests); do \
- case $$file in */self-check-*) continue;; esac; \
- res=`sed -n -e '/^#/d' -e '/<<.*END/,/^END/b' -e '/<<.*EOF/,/^EOF/b' \
- -e '/exit [$$0-9]/p' $$file`; \
- if test -n "$$res"; then \
- echo "$$file:$$res"; \
- found=true; \
- fi; \
- done; \
- if $$found; then \
- echo 'Do not call plain "exit", use "Exit" instead, in above tests.' 1>&2; \
+ @if grep 'Exit' $(xtests) $(xdefs) | grep -Ev '^[^:]+: *#' | grep .; then \
+ echo "Use 'exit', not 'Exit'; it's obsolete now." 1>&2; \
exit 1; \
fi
## Use AUTOMAKE_fails when appropriate
sc_tests_automake_fails:
- @if grep -v '^#' $(xtests) | grep '\$$AUTOMAKE.*&&.*[eE]xit'; then \
+ @if grep -v '^#' $(xtests) | grep '\$$AUTOMAKE.*&&.*exit'; then \
echo 'Use AUTOMAKE_fails + grep to catch automake failures in the above tests.' 1>&2; \
exit 1; \
fi
changes the test by adding a failing command after the last command,
the test will spuriously fail because '$?' is nonzero at the end.
Note that this is relevant even if the errexit shell flag is on, in
- case the test contains commands like "grep ... Makefile.in && Exit 1"
+ case the test contains commands like "grep ... Makefile.in && exit 1"
(and there are indeed a lot of such tests).
* Use $ACLOCAL, $AUTOMAKE, $AUTOCONF, $AUTOUPDATE, $AUTOHEADER,
likely to fail, display its output even in the failure case, before
exiting.
-* Use 'Exit' rather than 'exit' to abort for leave early from a test
- case.
-
* Use '$PATH_SEPARATOR', not hard-coded ':', as the separator of
PATH's entries.
generated configure scripts do not ensure they will find a truly POSIX
shell (even though they will prefer and use it *if* it's found).
-* Do not test an Automake error with "$AUTOMAKE && Exit 1", or in three
+* Do not test an Automake error with "$AUTOMAKE && exit 1", or in three
years we'll discover that this test failed for some other bogus reason.
This happened many times. Better use something like
# line breaking in the use of AC_OUTPUT. Synthesised by a bunch
# of older tests (referenced below).
-. ./defs || Exit 1
+. ./defs || exit 1
plan_ 22
# -----------------------------------------------------------------------
# And we're done.
-Exit 0
+exit 0
# TODO: puts third-party macros directly into 'acdir'.
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << 'END'
AC_INIT
$FGREP ':macro11:' configure
$FGREP ':macro21:' configure
$FGREP ':macro33:' configure
-grep MACRO3 aclocal.m4 && Exit 1
+grep MACRO3 aclocal.m4 && exit 1
test -f m4_1/macro.m4
test ! -f m4_2/macro.m4
cp aclocal.m4 copy.m4
$FGREP ':macro11:' configure
$FGREP ':macro21:' configure
$FGREP ':macro33:' configure
-grep MACRO3 aclocal.m4 && Exit 1
-grep GREPME m4_1/macro.m4 && Exit 1
+grep MACRO3 aclocal.m4 && exit 1
+grep GREPME m4_1/macro.m4 && exit 1
test -f m4_1/macro.m4
test ! -f m4_2/macro.m4
diff aclocal.m4 copy.m4
# directory, the macro from the lexically greatest file is used.
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << 'END'
AC_INIT
# Same as acloca11.test, but without calling MACRO2.
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac <<END
AC_INIT([$me], [1.0])
$ACLOCAL --verbose -I m4
$AUTOCONF
-$FGREP ':macro11:' configure && Exit 1
-$FGREP ':macro21:' configure && Exit 1
+$FGREP ':macro11:' configure && exit 1
+$FGREP ':macro21:' configure && exit 1
$FGREP ':macro12:' configure
:
# Make sure changes to m4_included files also cause aclocal.m4 to change.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
m4_include([somefile.m4])
$ACLOCAL -I m4
grep version2 aclocal.m4
-grep version1 aclocal.m4 && Exit 1
+grep version1 aclocal.m4 && exit 1
$sleep
echo MACRO2 >somefile.m4
$ACLOCAL -I m4
-grep version2 aclocal.m4 && Exit 1
+grep version2 aclocal.m4 && exit 1
grep version1 aclocal.m4
$sleep
# Make sure m4_included files are also scanned for definitions.
# Report from Phil Edwards.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_PROG_LIBTOOL
$FGREP acinclude.m4 aclocal.m4
# None of the following macro should be included. acinclude.m4
# includes the first four, and the last two are not needed at all.
-$FGREP a.m4 aclocal.m4 && Exit 1
-$FGREP b.m4 aclocal.m4 && Exit 1
-$FGREP c.m4 aclocal.m4 && Exit 1
-$FGREP d.m4 aclocal.m4 && Exit 1
-$FGREP defs/e.m4 aclocal.m4 && Exit 1
-$FGREP defs/f.m4 aclocal.m4 && Exit 1
+$FGREP a.m4 aclocal.m4 && exit 1
+$FGREP b.m4 aclocal.m4 && exit 1
+$FGREP c.m4 aclocal.m4 && exit 1
+$FGREP d.m4 aclocal.m4 && exit 1
+$FGREP defs/e.m4 aclocal.m4 && exit 1
+$FGREP defs/f.m4 aclocal.m4 && exit 1
$AUTOCONF
$AUTOMAKE
# Make sure aclocal diagnose missing included files with correct 'file:line:'.
rm -f b.m4
-$ACLOCAL 2>stderr && { cat stderr >&2; Exit 1; }
+$ACLOCAL 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
grep 'a\.m4:1: .*b\.m4.*does not exist' stderr
# PR/319.
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
# Start macros with AM_ because that causes aclocal to complain if it
# cannot find them.
echo 'AC_DEFUN([AM_MORE_MACRO], [AC_REQUIRE([AM_SOME_DEF])])' > m4/more.m4
$ACLOCAL -I m4
-$FGREP AM_SOME_MACRO aclocal.m4 && Exit 1
-$FGREP AM_MORE_MACRO aclocal.m4 && Exit 1
+$FGREP AM_SOME_MACRO aclocal.m4 && exit 1
+$FGREP AM_MORE_MACRO aclocal.m4 && exit 1
$FGREP 'm4_include([m4/more.m4])' aclocal.m4
test 1 = $(grep m4_include aclocal.m4 | wc -l)
# evaluated.
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << 'END'
AC_SUBST([POM])
EOF
$ACLOCAL -I m4
-grep m4/some.m4 aclocal.m4 && Exit 1
+grep m4/some.m4 aclocal.m4 && exit 1
:
# Make sure aclocal report unused required macros.
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << 'END'
AC_INIT
# FIXME: We want autom4te's 'undefined required macro' warning to be fatal,
# but have no means to say so to aclocal. We use WARNINGS=error instead.
-WARNINGS=error $ACLOCAL -I m4 2>stderr && { cat stderr >&2; Exit 1; }
+WARNINGS=error $ACLOCAL -I m4 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
grep '^configure\.ac:2:.*UNDEFINED_MACRO' stderr
# Test for --install with #serial numbers.
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << 'END'
AC_INIT
$FGREP ':macro23:' configure
clean_stale
-$ACLOCAL -I 4 -I 1 -I 2 --install 2>stderr && { cat stderr >&2; Exit 1; }
+$ACLOCAL -I 4 -I 1 -I 2 --install 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
grep 'macro.*AM_MACRO2.*not found' stderr
$ACLOCAL -I 4 -I 1 --diff=diff >stdout 2>stderr || {
cat stderr >&2
cat stdout
- Exit 1
+ exit 1
}
cat stderr >&2
cat stdout
test ! -f 4/m1.m4
grep 'installing.*4/m1\.m4' stderr
-$ACLOCAL -I 5 2>stderr && { cat stderr >&2; Exit 1; }
+$ACLOCAL -I 5 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
test $(grep -c 'ill-formed serial' stderr) -eq 3
-$ACLOCAL -I 6 2>stderr && { cat stderr >&2; Exit 1; }
+$ACLOCAL -I 6 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
grep 'serial.*before any macro definition' stderr
# more than just variable definitions.
# Report from Peter Breitenlohner (PR/450).
-. ./defs || Exit 1
+. ./defs || exit 1
cat >configure.ac <<'END'
AC_INIT([acloca19], [1.0])
$ACLOCAL
$AUTOCONF
-./configure >stdout || { cat stdout; Exit 1; }
+./configure >stdout || { cat stdout; exit 1; }
cat stdout
grep GREPME stdout
-grep 'aconfig\.ac' aclocal.m4 && Exit 1
-grep 'bconfig\.ac' aclocal.m4 && Exit 1
+grep 'aconfig\.ac' aclocal.m4 && exit 1
+grep 'bconfig\.ac' aclocal.m4 && exit 1
grep with-grepme configure
:
# Make sure aclocal does not write into symlinked aclocal.m4.
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
echo 'm4_define([FOO], [wrong foo])' > foo.m4
echo 'm4_define([FOO], [right foo])' > acinclude.m4
# an Autoconf macro.
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<EOF
dnl m4_include(__some_really_bogus_nonexistent_file__.m4)
# dependencies. See also related the tests 'remake-deleted-m4-file.test'
# and 'remake-renamed-m4-macro-and-file.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<EOF
FOO
./configure
$MAKE
grep GREPFOO Makefile
-grep GREPBAR Makefile && Exit 1
+grep GREPBAR Makefile && exit 1
sed 's/FOO/BAR/' < configure.ac > t
mv -f t configure.ac
rm -f foo.m4
$MAKE
-grep GREPFOO Makefile && Exit 1
+grep GREPFOO Makefile && exit 1
grep GREPBAR Makefile
:
# Ensure we diagnose underquoted AC_DEFUN's.
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << 'END'
AC_INIT
AC_DEFUN(FOO, [echo foo])
EOF
-$ACLOCAL -I m4 2>stderr && { cat stderr >&2; Exit 1; }
+$ACLOCAL -I m4 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
grep 'underquoted definition.*FOO' stderr
-grep 'warning.*warning' stderr && Exit 1
+grep 'warning.*warning' stderr && exit 1
:
# options. Also check that stuff in the automake acdir takes precedence
# over stuff in the system acdir.
-. ./defs || Exit 1
+. ./defs || exit 1
mkdir am sys
$AUTOCONF --force
$FGREP 'fake--init--automake' configure
$FGREP 'am--macro' configure
-$FGREP 'my--macro' configure && Exit 1 # Just to be sure.
+$FGREP 'my--macro' configure && exit 1 # Just to be sure.
rm -rf autom4te*.cache
# Obsolescent '--acdir' option.
-$ACLOCAL -Wobsolete --acdir am 2>stderr && { cat stderr >&2; Exit 1; }
+$ACLOCAL -Wobsolete --acdir am 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
grep '.*--acdir.*deprecated' stderr
rm -rf autom4te*.cache
-$ACLOCAL -Wno-obsolete --acdir sys 2>stderr && { cat stderr >&2; Exit 1; }
+$ACLOCAL -Wno-obsolete --acdir sys 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
grep 'macro .*AM_INIT_AUTOMAKE.* not found' stderr
# ACLOCAL_PATH variable, it is clear that this is the right thing
# to do. See also automake bug#8407.
-. ./defs || Exit 1
+. ./defs || exit 1
mkdir loc sys
am_create_testdir=empty
required=ro-dir
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac <<END
AC_INIT([$me], [1.0])
chmod a-w unwritable-dir
$ACLOCAL -I a-regular-file --install 2>stderr \
- && { cat stderr >&2; Exit 1; }
+ && { cat stderr >&2; exit 1; }
cat stderr >&2
$EGREP '(mkdir:|directory ).*a-regular-file' stderr
test ! -f aclocal.m4
$ACLOCAL --install -I unwritable-dir/sub 2>stderr \
- && { cat stderr >&2; Exit 1; }
+ && { cat stderr >&2; exit 1; }
cat stderr >&2
$EGREP '(mkdir:|directory ).*unwritable-dir/sub' stderr
test ! -f aclocal.m4
$ACLOCAL -I unwritable-dir --install 2>stderr \
- && { cat stderr >&2; Exit 1; }
+ && { cat stderr >&2; exit 1; }
cat stderr >&2
$EGREP '(cp:|copy ).*unwritable-dir' stderr
test ! -f aclocal.m4
# FIXME: this is a good candidate for a conversion to TAP.
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac <<END
AC_INIT([$me], [1.0])
$ACLOCAL --install -I zardoz1 -I zardoz2
test -d zardoz1
grep MY_MACRO zardoz1/my-defs.m4
-ls zardoz2 | grep . && Exit 1
+ls zardoz2 | grep . && exit 1
# Directories in ACLOCAL_PATH should never be created if they don't
# exist.
-ACLOCAL_PATH="$(pwd)/none:$(pwd)/none2" $ACLOCAL --install && Exit 1
+ACLOCAL_PATH="$(pwd)/none:$(pwd)/none2" $ACLOCAL --install && exit 1
test ! -d none
test ! -d none2
ACLOCAL_PATH="$(pwd)/none:$(pwd)/none2" $ACLOCAL --install -I x
test ! -d none2
# It's better if aclocal doesn't create the first include dir on failure.
-$ACLOCAL --install -I none -I none2 && Exit 1
+$ACLOCAL --install -I none -I none2 && exit 1
test ! -d none
test ! -d none2
# if the '--install' option is not given.
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac <<END
AC_INIT([$me], [1.0])
AC_DEFUN([MY_MACRO], [:])
END
-$ACLOCAL -I foo --system-acdir=sys-acdir && Exit 1
+$ACLOCAL -I foo --system-acdir=sys-acdir && exit 1
test ! -d foo
test ! -r foo
# are involved.
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << 'END'
AC_INIT
$AUTOCONF
$FGREP "::$ok:" m4/foo.m4
$FGREP "::$ok::" configure
- $FGREP "::$ko::" m4/foo.m4 configure && Exit 1
+ $FGREP "::$ko::" m4/foo.m4 configure && exit 1
:
}
# ACLOCAL_PATH and '--install' interactions.
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << 'END'
AC_INIT
# The '--install' option should never cause anything to be installed
# in a directory specified in ACLOCAL_PATH.
-$ACLOCAL --install 2>stderr && { cat stderr >&2; Exit 1; }
+$ACLOCAL --install 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
grep ' no -I was supplied' stderr
test ! -f pdir/foo.m4
# Non-existent directories in ACLOCAL_PATH are ok.
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << 'END'
AC_INIT
# Check precedence rules for ACLOCAL_PATH.
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << 'END'
AC_INIT([foo], [1.0])
$FGREP 'am__api_version' configure
# A final sanity check.
-$FGREP '::fail' configure && Exit 1
+$FGREP '::fail' configure && exit 1
:
# Check basic ACLOCAL_PATH support.
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << 'END'
AC_INIT
# there should be no m4_include in aclocal.m4, even though ACLOCAL_PATH
# contains 'mdir1' and './mdir2' as relative directories. Only -I
# directories should be subject to file inclusion.
-$FGREP m4_include aclocal.m4 && Exit 1
+$FGREP m4_include aclocal.m4 && exit 1
-$EGREP 'AM_(FOO|BAR|BAZ)_MACRO' configure && Exit 1
+$EGREP 'AM_(FOO|BAR|BAZ)_MACRO' configure && exit 1
$FGREP 'am--foo' configure
$FGREP 'am--bar' configure
$FGREP 'am--baz' configure
# Test on aclocal's '--print-ac-dir' option.
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
$ACLOCAL --print-ac-dir
test "$($ACLOCAL --print-ac-dir)" = "$am_system_acdir"
# Check verbose messages by 'aclocal --install'.
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac <<END
AC_INIT([$me], [1.0])
: > foodir/bar.m4
$ACLOCAL --system-acdir=sys-acdir --install --verbose -I foodir 2>stderr \
- || { cat stderr >&2; Exit 1; }
+ || { cat stderr >&2; exit 1; }
cat stderr >&2
grep ' installing .*sys-acdir/bar\.m4.* to .*foodir/bar\.m4' stderr
grep ' installing .*sys-acdir/quux\.m4.* to .*foodir/quux\.m4' stderr
# Test on some aclocal options. Report from Alexandre Oliva.
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
echo "AC_INIT([$me], [0]) AM_INIT_AUTOMAKE" > configure.ac
$ACLOCAL --output=fred
test -f fred
-$ACLOCAL --output 2>stderr && { cat stderr >&2; Exit 1; }
+$ACLOCAL --output 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
grep 'option.*--output.*requires an argument' stderr
grep '[Tt]ry.*--help.*for more information' stderr
-$ACLOCAL --unknown-option 2>stderr && { cat stderr >&2; Exit 1; }
+$ACLOCAL --unknown-option 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
grep 'unrecognized option.*--unknown-option' stderr
grep '[Tt]ry.*--help.*for more information' stderr
-$ACLOCAL foobar 2>stderr && { cat stderr >&2; Exit 1; }
+$ACLOCAL foobar 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
grep 'non-option argument.*foobar' stderr
grep '[Tt]ry.*--help.*for more information' stderr
-$ACLOCAL --ver 2>stderr && { cat stderr >&2; Exit 1; }
+$ACLOCAL --ver 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
grep 'unrecognized option.*--ver' stderr
grep '[Tt]ry.*--help.*for more information' stderr
# Test to make sure include of include detects missing macros
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<END
AC_INIT([$me], [1.0])
])
END
-$ACLOCAL -I macros 2>stderr && { cat stderr >&2; Exit 1; }
+$ACLOCAL -I macros 2>stderr && { cat stderr >&2; exit 1; }
cat stderr
grep '^macros/gnome\.m4:4:.*AM__PATH__GTK.*not found' stderr
# Report from Jim Meyering.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<EOF
AC_PROG_RANLIB
# Test to make sure that aclocal.m4's dependencies are honored in
# sub-directories. See also related tests 'remake-subdir*.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_TEST([GREPME])
# Make sure aclocal.m4 is rebuilt whenever a configure
# dependency changes. Test for acinclude.m4 and VPATH too.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
SOME_DEFS
# Make sure aclocal does not overwrite aclocal.m4 needlessly.
# Also make sure automake --no-force does not overwrite Makefile.in needlessly.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
SOME_DEFS
is_newest fragment.inc aclocal.m4
is_newest fragment.inc sub/Makefile.in
-grep README Makefile.in && Exit 1
+grep README Makefile.in && exit 1
$sleep
: > README
# Make sure aclocal does not require unused macros.
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << 'END'
AC_INIT
echo 'AC_DEFUN([MACRO1],)' >m4/macro1.m4
echo 'AC_DEFUN([MACRO2], [AC_REQUIRE([AM_UNUSED_MACRO])])' >m4/macro2.m4
-$ACLOCAL -I m4 >output 2>&1 || { cat output; Exit 1; }
+$ACLOCAL -I m4 >output 2>&1 || { cat output; exit 1; }
test 0 -eq $(wc -l <output)
grep macro1.m4 aclocal.m4
-grep macro2.m4 aclocal.m4 && Exit 1
+grep macro2.m4 aclocal.m4 && exit 1
:
# Make sure aclocal define macros in the same order as -I's.
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << 'END'
AC_INIT
# Test to make sure there are no spurious acinclude warnings.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >configure.ac <<EOF
AC_INIT
AC_SUBST(module)])
END
-$ACLOCAL >output 2>&1 || { cat output; Exit 1; }
+$ACLOCAL >output 2>&1 || { cat output; exit 1; }
cat output
test ! -s output
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# default, but copied if the '--copy' option is used.
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
plan_ "later"
# Test to make sure several *-local's in a single rule work.
-. ./defs || Exit 1
+. ./defs || exit 1
targets='all install-exec install-data uninstall'
echo "$targets:" | sed -e 's/[ :]/-local&/g' > Makefile.am
# Test to make sure all-local and other -local targets work correctly.
-. ./defs || Exit 1
+. ./defs || exit 1
$ACLOCAL
: Doing $target
echo "${target}-local:" > Makefile.am
$AUTOMAKE
- grep "${target}-local ${target}-local" Makefile.in && Exit 1
+ grep "${target}-local ${target}-local" Makefile.in && exit 1
grep "${target}-am:.*${target}-local" Makefile.in
done
# Make sure we complain if @ALLOCA@ is used without being set in configure.ac
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
AM_PROG_AR
# Make sure we complain if @LTALLOCA@ is used without being set in configure.ac
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
AC_PROG_CC
# Make sure README-alpha is distributed when appropriate. Report from
# Jim Meyering.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << 'END'
AC_INIT([alpha], [1.0a])
./configure
# "make distdir" should fail because NEWS does not mention 1.0a
-$MAKE check 2>stderr && { cat stderr >&2; Exit 1; }
+$MAKE check 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
grep 'NEWS not updated' stderr
test ! -f works
# Another check for README-alpha support. This time it is requested
# from configure.ac. Report from Akim Demaille.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << 'END'
AC_INIT([alpha], [1.0b])
# parallel-tests: check AM_TESTS_ENVIRONMENT support, and its
# interactions with TESTS_ENVIRONMENT.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_MKDIR_P
./configure
-TESTS_ENVIRONMENT='BAR=1' $MAKE check || { debug_info; Exit 1; }
+TESTS_ENVIRONMENT='BAR=1' $MAKE check || { debug_info; exit 1; }
minicheck
miniclean
-TESTS_ENVIRONMENT='BAR=2' $MAKE check && { debug_info; Exit 1; }
+TESTS_ENVIRONMENT='BAR=2' $MAKE check && { debug_info; exit 1; }
minicheck
miniclean
echo 'BAR=1 && export BAR' > test-env.sh
-$MAKE check || { debug_info; Exit 1; }
+$MAKE check || { debug_info; exit 1; }
minicheck
$MAKE distcheck
# Test to see if AM_ name can be assigned to in configure.ac.
# Report from Steve Robbins.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_CFLAGS=foo
# using DESTDIR to build simple, no-frills binary packages.
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
cp "$am_docdir"/amhello-1.0.tar.gz . \
|| fatal_ "cannot get amhello tarball"
am_create_testdir=empty
required=gcc
-. ./defs || Exit 1
+. ./defs || exit 1
cp "$am_docdir"/amhello-1.0.tar.gz . \
|| fatal_ "cannot get amhello tarball"
test -f optim/src/hello$exeext && break
test "$exeext" = : && fatal_ "cannot determine extension of executables"
done
-cmp optim/src/hello$exeext debug/src/hello$exeext && Exit 1
+cmp optim/src/hello$exeext debug/src/hello$exeext && exit 1
:
am_create_testdir=empty
required=i586-mingw32msvc-gcc
-. ./defs || Exit 1
+. ./defs || exit 1
cp "$am_docdir"/amhello-1.0.tar.gz . \
|| fatal_ "cannot get amhello tarball"
cd amhello-1.0
./configure --build "$build" --host "$host" > stdout \
- || { cat stdout ; Exit 1; }
+ || { cat stdout ; exit 1; }
cat stdout
grep '^checking for i586-mingw32msvc-strip\.\.\.' stdout
grep '^checking for i586-mingw32msvc-gcc\.\.\.' stdout
cat whatis
$EGREP 'DOS|Win' whatis
grep 'executable' whatis
-grep 'ELF' whatis && Exit 1
+grep 'ELF' whatis && exit 1
:
# Check that automake warns against old-style usages of AM_INIT_AUTOMAKE
# (i.e., calls with two or three arguments).
-. ./defs || Exit 1
+. ./defs || exit 1
warn_rx='AM_INIT_AUTOMAKE.* two-.* three-arguments form.*deprecated'
{
rm -rf autom4te*.cache
for cmd in "$AUTOCONF" "$AUTOMAKE"; do
- $cmd -Werror -Wnone -Wobsolete 2>stderr && { cat stderr; Exit 1; }
+ $cmd -Werror -Wnone -Wobsolete 2>stderr && { cat stderr; exit 1; }
cat stderr >&2
grep "^configure\.ac:2:.*$warn_rx" stderr
- $cmd -Werror -Wall -Wno-obsolete || Exit 1
+ $cmd -Werror -Wall -Wno-obsolete || exit 1
done
}
# Test to see if aclocal correctly reports missing AM_ macro.
-. ./defs || Exit 1
+. ./defs || exit 1
echo AM_ZARDOZ >> configure.ac
-$ACLOCAL 2>stderr && { cat stderr >&2; Exit 1; }
+$ACLOCAL 2>stderr && { cat stderr >&2; exit 1; }
cat stderr
grep 'configure.ac:.*AM_ZARDOZ.*not found' stderr
# Make Automake diagnose a conditional AUTOMAKE_OPTIONS.
# Report from Bas Wijnen.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<END
AM_CONDITIONAL([COND], [true])
# Check that errors about AUTOMAKE_OPTIONS refers to correct
# locations.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am <<'END'
# comment \
| grep -v '^Makefile1\.am:1:' \
| grep -v '^Makefile2\.am:6:' \
| grep -v '^Makefile3\.am:2:' \
- | grep . && Exit 1
+ | grep . && exit 1
:
# Check that AUTOMAKE_OPTIONS support variable expansion.
-. ./defs || Exit 1
+. ./defs || exit 1
# We want complete control over automake options.
AUTOMAKE=$am_original_AUTOMAKE
$ACLOCAL
AUTOMAKE_run
grep '^Makefile\.am:.*:=.*not portable' stderr
-grep README stderr && Exit 1
-$EGREP '(install|override)' stderr && Exit 1
+grep README stderr && exit 1
+$EGREP '(install|override)' stderr && exit 1
:
# Check for _AM_SUBST_NOTMAKE.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_SUBST([backslash], "\\")
# Check that any attempt to use the obsolete de-ANSI-fication support
# is diagnosed.
-. ./defs || Exit 1
+. ./defs || exit 1
warn_rx='automatic de-ANSI-fication.*removed'
echo AM_C_PROTOTYPES >> configure.ac
-$ACLOCAL -Wnone 2>stderr && { cat stderr >&2; Exit 1; }
+$ACLOCAL -Wnone 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
grep "^configure\\.ac:5:.*$warn_rx" stderr
cat aclocal.sav "$am_automake_acdir"/protos.m4 > aclocal.m4
-$AUTOCONF -Wnone 2>stderr && { cat stderr >&2; Exit 1; }
+$AUTOCONF -Wnone 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
grep "^configure\\.ac:5:.*$warn_rx" stderr
am_create_testdir=empty
required=xsi-lib-shell
-. ./defs || Exit 1
+. ./defs || exit 1
get_shell_script ar-lib
# Test if AM_PROG_AR installs ar-lib.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
END
$ACLOCAL
-$AUTOMAKE --add-missing 2>stderr || { cat stderr >&2; Exit 1; }
+$AUTOMAKE --add-missing 2>stderr || { cat stderr >&2; exit 1; }
cat stderr >&2
# Make sure ar-lib is installed, and that Automake says so.
grep '^configure\.ac:.*install.*ar-lib' stderr
# Test if lib_LIBRARIES requests AM_PROG_AR.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Test if lib_LTLIBRARIES requests AM_PROG_AR.
required=libtoolize
-. ./defs || Exit 1
+. ./defs || exit 1
cp configure.ac X
# Keep this test in sync with sister test 'ar-lib5b.test'.
required=lib
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << END
AC_INIT([$me], [1.0])
# This test does not require Microsoft lib.
# Keep this test in sync with sister test 'ar-lib5a.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << END
AC_INIT([$me], [1.0])
# Keep this test in sync with sister test 'ar-lib6b.test'.
required=libtoolize
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
libtoolize
$ACLOCAL
-$AUTOCONF 2>stderr || { cat stderr >&2; Exit 1; }
+$AUTOCONF 2>stderr || { cat stderr >&2; exit 1; }
cat stderr >&2
$EGREP '(AC_PROG_LIBTOOL|LT_INIT).*before.*AM_PROG_AR' stderr
# Keep this test in sync with sister test 'ar-lib6a.test'.
required=libtoolize
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
libtoolize
$ACLOCAL
-$AUTOCONF 2>stderr || { cat stderr >&2; Exit 1; }
+$AUTOCONF 2>stderr || { cat stderr >&2; exit 1; }
cat stderr >&2
$EGREP 'AC_PROG_LIBTOOL.*before.*AM_PROG_AR' stderr
# Test if automake warns if ar-lib is missing when AM_PROG_AR is used.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_PROG_AR
# Make sure that AR, ARFLAGS, and RANLIB can be substituted from configure.ac.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_PROG_AR
# Make sure AR and ARFLAGS are defined for EXTRA_LIBRARIES.
# Report from Kevin Ryde.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Make sure that AR, ARFLAGS, etc. works also when the macro AM_PROG_AR
# is used.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Test if configure bails out if $AR does not work and AM_PROG_AR is used.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_PROG_AR
grep '^checking.* archiver .*interface.*\.\.\. unknown' stdout
grep '^configure: error: could not determine /bin/false interface' stderr
-ls *conftest* && Exit 1
+ls *conftest* && exit 1
:
# Test the optional argument of AM_PROG_AR.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_PROG_AR([
$ACLOCAL
$AUTOCONF
-./configure AR=/bin/false >stdout || { cat stdout; Exit 1; }
+./configure AR=/bin/false >stdout || { cat stdout; exit 1; }
cat stdout
grep '^checking.* archiver .*interface.*\.\.\. unknown$' stdout
grep '^checking for something else\.\.\. found it$' stdout
# Test of basic assembly functionality.
# Keep this in sync with sister tests asm2.test and asm3.test.
-. ./defs || Exit 1
+. ./defs || exit 1
mv configure.ac configure.stub
# Test of basic preprocessed assembly functionality.
# Keep this in sync with sister tests asm.test and asm3.test.
-. ./defs || Exit 1
+. ./defs || exit 1
mv configure.ac configure.stub
# Test of basic preprocessed assembly functionality with extension .sx.
# Keep this in sync with sister tests asm.test and asm2.test.
-. ./defs || Exit 1
+. ./defs || exit 1
mv configure.ac configure.stub
# placed in a subdirectory.
# Related to automake bug#7819.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<END
AC_CONFIG_FILES([sub/Makefile])
# (at automake runtime).
# Related to automake bug#7819.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<END
AC_OUTPUT
# remove this test.
# Related to automake bug#7819.
-. ./defs || Exit 1
+. ./defs || exit 1
{ echo 'm4_include([defs.m4])'
cat configure.ac
# exist at automake runtime.
# Related to automake bug#7819.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<END
AC_CONFIG_HEADERS([config.h sub/config.h cfg2.h:conf2.hin])
# automatically distributed when placed in a subdirectory.
# Related to automake bug#7819.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<END
AC_CONFIG_FILES([sub/Makefile])
# Check that there are no duplicates in the list of files automatically
# distributed by automake.
-. ./defs || Exit 1
+. ./defs || exit 1
re='Files .*automatically distributed.*if found'
diff files$i.lst files$i.uniq || st=1
done
-Exit $st
+exit $st
# Related to automake bug#7819.
required=makeinfo
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << END
AC_OUTPUT
#
# Keep this test in sync with sister test 'autodist.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
AC_CONFIG_FILES([sub/Makefile])
# Keep this test in sync with sister test 'autodist-subdir.test'.
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# Check that autoheaders works, despite our AC_CONFIG_HEADERS hack.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<EOF
AC_CONFIG_HEADERS([thisfile.h])
# Check that autoheaders works, despite our AC_CONFIG_HEADERS hack.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<EOF
AM_CONFIG_HEADER([thisfile.h])
# Check rebuild rules for autoheader.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<EOF
m4_include([foo.m4])
# (This should also work without GNU Make.)
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'EOF'
AC_PROG_CC
./configure --enable-dependency-tracking
$MAKE
# Sanity check.
-cross_compiling || sub3/run | grep grepme1 || Exit 1
+cross_compiling || sub3/run | grep grepme1 || exit 1
$sleep
echo '#define NAME "grepme2"' > sub2/config.bot
$MAKE
-cross_compiling || sub3/run | grep grepme2 || Exit 1
+cross_compiling || sub3/run | grep grepme2 || exit 1
$MAKE test-prog-updated
$MAKE distcheck
# Removal recovery rules for AC_CONFIG_HEADERS should not remove files
# with 'make -n'.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'EOF'
AC_CONFIG_HEADERS([config.h])
# Test Automake's command-line options.
-. ./defs || Exit 1
+. ./defs || exit 1
plan_ 17
# Make sure that, if AC_CONFIG_AUX_DIR is not specified, Automake tries
# to use '.', '..' and '../..', in precisely that order.
-. ./defs || Exit 1
+. ./defs || exit 1
nil=__no_such_program
out=out0 $MAKE test
cat out0
grep "%%d0%%.*$nil" out0
-grep '%%d[123]' out0 && Exit 1
+grep '%%d[123]' out0 && exit 1
rm -f missing install-sh
out=out1 $MAKE test
cat out1
grep "%%d1%%.*$nil" out1
-grep '%%d[023]' out1 && Exit 1
+grep '%%d[023]' out1 && exit 1
rm -f ../missing ../install-sh
out=out2 $MAKE test
cat out2
grep "%%d2%%.*$nil" out2
-grep '%%d[013]' out2 && Exit 1
+grep '%%d[013]' out2 && exit 1
rm -f ../../missing ../../install-sh
# It should be possible to use a computed auxdir. This might seem
# bizarre, but it is actually used in multilib builds.
-. ./defs || Exit 1
+. ./defs || exit 1
plan_ 3
# Test to make sure we diagnose misplaced AC_CONFIG_AUX_DIR.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_CONFIG_AUX_DIR([.]) dnl this will appear after AM_INIT_AUTOMAKE
# Make sure we diagnose non-existent AC_CONFIG_AUX_DIR names.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# Make sure we diagnose unportable AC_CONFIG_AUX_DIR names.
-. ./defs || Exit 1
+. ./defs || exit 1
plan_ 4
# Test to make sure AC_CONFIG_AUX_DIR works correctly.
-. ./defs || Exit 1
+. ./defs || exit 1
# The "./." is here so we don't have to mess with subdirs.
cat > configure.ac <<END
# config auxdir.
# Keep this in sync with sister tests auxdir7.test and auxdir8.test.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# making the top-level directory the config auxdir.
# Keep this in sync with sister tests auxdir6.test and auxdir8.test.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# directory.
# Keep this in sync with sister tests auxdir6.test and auxdir7.test.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_CONFIG_FILES([subdir/Makefile])
# Copied from Gnulib's 'tests/init.sh'.
warn_ () { echo "$@" 1>&$stderr_fileno_; }
-fail_ () { warn_ "$me: failed test: $@"; Exit 1; }
-skip_ () { warn_ "$me: skipped test: $@"; Exit 77; }
-fatal_ () { warn_ "$me: hard error: $@"; Exit 99; }
-framework_failure_ () { warn_ "$me: set-up failure: $@"; Exit 99; }
+fail_ () { warn_ "$me: failed test: $@"; exit 1; }
+skip_ () { warn_ "$me: skipped test: $@"; exit 77; }
+fatal_ () { warn_ "$me: hard error: $@"; exit 99; }
+framework_failure_ () { warn_ "$me: set-up failure: $@"; exit 99; }
# For compatibility with TAP functions.
skip_all_ () { skip_ "$@"; }
{
echo "1..0 # SKIP" ${1+"$@"}
planned_=0
- Exit 0
+ exit 0
}
# bailout_ [REASON ...]
bailout_ ()
{
echo 'Bail out!' ${1+"$@"}
- Exit 99
+ exit 99
}
# fatal_ [REASON ...]
# Auxiliary script for tests on TAP support: checking testsuite summary.
-. ./defs || Exit 1
+. ./defs || exit 1
br='============================================================================'
$make_cmd check > stdout || st=$?
cat stdout
if test $expect_failure = yes; then
- test $st -gt 0 || Exit 1
+ test $st -gt 0 || exit 1
else
- test $st -eq 0 || Exit 1
+ test $st -eq 0 || exit 1
fi
$PERL "$am_testauxdir"/extract-testsuite-summary.pl stdout >summary.got \
|| fatal_ "cannot extract testsuite summary"
else
compare=diff
fi
- $compare summary.exp summary.got || Exit 1
+ $compare summary.exp summary.got || exit 1
}
if test $use_colors = yes; then
# Lots of non-failures (300 per kind).
(cat tap && cat tap && cat tap) > all.test
-test $(wc -l <all.test) -eq 900 || Exit 99 # Sanity check.
+test $(wc -l <all.test) -eq 900 || exit 99 # Sanity check.
echo 1..900 >> all.test # Test plan.
do_check --pass <<END
$success_header
# 1 failure and lots of non-failures means failure.
(cat tap && echo "not ok" && cat tap) > all.test
-test $(wc -l <all.test) -eq 601 || Exit 99 # Sanity check.
+test $(wc -l <all.test) -eq 601 || exit 99 # Sanity check.
echo 1..601 >> all.test # Test plan.
do_check --fail <<END
$failure_header
# 1 error and lots of non-failures means failure.
(cat tap && sed 30q tap && echo 'Bail out!') > all.test
-test $(wc -l <all.test) -eq 331 || Exit 99 # Sanity check.
+test $(wc -l <all.test) -eq 331 || exit 99 # Sanity check.
echo 1..331 >> all.test # Test plan.
do_check --fail <<END
$failure_header
esac
}
-# This is used in 'Exit' and in the exit trap. See comments in the latter
-# for more information,
+# This is used in '_am_exit' and in the exit trap. See comments in
+# the latter for more information.
am__test_skipped=no
# We use a trap below for cleanup. This requires us to go through
# hoops to get the right exit status transported through the signal.
-# So use "Exit STATUS" instead of "exit STATUS" inside of the tests.
# Turn off errexit here so that we don't trip the bug with OSF1/Tru64
-# sh inside this function.
-Exit ()
+# sh inside this function (FIXME: is this still relevant now that we
+# require a POSIX shell?).
+_am_exit ()
{
set +e
# See comments in the exit trap for the reason we do this.
test 77 = $1 && am__test_skipped=yes
- (exit $1); exit $1
+ # Spurious escaping to ensure we do not call our 'exit' alias.
+ (\exit $1); \exit $1
}
+alias exit=_am_exit
if test $am_using_tap = yes; then
am_funcs_file=tap-functions.sh
if test -f "$am_testauxdir/$am_funcs_file"; then
. "$am_testauxdir/$am_funcs_file" || {
echo "$me: error sourcing $am_testauxdir/$am_funcs_file" >&2
- Exit 99
+ exit 99
}
else
echo "$me: $am_testauxdir/$am_funcs_file not found" >&2
- Exit 99
+ exit 99
fi
unset am_funcs_file
cat stderr >&2
cat stdout
if test $am_using_tap != yes; then
- test $am__got_rc -eq $am__exp_rc || Exit 1
+ test $am__got_rc -eq $am__exp_rc || exit 1
return
fi
if test -z "$am__desc"; then
grep_configure_help ()
{
./configure --help > am--all-help \
- || { cat am--all-help; Exit 1; }
+ || { cat am--all-help; exit 1; }
cat am--all-help
extract_configure_help "$1" am--all-help > am--our-help \
- || { cat am--our-help; Exit 1; }
+ || { cat am--our-help; exit 1; }
cat am--our-help
- $EGREP "$2" am--our-help || Exit 1
+ $EGREP "$2" am--our-help || exit 1
}
# using_gmake
am_keeping_testdirs || rm_rf_ $testSubDir
set +x
echo "$me: exit $exit_status"
- exit $exit_status
+ # Spurious escaping to ensure we do not call our "exit" alias.
+ \exit $exit_status
' 0
trap "fatal_ 'caught signal SIGHUP'" 1
trap "fatal_ 'caught signal SIGINT'" 2
# testsuite output, packages with and without bug-report addresses,
# testsuites in subdirectories, ...)
-. ./defs || Exit 1
+. ./defs || exit 1
case $use_colors in
yes)
eval "env $tests $xfail_tests \$MAKE -e check > stdout || st=\$?"
cat stdout
if $expect_failure; then
- test $st -gt 0 || Exit 1
+ test $st -gt 0 || exit 1
else
- test $st -eq 0 || Exit 1
+ test $st -eq 0 || exit 1
fi
$PERL "$am_testauxdir"/extract-testsuite-summary.pl stdout >summary.got \
|| fatal_ "cannot extract testsuite summary"
else
compare=diff
fi
- $compare summary.exp summary.got || Exit 1
+ $compare summary.exp summary.got || exit 1
}
br='============================================================================'
# Test usage of AM_INIT_AUTOMAKE with two or three arguments, for
# backward-compatibility.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am <<'END'
.PHONY: test display
# third argument is empty or non-existent.
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
# A trick to make the test run muuuch faster, by avoiding repeated
# runs of aclocal (one order of magnitude improvement in speed!).
cat config.h # For debugging.
# The non-empty third argument should prevent PACKAGE and VERSION
# from being AC_DEFINE'd.
- $EGREP 'pkg(name|version)' config.h && Exit 1
+ $EGREP 'pkg(name|version)' config.h && exit 1
# This is required because even relatively-recent versions of the
# BSD shell wrongly exit when the 'errexit' shell flag is active if
# the last command of a compound statement fails, even if it should
# AM_INIT_AUTOMAKE are both given two or more arguments.
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
empty=''
diff exp got
-$FGREP am_foo_quux Makefile.in Makefile configure config.status && Exit 1
+$FGREP am_foo_quux Makefile.in Makefile configure config.status && exit 1
### Done ###
# Backward-compatibility: AC_OUTPUT with arguments.
-. ./defs || Exit 1
+. ./defs || exit 1
mkdir sub
: > Makefile.am
am_serial_tests=yes
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
makefiles='hacky/Makefile src/Makefile data/Makefile tests/Makefile'
required=cc
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
# Anyone doing something like this in a real-life package probably
# deserves to be killed.
# Test for "\" problems. Bug report from Joerg-Martin Schwarz.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
$ACLOCAL
$AUTOMAKE
-grep '^_SOURCE' Makefile.in && Exit 1
-Exit 0
+grep '^_SOURCE' Makefile.in && exit 1
+exit 0
# We must skip the backslash, not complain about './\' not existing.
# Reported by Rick Scott <rwscott@omnisig.com>
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
SUBDIRS = \
# Make sure we diagnose trailing backslash at the end of a file.
# Report from Akim Demaile <akim@epita.fr>.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
foo = \
# Make sure we diagnose and fix white spaces following backslash.
# Report from Peter Muir.
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_OUTPUT >>configure.ac
# Test to make sure that line number and file name in error message
# referring to variable is always correct.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << END
AC_INIT([$me], [1.0])
: > Makefile.am
-$ACLOCAL || Exit 1
+$ACLOCAL || exit 1
AUTOMAKE_fails
grep 'configure.ac:3:.*info_TEXINFOS' stderr
# Test to make sure bad options cause error.
-. ./defs || Exit 1
+. ./defs || exit 1
echo 'AUTOMAKE_OPTIONS = zardoz' > Makefile.am
# Test to make sure that programs with bad names are properly
# transformed.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Make sure block comments are not double-spaced.
# Report from François Pinard.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
#START
$ACLOCAL
$AUTOMAKE
-(sed -e '/^#START/,/^#END/ !d' Makefile.in | grep -v '^#') && Exit 1
-Exit 0
+(sed -e '/^#START/,/^#END/ !d' Makefile.in | grep -v '^#') && exit 1
+exit 0
# Regression test for install-recursive appearing in a non recursive Makefile.
# Report from Bruno Haible.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
noinst_SCRIPTS = hostname
$ACLOCAL
$AUTOMAKE
-grep 'install-recursive' Makefile.in && Exit 1
+grep 'install-recursive' Makefile.in && exit 1
:
required=cc
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << 'END'
AC_INIT([GNU C Demo], [22.3.2], [bug-automake@gnu.org])
# Test to make sure things that cannot be dist_'ed are diagnosed.
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_OUTPUT >>configure.ac
AUTOMAKE_fails
test 2 -eq $(grep -c 'dist.*forbidden' stderr)
-Exit 0
+exit 0
# PR 511: Make sure we warn about e.g. AC_CONFIG_FILES([./gmakefile]),
# as not all make implementations treat 'file' and './file' equally.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# Test to make sure that name canonicalization error works.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Test to make sure name canonicalization happens for texinfo.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
info_TEXINFOS = zar-doz.texi
$ACLOCAL
$AUTOMAKE
-grep zar-doz_TEXINFOS Makefile.in && Exit 1
+grep zar-doz_TEXINFOS Makefile.in && exit 1
:
# Yet another canonicalization test.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
$ACLOCAL
$AUTOMAKE
-$FGREP 'perm_number.c' Makefile.in && Exit 1
+$FGREP 'perm_number.c' Makefile.in && exit 1
:
# Test to make sure name canonicalization happens for static libraries.
# Keep this in sync with sister test 'canon6.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
$ACLOCAL
$AUTOMAKE
-grep '^ *libx-y.*=' Makefile.in && Exit 1
+grep '^ *libx-y.*=' Makefile.in && exit 1
:
# Test to make sure that we allow variable names starting in
# non-letters. Whatever that might mean.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Keep this in sync with sister test 'canon4.test'.
required='libtoolize'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
$ACLOCAL
$AUTOMAKE -a
-grep '^ *libx-y.*=' Makefile.in && Exit 1
+grep '^ *libx-y.*=' Makefile.in && exit 1
:
# Stress test on canonicalization.
required='cc libtool libtoolize'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Check that canonicalization does not transliterate the '@' charactrer.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# The first grep is here mostly for debugging.
grep foob.rquux Makefile.in
grep foob@rquux Makefile.in
-grep 'foob[^@]rquux' Makefile.in && Exit 1
+grep 'foob[^@]rquux' Makefile.in && exit 1
:
# understand '-c -o'.
required=gcc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Make sure Automake requires AM_PROG_CC_C_O when either per-targets
# flags or subdir-objects are used.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<EOF
AC_PROG_CC
# Test to make sure 'compile' doesn't call 'mv SRC SRC'.
required=gcc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
cd build
../configure
-$MAKE 2>stderr || { cat stderr >&2; Exit 1; }
+$MAKE 2>stderr || { cat stderr >&2; exit 1; }
cat stderr >&2
-grep 'mv.*the same file' stderr && Exit 1
+grep 'mv.*the same file' stderr && exit 1
:
# even when the Automake-generated parallel testsuite harness failed.
# See automake bug#9245.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
./configure
# Some make implementations don't grok the '-j' option.
-$MAKE -j1 || Exit 77
+$MAKE -j1 || exit 77
for j in '' -j1 -j2; do
- $MAKE $j check && Exit 1
- TESTS=foo.test $MAKE $j -e check && Exit 1
- $MAKE $j recheck && Exit 1
- TEST_LOGS=foo.log $MAKE $j -e check && Exit 1
+ $MAKE $j check && exit 1
+ TESTS=foo.test $MAKE $j -e check && exit 1
+ $MAKE $j recheck && exit 1
+ TEST_LOGS=foo.log $MAKE $j -e check && exit 1
rm -f test-suite.log
- $MAKE $j test-suite.log && Exit 1
- test -f test-suite.log || Exit 1
+ $MAKE $j test-suite.log && exit 1
+ test -f test-suite.log || exit 1
done
:
# environment of the tests. This is documented in the manual.
# For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || Exit 1
+. ./defs || exit 1
show_info ()
{
cd ../BuildDir
../SrcDir/configure
-$MAKE check || { show_info; Exit 1; }
+$MAKE check || { show_info; exit 1; }
show_info
:
# See also related test 'parallel-tests-fd-redirect.test'.
# For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
test $st -eq 0
grep '[ /]foo\.test: foofoofoo$' stdout
grep '[ /]foo\.test: barbarbar$' stderr
- grep 'this line' four && Exit 1
+ grep 'this line' four && exit 1
grep '^3333$' four
grep '^this line will not be removed$' five
grep '^ok ok ok$' five
- $EGREP '(foofoofoo|barbarbar|3333|ok ok ok|this line)' foo.log && Exit 1
+ $EGREP '(foofoofoo|barbarbar|3333|ok ok ok|this line)' foo.log && exit 1
:
}
# used.
am_serial_tests=yes
-. ./defs || Exit 1
+. ./defs || exit 1
echo 'TESTS = foo.test' > Makefile.am
for opts in '' '-a' '--add-missing --copy'; do
$AUTOMAKE $opts
- $FGREP 'test-driver' Makefile.in && Exit 1
- find . | $FGREP 'test-driver' && Exit 1
+ $FGREP 'test-driver' Makefile.in && exit 1
+ find . | $FGREP 'test-driver' && exit 1
: For shells with busted 'set -e'.
done
# For gen-testsuite-part: ==> try-with-serial-tests <==
required='cc native'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# See also sister test 'check-subst-prog.test'.
# For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_SUBST([script_tests], ['subst-pass-script.sh subst-xfail-script.sh'])
# well as in builddir, and that is prefers those in the builddir.
# For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
END
chmod a+x bar.test
-$MAKE check >out 2>&1 || { cat out; Exit1; }
+$MAKE check >out 2>&1 || { cat out; exit 1; }
cat out
# The simple-tests driver does not strip VPATH components from
# the name of the test, but the parallel-tests driver should.
if test x"$am_serial_tests" = x"yes"; then
grep '^PASS: .*foo\.test *$' out
else
- grep '\.\./foo' out && Exit 1
+ grep '\.\./foo' out && exit 1
grep '^PASS: foo\.test *$' out
fi
grep '^PASS: bar\.test *$' out
rm -f test-suite.log foo.log bar.log
-FOO_EXIT_STATUS=1 $MAKE check >out 2>&1 && { cat out; Exit1; }
+FOO_EXIT_STATUS=1 $MAKE check >out 2>&1 && { cat out; exit 1; }
cat out
# The simple-tests driver does not strip VPATH components from
# the name of the test, but the parallel-tests driver should.
if test x"$am_serial_tests" = x"yes"; then
grep '^FAIL: .*foo\.test *$' out
else
- grep '\.\./foo' out && Exit 1
+ grep '\.\./foo' out && exit 1
grep '^FAIL: foo\.test *$' out
fi
grep '^PASS: bar\.test *$' out
# Check that if the same test is present in srcdir and builddir,
# the one in builddir is preferred.
cp bar.test foo.test
-FOO_EXIT_STATUS=1 $MAKE check >out 2>&1 || { cat out; Exit1; }
+FOO_EXIT_STATUS=1 $MAKE check >out 2>&1 || { cat out; exit 1; }
cat out
grep '^PASS: foo\.test *$' out
grep '^PASS: bar\.test *$' out
# Test Automake style tests.
# For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
TESTS = frob.test
$AUTOMAKE
grep 'check-TESTS.*:' Makefile.in
-grep 'check-DEJAGNU' Makefile.in && Exit 1
+grep 'check-DEJAGNU' Makefile.in && exit 1
# 'check-TESTS' is phony.
sed -n '/^\.PHONY:/,/^$/p' Makefile.in | $EGREP '(^| )check-TESTS($| )'
# This test only makes sense for the older serial testsuite driver.
am_serial_tests=yes
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
env TESTS='pass skip xfail' $MAKE -e check
$MAKE check
:
-) >stdout || { cat stdout; Exit 1; }
+) >stdout || { cat stdout; exit 1; }
cat stdout
-grep '1 [tT]ests' stdout && Exit 1
-grep '[02-9] [tT]est ' stdout && Exit 1
-grep '1 .* were ' stdout && Exit 1
-grep '[02-9].* was .*run' stdout && Exit 1
-grep 'All 1 ' stdout && Exit 1
-$EGREP '1 (un)?expected (failures|passes)' stdout && Exit 1
-$EGREP '[^1] (un)?expected (failure|pass)\)' stdout && Exit 1
+grep '1 [tT]ests' stdout && exit 1
+grep '[02-9] [tT]est ' stdout && exit 1
+grep '1 .* were ' stdout && exit 1
+grep '[02-9].* was .*run' stdout && exit 1
+grep 'All 1 ' stdout && exit 1
+$EGREP '1 (un)?expected (failures|passes)' stdout && exit 1
+$EGREP '[^1] (un)?expected (failure|pass)\)' stdout && exit 1
:
# Check skip summary.
# For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
./configure
-env TESTS=skip $MAKE -e check >stdout || { cat stdout; Exit 1; }
+env TESTS=skip $MAKE -e check >stdout || { cat stdout; exit 1; }
cat stdout
if test x"$am_serial_tests" = x"yes"; then
- grep '1.*passed' stdout && Exit 1
+ grep '1.*passed' stdout && exit 1
: For shells with buggy 'set -e'.
else
count_test_results total=1 pass=0 fail=0 skip=1 xfail=0 xpass=0 error=0
fi
-env TESTS="skip skip2" $MAKE -e check >stdout || { cat stdout; Exit 1; }
+env TESTS="skip skip2" $MAKE -e check >stdout || { cat stdout; exit 1; }
cat stdout
if test x"$am_serial_tests" = x"yes"; then
- grep '2.*passed' stdout && Exit 1
+ grep '2.*passed' stdout && exit 1
: For shells with buggy 'set -e'.
else
count_test_results total=2 pass=0 fail=0 skip=2 xfail=0 xpass=0 error=0
# For gen-testsuite-part: ==> try-with-serial-tests <==
required=runtest
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
mv -f config-status.sav config.status
./config.status
- NAIL=screw $MAKE check && Exit 1
+ NAIL=screw $MAKE check && exit 1
test -f hammer.log
test -f hammer.sum
test -f spanner.log
test -f spanner.sum
grep 'FAIL: test_hammer' hammer.sum
- grep 'FAIL:' spanner.sum && Exit 1
+ grep 'FAIL:' spanner.sum && exit 1
- B_EXIT_STATUS=1 $MAKE check && Exit 1
+ B_EXIT_STATUS=1 $MAKE check && exit 1
if test x"$am_serial_tests" != x"yes"; then
cat test-suite.log
cat a.log
grep '^b\.test: exit status: 1$' b.log
grep '^FAIL: b$' test-suite.log
grep '^b\.test: exit status: 1$' test-suite.log
- grep '^a\.test' test-suite.log && Exit 1
+ grep '^a\.test' test-suite.log && exit 1
: For shells with busted 'set -e'.
fi
- CHECKLOCAL_EXIT_STATUS=1 $MAKE check && Exit 1
+ CHECKLOCAL_EXIT_STATUS=1 $MAKE check && exit 1
grep 'check-local failed :-(' local.log
# Do not trust the exit status of 'make -k'.
test -f spanner.log
test -f spanner.sum
grep 'FAIL: test_hammer' hammer.sum
- grep 'FAIL:' spanner.sum && Exit 1
+ grep 'FAIL:' spanner.sum && exit 1
if test x"$am_serial_tests" != x"yes"; then
cat test-suite.log
cat a.log
grep '^b\.test: exit status: 23$' b.log
grep '^FAIL: b$' test-suite.log
grep '^b\.test: exit status: 23$' test-suite.log
- grep '^a\.test' test-suite.log && Exit 1
+ grep '^a\.test' test-suite.log && exit 1
: For shells with busted 'set -e'.
fi
grep 'check-local failed :-(' local.log
# Test Automake style tests.
# For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_CONFIG_FILES([dir/Makefile])
$AUTOMAKE
./configure
-$MAKE check >stdout || { cat stdout; Exit 1; }
+$MAKE check >stdout || { cat stdout; exit 1; }
cat stdout
grep '^PASS: subrun\.sh *$' stdout
-grep 'PASS.*echo\.sh' stdout && Exit 1
+grep 'PASS.*echo\.sh' stdout && exit 1
# 'check' should depend directly on 'check-am' (similar tests are
# in check.test and check3.test).
# PR/359.
# For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_CONFIG_FILES([dir/Makefile])
$AUTOMAKE -a
./configure --prefix "$(pwd)/inst"
-$MAKE check >stdout || { cat stdout; Exit 1; }
+$MAKE check >stdout || { cat stdout; exit 1; }
cat stdout
grep '^PASS: subrun\.sh *$' stdout
-grep 'PASS.*echo\.sh' stdout && Exit 1
+grep 'PASS.*echo\.sh' stdout && exit 1
# check should depend directly on $(BUILT_SOURCES) (similar tests
# are in check.test and check2.test).
# Make sure 'make -k check' processes all directories.
# For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_CONFIG_FILES([dir/Makefile])
./configure --prefix "$(pwd)/inst"
-$MAKE check >stdout && { cat stdout; Exit 1; }
+$MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
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)
# For gen-testsuite-part: ==> try-with-serial-tests <==
required='cc native'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
./configure
$MAKE check
test -f ok
-EXEEXT=.bin $MAKE -e print-tests >stdout || { cat stdout; Exit 1; }
+EXEEXT=.bin $MAKE -e print-tests >stdout || { cat stdout; exit 1; }
cat stdout
$FGREP 'BEG: one.bin two.bin :END' stdout
# No am__EXEEXT_* variable is needed.
-grep '_EXEEXT_[1-9]' Makefile.in && Exit 1
+grep '_EXEEXT_[1-9]' Makefile.in && exit 1
$FGREP 'TESTS = $(check_PROGRAMS)' Makefile.in
:
# Also test that Solaris make VPATH rewriting is honored
# For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
# For gen-testsuite-part: ==> try-with-serial-tests <==
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
./configure
$MAKE check
-EXEEXT=.bin $MAKE -e print-xfail-tests >stdout || { cat stdout; Exit 1; }
+EXEEXT=.bin $MAKE -e print-xfail-tests >stdout || { cat stdout; exit 1; }
cat stdout
$FGREP 'BEG: a.bin b c.bin d.bin :END' stdout
# For gen-testsuite-part: ==> try-with-serial-tests <==
required='cc native'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
./configure
AM_COLOR_TESTS=always $MAKE check >stdout 2>stderr &&
- { cat stdout; cat stderr >&2; Exit 1; }
+ { cat stdout; cat stderr >&2; exit 1; }
cat stdout
cat stderr >&2
grep 'XPASS.* foo$' stdout
grep 'XFAIL.* sub/baz' stdout
# 'parallel-tests' should not add circular dependencies.
# Look for known warnings from a couple of 'make' implementations.
-grep -i 'circular.*dependency' stderr && Exit 1
-grep -i 'graph cycles' stderr && Exit 1
+grep -i 'circular.*dependency' stderr && exit 1
+grep -i 'graph cycles' stderr && exit 1
$MAKE distclean
mkdir build
cd build
../configure
-$MAKE check >stdout && { cat stdout; Exit 1; }
+$MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
# Note: we are not grepping for the space in the lines from the 'foo'
# tests, due to the Solaris make VPATH rewriting (if we fix that, we
# Test for bug where check target doesn't depend on all.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
bin_SCRIPTS = derived
# Test to make sure a clean target depends on previous one.
-. ./defs || Exit 1
+. ./defs || exit 1
: > Makefile.am
# Make sure distclean works in cygnus mode.
# Report from Daniel Jacobowitz.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_MAINTAINER_MODE
# Test that := definitions produce warnings, but otherwise work.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
ICONS := $(wildcard *.xbm)
# Test that := in var substitutions works.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
# Test that := definitions work as expected at make time.
required=GNUmake
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
# Test for bug reported by Nyul Laszlo. When using the ":" syntax in
# AC_OUTPUT, Automake fails to find the correct file.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
AC_CONFIG_FILES([foo.h:foo.hin])
# Make sure ":" works with files automake generates.
# See also sister test 'colon3.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac <<END
AC_INIT([$me], [1.0])
$FGREP 'zardoz.in' zardoz.in
sed -e 's|zardoz\.am|zrdz.am|g' \
-e 's|zardoz\.in|zrdz.in|g' \
- <zardoz.in | $FGREP 'zardoz' && Exit 1
+ <zardoz.in | $FGREP 'zardoz' && exit 1
# The configure-generated Makefile should depend on zardoz.in, two.in and
# three.in. The automake-generated zardoz.in should depend on zardoz.am.
$MAKE dummy
# Again, make sure that the generated Makefile do not unduly
# refer to 'zardoz' .
-$MAKE -n zardoz && Exit 1
+$MAKE -n zardoz && exit 1
$sleep
cat >> zardoz.am <<END
# This test is for multiple ":"s.
# See also sister test 'colon2.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac <<END
AC_INIT([$me], [1.0])
$FGREP 'zardoz.in' zardoz.in
sed -e 's|zardoz\.am|zrdz.am|g' \
-e 's|zardoz\.in|zrdz.in|g' \
- <zardoz.in | $FGREP 'zardoz' && Exit 1
+ <zardoz.in | $FGREP 'zardoz' && exit 1
# The configure-generated Makefile should depend on zardoz.in, two.in and
# three.in. The automake-generated zardoz.in should depend on zardoz.am.
$MAKE dummy
# Again, make sure that the generated Makefile do not unduly
# refer to 'zardoz' .
-$MAKE -n zardoz && Exit 1
+$MAKE -n zardoz && exit 1
$sleep
cat >> zardoz.am <<END
# rebuild rules.
# Test from Maciej W. Rozycki.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<END
AC_CONFIG_FILES([zardoz:one:two:three])
# The rule should regenerate the file "zardoz", not a meaningless
# file "'zardoz:one:two".
-$FGREP 'zardoz:one:two' Makefile.in && Exit 1
-Exit 0
+$FGREP 'zardoz:one:two' Makefile.in && exit 1
+exit 0
# Another multi-":" test, this time from Doug Evans.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac <<END
AC_INIT([$me], [1.0])
./configure
-grep '=GrEpMe_am=' Makefile && Exit 1 # Sanity check.
-grep '=GrEpMe_dep=' Makefile && Exit 1 # Likewise.
+grep '=GrEpMe_am=' Makefile && exit 1 # Sanity check.
+grep '=GrEpMe_dep=' Makefile && exit 1 # Likewise.
$MAKE test-distcommon
$MAKE test-distdir
# Yet another multi-":" test, this time from Ken Pizzini.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# These are older "grepping checks", kept mostly for backward-compatibility.
# They might (unlikely, but possibly) require updating when automake
# internals are changed. Just relax or remove if they become too fragile.
-$EGREP 'Makefile:.*(demo|version)' demo/Makefile.in && Exit 1
+$EGREP 'Makefile:.*(demo|version)' demo/Makefile.in && exit 1
grep 'version\.good:.*version\.gin' demo/Makefile.in
$AUTOCONF
# version.good should depend on version.gin.
rm -f version.good
- $MAKE version.good >output 2>&1 && { cat output; Exit 1; }
+ $MAKE version.good >output 2>&1 && { cat output; exit 1; }
cat output
# Try to verify that we errored out for the right reason.
$FGREP version.gin output
# Another test for a failing ":" in AC_OUTPUT.
# Report from Maciej Stachowiak.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << 'END'
AC_INIT([colon7], [1.0])
$AUTOMAKE
# Should nowhere refer to 'bar.in'.
-$FGREP 'bar.in' Makefile.in subdir/Makefile.in && Exit 1
+$FGREP 'bar.in' Makefile.in subdir/Makefile.in && exit 1
$AUTOCONF
./configure
required='grep-nonprint'
# For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || Exit 1
+. ./defs || exit 1
# Escape '[' for grep, below.
red="$esc\[0;31m"
cat stdout | grep '===='
cat stdout | grep '[Ss]ee .*test-suite\.log'
cat stdout | grep '[Tt]estsuite summary'
- ) | grep "$esc" && Exit 1
+ ) | grep "$esc" && exit 1
: For shells with broken 'set -e'
else
- cat stdout | grep "$esc" && Exit 1
+ cat stdout | grep "$esc" && exit 1
: For shells with broken 'set -e'
fi
}
# Forced colorization should take place also with non-ANSI terminals;
# hence the "TERM=dumb" definition.
TERM=dumb AM_COLOR_TESTS=always $MAKE -e check >stdout \
- && { cat stdout; Exit 1; }
+ && { cat stdout; exit 1; }
cat stdout
test_color
- TERM=ansi $MAKE -e check >stdout && { cat stdout; Exit 1; }
+ TERM=ansi $MAKE -e check >stdout && { cat stdout; exit 1; }
cat stdout
test_no_color
required='grep-nonprint'
# For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || Exit 1
+. ./defs || exit 1
# Escape '[' for grep, below.
red="$esc\[0;31m"
std="$esc\[m"
# This test requires a working a working 'expect' program.
-# Creative quoting required to avoid spurious maintainer-check failure.
-(set +e; expect -c 'exit ''77'; test $? -eq 77) \
+(set +e; expect -c 'exit 77'; test $? -eq 77) \
|| skip_ "requires a working expect program"
# Also, if the $MAKE program fails to consider the standard output as a
cat stdout | grep '===='
cat stdout | grep '[Ss]ee .*test-suite\.log'
cat stdout | grep '[Tt]estsuite summary'
- ) | grep "$esc" && Exit 1
+ ) | grep "$esc" && exit 1
: For shells with broken 'set -e'
else
- cat stdout | grep "$esc" && Exit 1
+ cat stdout | grep "$esc" && exit 1
: For shells with broken 'set -e'
fi
}
$srcdir/configure
TERM=ansi MAKE=$MAKE expect -f $srcdir/expect-make >stdout \
- || { cat stdout; Exit 1; }
+ || { cat stdout; exit 1; }
cat stdout
test_color
TERM=dumb MAKE=$MAKE expect -f $srcdir/expect-make >stdout \
- || { cat stdout; Exit 1; }
+ || { cat stdout; exit 1; }
cat stdout
test_no_color
AM_COLOR_TESTS=no MAKE=$MAKE expect -f $srcdir/expect-make >stdout \
- || { cat stdout; Exit 1; }
+ || { cat stdout; exit 1; }
cat stdout
test_no_color
# Make sure comments following trailing backslashes are diagnosed.
# Report from Harald Dunkel.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
SUBDIRS = foo \
# comments following a trailing backslash, even when the combination
# follows a variable assignment that is preceded by a comment.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
# initial comment
# Make sure that '#' as start of word in AUTOMAKE_OPTIONS means
# comment.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = #no such option
# Make sure comment recognition works in PROGRAMS. Report from Mark
# Galassi.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
$ACLOCAL
$AUTOMAKE
-grep '^image_proc' Makefile.in && Exit 1
-Exit 0
+grep '^image_proc' Makefile.in && exit 1
+exit 0
# shell, which in turn can't find '#' as a command.
# Sigh. Some vendors must be destroyed.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
install-data-local:
# Make sure commented variables are output near their comments.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'EOF'
AC_OUTPUT
# Test for PR/280.
# (Automake should complain about trailing backslashes in comments.)
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'EOF'
AC_OUTPUT
# Automake 1.6.1 seems to have a problem parsing comments that use
# '\' to span multiple lines.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'EOF'
AC_OUTPUT
# Make sure comment for conditional variables are output near the
# corresponding conditional definitions.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'EOF'
AM_CONDITIONAL([COND], [true])
# Make sure += does not append to a comment.
# Report from Stepan Kasal.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'EOF'
AM_CONDITIONAL([COND1], [true])
# Make sure ##-comments are ignored in variable definitions.
# Report from Julien Sopena.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'EOF'
TESTS = \
}' -e '/^TESTS =/ p' Makefile.in > tests
grep '3\.test' tests
-grep '##' tests && Exit 1
-grep '4\.test' tests && Exit 1
+grep '##' tests && exit 1
+grep '4\.test' tests && exit 1
grep '5\.test' tests
# Make sure Automake ignores in-line comments when using variables,
# but preserve them in the output.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
AC_OUTPUT
# Make sure 'compile' preserves spaces in its arguments.
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
get_shell_script compile
# Make sure 'compile' deals correctly with Windows-style paths.
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
get_shell_script compile
am_create_testdir=empty
required=xsi-lib-shell
-. ./defs || Exit 1
+. ./defs || exit 1
get_shell_script compile
# with respect to absolute paths.
required='cl'
-. ./defs || Exit 1
+. ./defs || exit 1
get_shell_script compile
# Make sure the file name translation in the 'compile' script works
# correctly
-. ./defs || Exit 1
+. ./defs || exit 1
get_shell_script compile
res=$(./compile ./cl -L${sp}"$cwd" | sed -e 's/-link -LIBPATH://')
case $res in
?:[\\/]*) ;;
- *) Exit 1 ;;
+ *) exit 1 ;;
esac
done
am_create_testdir=empty
required=xsi-lib-shell
-. ./defs || Exit 1
+. ./defs || exit 1
get_shell_script compile
# mixed source objects.
# (copied from compile_f_c_cxx.test) Mike Nolta <mrnolta@princeton.edu>
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# mixed source objects.
# Matthew D. Langston <langston@SLAC.Stanford.EDU>
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Check basic use of conditionals.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_CONDITIONAL([TEST], [true])
# Check basic use of conditionals.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_CONDITIONAL([TEST], [true])
$ACLOCAL
$AUTOMAKE
-grep '^TEST_FALSE' Makefile.in && Exit 1
-grep '^TEST_TRUE' Makefile.in && Exit 1
+grep '^TEST_FALSE' Makefile.in && exit 1
+grep '^TEST_TRUE' Makefile.in && exit 1
grep '^@TEST_TRUE@VAR = true$' Makefile.in
grep '^@TEST_FALSE@VAR = false$' Makefile.in
# Test for bug in conditionals. From Raja R Harinath.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# This checks that, if LDADD is set from a conditional variable
# and an AC_SUBST, the _DEPENDENCIES variable is set correctly.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_SUBST([CC], [false])
# Test for bug in conditionals.
# Report from Lars J. Aas.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Test for bug in conditionals.
# Report from Robert Boehne.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Regression test for conditionally defined overriding of automatic rules.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# references.
# Report from Richard Boulton.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_CONDITIONAL([COND1], [true])
# according to a conditional.
# Report from Richard Boulton.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Regression test for substitution references to conditional variables.
# Report from Richard Boulton.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_CONDITIONAL([COND1], [true])
# Regression test for substitution references to conditional variables.
# Report from Richard Boulton.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_SUBST([CC], [false])
# Regression test for recursion handling in substitution references to
# conditional variables.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Check for use of = and += in different conditions.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_CONDITIONAL([COND1], [true])
# Regression test for bug when sources listed in conditional.
# Report from Richard Boulton. PR/326.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
CC=false; AC_SUBST([CC])
# Check that conditional redefinitions of AC_SUBST'ed variables are detected.
# Report from Patrik Weiskircher.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<EOF
AM_CONDITIONAL([COND], [true])
# Check that conditional redefinitions of AC_SUBST'ed variables are detected.
# Report from Patrik Weiskircher.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<EOF
AC_SUBST([foo], [bar])
# Check that conditional primaries can use non-conditional directories.
# From Pavel Roskin.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac << 'EOF'
AM_CONDITIONAL([USE_FOO], [true])
# Check that non-conditional primaries can use conditional directories.
# Reported by Juergen Keil.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac << 'EOF'
AM_CONDITIONAL([USE_FOO], [true])
# Check that non-conditional primaries cannot use directories defined
# in some conditions (but not others).
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac << 'EOF'
AM_CONDITIONAL([USE_FOO], [true])
$ACLOCAL
AUTOMAKE_fails
-grep ' USE_FOO' stderr && Exit 1
+grep ' USE_FOO' stderr && exit 1
grep '!USE_FOO' stderr
:
# Check that conditional primaries can use directories defined
# in the same conditions (but not others).
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac << 'EOF'
AM_CONDITIONAL([USE_FOO], [true])
# Test sources listed in conditional.
# Report from Rob Savoye <rob@cygnus.com>, and Lars J. Aas.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# For PR/352: make sure we support bin_PROGRAMS being defined conditionally.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'EOF'
AM_CONDITIONAL([C1], [test -z "$two"])
# Make sure we define conditional _DEPENDENCIES correctly.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'EOF'
AC_SUBST([CC], [false])
# Make sure the user can override a conditional _DEPENDENCIES.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'EOF'
AM_CONDITIONAL([C1], [test -z "$two"])
# correctly.
# Report from Ralf Corsepius.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'EOF'
AM_CONDITIONAL([INC], [test -z "$two"])
# Check for _DEPENDENCIES definition with conditional _LDADD.
# Report from Elena A. Vengerova.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'EOF'
AM_CONDITIONAL([TWO], [test -n "$two"])
$AUTOMAKE
./configure
-$MAKE dep-test1 >stdout || { cat stdout; Exit 1; }
+$MAKE dep-test1 >stdout || { cat stdout; exit 1; }
cat stdout
$FGREP 'BEG: one.z somethingelse.a :END' stdout
-$MAKE dep-test2 >stdout || { cat stdout; Exit 1; }
+$MAKE dep-test2 >stdout || { cat stdout; exit 1; }
cat stdout
$FGREP 'BEG: three.z :END' stdout
./configure two=2
-$MAKE dep-test1 >stdout || { cat stdout; Exit 1; }
+$MAKE dep-test1 >stdout || { cat stdout; exit 1; }
cat stdout
$FGREP 'BEG: two.z somethingelse.a :END' stdout
-$MAKE dep-test2 >stdout || { cat stdout; Exit 1; }
+$MAKE dep-test2 >stdout || { cat stdout; exit 1; }
cat stdout
$FGREP 'BEG: two.z somethingelse.a :END' stdout
# Report from Roman Fietze.
required='cc lex yacc'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'EOF'
AM_CONDITIONAL([CASE_A], [test -z "$case_B"])
# Check rules output for parser defined conditionally.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'EOF'
AM_CONDITIONAL([CASE_A], [test -z "$case_B"])
# Check conditional local rules.
# Report from Simon Josefsson.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'EOF'
AM_CONDITIONAL([CASE_A], [test -n "$case_A"])
$AUTOMAKE
./configure
-$MAKE check >stdout || { cat stdout; Exit 1; }
+$MAKE check >stdout || { cat stdout; exit 1; }
cat stdout
-grep GrepMe1 stdout && Exit 1
-$MAKE install >stdout || { cat stdout; Exit 1; }
+grep GrepMe1 stdout && exit 1
+$MAKE install >stdout || { cat stdout; exit 1; }
cat stdout
grep GrepMe2 stdout
./configure case_A=1
-$MAKE check >stdout || { cat stdout; Exit 1; }
+$MAKE check >stdout || { cat stdout; exit 1; }
cat stdout
grep GrepMe1 stdout
-$MAKE install >stdout || { cat stdout; Exit 1; }
+$MAKE install >stdout || { cat stdout; exit 1; }
cat stdout
-grep GrepMe2 stdout && Exit 1
+grep GrepMe2 stdout && exit 1
:
# Check conditional variable ordering.
# Report from Ed Hartnett.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'EOF'
AM_CONDITIONAL([CASE_A], :)
# Build either as CONFIG_FILE or as PROGRAM.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
mkdir sub
$AUTOMAKE --add-missing
./configure COND=true
-$MAKE 2>stderr || { cat stderr >&2; Exit 1; }
+$MAKE 2>stderr || { cat stderr >&2; exit 1; }
cat stderr >&2
-grep 'overriding commands' stderr && Exit 1
+grep 'overriding commands' stderr && exit 1
$MAKE sure-exist
-./prog1 && Exit 1
-./sub/prog2 && Exit 1
+./prog1 && exit 1
+./sub/prog2 && exit 1
$MAKE clean
$MAKE sure-not-exist
$MAKE
$MAKE sure-exist
-./prog1 && Exit 1
-./sub/prog2 && Exit 1
+./prog1 && exit 1
+./sub/prog2 && exit 1
$MAKE distclean
./configure COND=false
-$MAKE 2>stderr || { cat stderr >&2; Exit 1; }
+$MAKE 2>stderr || { cat stderr >&2; exit 1; }
cat stderr >&2
-grep 'overriding commands' stderr && Exit 1
+grep 'overriding commands' stderr && exit 1
./prog1
./sub/prog2
$MAKE clean
# Another sources-in-conditional test. Report from Tim Goodwin.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_SUBST([CC], [false])
$AUTOMAKE -i
# We should not output useless definitions.
-grep '^@ONE_FALSE@' Makefile.in && Exit 1
-grep '^@TWO_FALSE@' Makefile.in && Exit 1
+grep '^@ONE_FALSE@' Makefile.in && exit 1
+grep '^@TWO_FALSE@' Makefile.in && exit 1
$AUTOCONF
# Test AM_COND_IF.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'END'
AC_DEFUN([FOO],
test -f file3
rm -f file1 file3
$MAKE file1 file3
-$MAKE file2 && Exit 1
+$MAKE file2 && exit 1
test -f file1
test ! -f file2
test -f file3
test -f file2
test ! -f file3
rm -f file2
-$MAKE file1 && Exit 1
+$MAKE file1 && exit 1
$MAKE file2
-$MAKE file3 && Exit 1
+$MAKE file3 && exit 1
test ! -f file1
test -f file2
test ! -f file3
# AM_COND_IF with an undefined condition should fail.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'END'
AM_COND_IF([BAD_COND], [AC_CONFIG_FILES([file1])])
AC_OUTPUT
END
-$ACLOCAL 2>stderr && { cat stderr >&2; Exit 1; }
+$ACLOCAL 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
grep '^configure\.ac:4:.*AM_COND_IF.* no such condition.*BAD_COND' stderr
# This shouldn't happen with user input, as _AM_COND_* are not documented,
# but better to be safe.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'END'
AM_CONDITIONAL([COND], [:])
# Ensure an error with underquoted usage of AM_COND_IF in configure.ac.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'END'
AM_CONDITIONAL([COND1], [:])
# Check that redefinitions of AC_SUBST'ed AM_SUBST_NOTMAKE'd variables
# are not diagnosed. See cond23.test.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<EOF
AM_CONDITIONAL([COND], [true])
$ACLOCAL
AUTOMAKE_run
-grep 'libdir was already defined' stderr && Exit 1
-grep '^libdir = ' Makefile.in && Exit 1
-Exit 0
+grep 'libdir was already defined' stderr && exit 1
+grep '^libdir = ' Makefile.in && exit 1
+exit 0
# Check that redefinitions of AC_SUBST'ed AM_SUBST_NOTMAKE'd variables
# are not diagnosed. See cond24.test.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<EOF
AC_SUBST([foo], [bar])
$ACLOCAL
AUTOMAKE_run
-grep 'foo was already defined' stderr && Exit 1
-grep '^foo =' Makefile.in && Exit 1
-Exit 0
+grep 'foo was already defined' stderr && exit 1
+grep '^foo =' Makefile.in && exit 1
+exit 0
# Ensure the right condition is listed after 'else' and 'endif'.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_CONDITIONAL([USE_A], [test x = y])
# Yet another sources-in-conditional test. Report from Tim Goodwin.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
cat stderr >&2
# Automake must fail with a proper error message.
grep 'variable.*OPT_SRC.*recursively defined' stderr
- Exit 0
+ exit 0
fi
done
# The automake process probably hung. Kill it, and exit with failure.
echo "$me: Automake process $pid hung"
kill $pid
-Exit 1
+exit 1
# Test for an odd conditional bug. Report from Matt Leach.
-. ./defs || Exit 1
+. ./defs || exit 1
echo 'AM_CONDITIONAL([FOO], [true])' >> configure.ac
# Test for an odd conditional bug. Report from Pavel Roskin.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
compat=yes
$ACLOCAL
$AUTOMAKE
-grep '^[^#].*002' Makefile.in && Exit 1
-Exit 0
+grep '^[^#].*002' Makefile.in && exit 1
+exit 0
# Test to make sure _PROGRAMS conditionals can be written in a useful
# way.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
instdir=$(pwd)/_inst || fatal_ "cannot get current directory"
# Skip the rest of the test in case of e.g. missing C compiler.
-./configure --prefix="$instdir" x=yes || Exit $?
+./configure --prefix="$instdir" x=yes || exit $?
$MAKE install
$MAKE get-built
$MAKE get-installed
# Test for bug in conditionals. From Raja R Harinath.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_CONDITIONAL([WRONG], [test x = y])
# Test for bug in conditionals.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
dnl Define a macro with the same name as the conditional to exhibit
$ACLOCAL
$AUTOCONF
-grep "meaningless;characters" configure && Exit 1
+grep "meaningless;characters" configure && exit 1
$AUTOMAKE
./configure
$MAKE test
# Keep this in sync with sister test condhook2.test.
# Report by Nik A. Melchior (PR/428).
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_CONDITIONAL([TEST], [false])
# Test install when a conditional install-*-hook is defined.
# Keep this in sync with sister test condhook.test.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_CONDITIONAL([TEST], [true])
# Make sure a conditional include statement is handled properly.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_CONDITIONAL([TOBE], [false])
$ACLOCAL
$AUTOMAKE
-grep '^target:' Makefile.in && Exit 1
+grep '^target:' Makefile.in && exit 1
grep '^@TOBE_TRUE@target:' Makefile.in
:
# Another test of conditional include statements.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_CONDITIONAL([TOBE], [false])
# Test for bug with conditional library.
# From Harlan Stenn.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_RANLIB
$ACLOCAL
$AUTOMAKE
-$FGREP librsaref.a.c Makefile.in && Exit 1
-Exit 0
+$FGREP librsaref.a.c Makefile.in && exit 1
+exit 0
# Make sure appropriate man install targets generated in all cases.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
man_MANS = foo.1 foo.2
# Make sure conditionals work with man pages.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_CONDITIONAL([COND], [test x"$FOO" = x"true"])
# Make sure that config* files are properly regenerated.
-. ./defs || Exit 1
+. ./defs || exit 1
echo "FOO = foo" > Makefile.am
sed -n '3,$p' aclocal.m4 >aclocal.m4t
mv -f aclocal.m4t aclocal.m4
$AUTOMAKE
-grep '^\$(ACLOCAL_M4):' Makefile.in && Exit 1
+grep '^\$(ACLOCAL_M4):' Makefile.in && exit 1
:
# Make sure rebuild rules work even when AC_CONFIG_FILES uses colons.
# Report from Alexander Turbov.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_CONFIG_FILES([bar/Makefile:bar/Makefile.in:Makefile.bot])
$MAKE
cd bar
-$MAKE top-rule >stdout || { cat stdout; Exit 1; }
+$MAKE top-rule >stdout || { cat stdout; exit 1; }
cat stdout
grep 'top rule' stdout
-$MAKE bot-rule >stdout || { cat stdout; Exit 1; }
+$MAKE bot-rule >stdout || { cat stdout; exit 1; }
cat stdout
grep 'bot rule' stdout
cd ..
$MAKE
cd bar
-$MAKE top-rule >stdout || { cat stdout; Exit 1; }
+$MAKE top-rule >stdout || { cat stdout; exit 1; }
cat stdout
grep 'top2 rule' stdout
-$MAKE bot-rule >stdout || { cat stdout; Exit 1; }
+$MAKE bot-rule >stdout || { cat stdout; exit 1; }
cat stdout
grep 'bot rule' stdout
cd ..
$MAKE
cd bar
-$MAKE top-rule >stdout || { cat stdout; Exit 1; }
+$MAKE top-rule >stdout || { cat stdout; exit 1; }
cat stdout
grep 'top2 rule' stdout
-$MAKE bot-rule >stdout || { cat stdout; Exit 1; }
+$MAKE bot-rule >stdout || { cat stdout; exit 1; }
cat stdout
grep 'bot2 rule' stdout
cd ..
# Make sure empty calls to AC_CONFIG_FILES or AC_CONFIG_HEADERS are diagnosed.
-. ./defs || Exit 1
+. ./defs || exit 1
# We avoid using configure.ac stub initialized by ./defs, since we need
# to keep track of line numbers (to grep for error messages).
# broken in that case.
required=GNUmake
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << END
AC_INIT([$me], [1.0])
touch Makefile.am
# Check that remake rules do truly break -- otherwise automake is
# giving a bogus warning.
-$MAKE 2>stderr && { cat stderr >&2; Exit 1; }
+$MAKE 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
grep "config\\.status:.*invalid argument.*Makefile" stderr
# Test to make sure config headers in subdirectories are cleaned.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_CONFIG_HEADER([sub/config.h:sub/config.hin])
$MAKE clean
test -f sub/stamp-h1
$MAKE distclean
-test -f sub/stamp-h1 && Exit 1
+test -f sub/stamp-h1 && exit 1
:
# Test to make sure config.h works in a subdir.
# Report from Alexandre Oliva.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_CONFIG_HEADER([include/config.h])
# Use AM_CONFIG_HEADER(subdir/config.h) to place configuration
# header in subdirectory and observe that it is not included.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_CONFIG_FILES([include/Makefile])
# Make sure we do not distribute header sources when they are built.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_SUBST([FOO], [NameToBeGrepped])
# idea is that if config.h is in a subdir, and there is no Makefile in
# that subdir, then we want to build config.h as the top level.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_CONFIG_HEADER([subdir/config.h])
# Test to make sure several config headers are allowed.
# See also sister "semantic" test 'confh8.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_CONFIG_HEADER([config.h two.h])
# Test to make sure several config headers are allowed.
# See also sister "minimalistic" test 'confh7.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_CONFIG_HEADER([one.h two.h])
# Diagnose if both configure.in and configure.ac are present, prefer
# configure.ac.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >configure.ac <<EOF
AC_INIT([$me], [1.0])
: >Makefile.am
-$ACLOCAL 2>stderr && { cat stderr >&2; Exit 1; }
+$ACLOCAL 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
grep 'configure\.ac.*configure\.in.*both present' stderr
-$ACLOCAL -Wno-error 2>stderr || { cat stderr >&2; Exit 1; }
+$ACLOCAL -Wno-error 2>stderr || { cat stderr >&2; exit 1; }
cat stderr >&2
grep 'configure\.ac.*configure\.in.*both present' stderr
grep 'proceeding.*configure\.ac' stderr
# If config.h is not used, @CONFIG_INCLUDE_SPEC@ should not appear
# in Makefile.in.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
$ACLOCAL
$AUTOMAKE
-$FGREP '@CONFIG_INCLUDE_SPEC@' Makefile.in && Exit 1
+$FGREP '@CONFIG_INCLUDE_SPEC@' Makefile.in && exit 1
:
# Test to make sure links created by AC_CONFIG_LINKS get removed with
# 'make distclean'
-. ./defs || Exit 1
+. ./defs || exit 1
echo 'SUBDIRS = sdir' > Makefile.am
: > src
test -f src
test -f sdir/src2
-test -r dest && Exit 1
-test -r dest2 && Exit 1
-test -r sdir/dest3 && Exit 1
-test -r dest4 && Exit 1
-test -r sdir/dest5 && Exit 1
-test -r sdir-no-make/dest6 && Exit 1
+test -r dest && exit 1
+test -r dest2 && exit 1
+test -r sdir/dest3 && exit 1
+test -r dest4 && exit 1
+test -r sdir/dest5 && exit 1
+test -r sdir-no-make/dest6 && exit 1
:
# Test to make sure that sources for links created by AC_CONFIG_LINKS
# are distributed.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
SUBDIRS = sdir
# Test to make sure that AC_CONFIG_LINKS using a variable source
# is not broken.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
SUBDIRS = sdir
# $my_src_dir and $my_dest are variables local to configure, they should
# not appear in Makefile.
-grep my_src_dir Makefile.in && Exit 1
-grep my_dest Makefile.in && Exit 1
+grep my_src_dir Makefile.in && exit 1
+grep my_dest Makefile.in && exit 1
./configure
test -r sdir/dest2
# Test to make sure links to _identical files_ created by AC_CONFIG_LINKS get
# removed with 'make distclean' only if doing a VPATH build.
-. ./defs || Exit 1
+. ./defs || exit 1
mkdir nonmk-subdir sdir sdir/mk-subdir
: > src
test -f ../nonmk-subdir/src3
test -f ../sdir/mk-subdir/src4
-test -r src && Exit 1
-test -r sdir/src2 && Exit 1
-test -r nonmk-subdir/src3 && Exit 1
-test -r sdir/mk-subdir/src4 && Exit 1
+test -r src && exit 1
+test -r sdir/src2 && exit 1
+test -r nonmk-subdir/src3 && exit 1
+test -r sdir/mk-subdir/src4 && exit 1
cd ..
./configure
# Test to make sure config.h can be in subdir.
# Also, make sure config.h is properly rebuilt.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_CONFIG_FILES([subdir/Makefile])
#
# cd $(top_builddir) && $(SHELL) ./config.status subdir/config.h
($FGREP 'subdir/config.h' subdir/Makefile.in |
- $FGREP -v 'cd $(top_builddir)') && Exit 1
+ $FGREP -v 'cd $(top_builddir)') && exit 1
$AUTOCONF
./configure
# Test to make sure configure_vars stuff works.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_SUBST([QBERT])
# Test for bug reported by Jim Meyering.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_SUBST([OTHER_SCRIPTS])
# Test to make sure '-c' works. Report from Andris Pavenis.
# See also the much more in-depth test 'add-missing'.
-. ./defs || Exit 1
+. ./defs || exit 1
# We'll have to cater to systems like MSYS/MinGW where there are no
# true symlinks ('ln -s' behaves like 'cp -p'); see automake bug#10441.
# Test cscope functionality.
-. ./defs || Exit 1
+. ./defs || exit 1
plan_ 18
# The 'cscope' target should not fail if there are no sources.
required=
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
# is empty.
required=cscope
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_CONFIG_FILES([sub/Makefile])
required=c++
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << 'END'
AC_INIT([GNU C++ Demo], [1.3], [bug-automake@gnu.org])
Good morning, work.
END
for p in play work; do
- ./$p > got.$p || { cat got.$p; Exit 1; }
+ ./$p > got.$p || { cat got.$p; exit 1; }
cat exp.$p
cat got.$p
diff exp.$p got.$p
required='libtoolize c++'
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << 'END'
AC_INIT([GNU C++/Libtool Demo], [0.73], [bug-automake@gnu.org])
ls -l . ax # For debugging.
for f in ltmain.sh depcomp config.guess config.sub; do
- test -f ax/$f && test ! -h ax/$f || Exit 1
+ test -f ax/$f && test ! -h ax/$f || exit 1
done
test ! -f ax/compile # Not required by C++ compilers.
# Test that '.c++' extension works.
# From Ralf Corsepius.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CXX
# Test that Automake suggests using AC_PROG_CXX if C++ sources are used.
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_PROG_CC >>configure.ac
# Make sure automake sees AC_PROG_CXXCPP. From Garth Corral.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CXXCPP
# Test to make sure LIBOBJS and C++ sources work right.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CXX
# Test to make sure C++ linker is used when appropriate.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Test to make sure pure C++ sources don't include C-specific code.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CXX
$ACLOCAL
$AUTOMAKE
-$FGREP '(CC)' Makefile.in && Exit 1
-Exit 0
+$FGREP '(CC)' Makefile.in && exit 1
+exit 0
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Make sure C++ files are rewritten to ".o" and not just "o".
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CXX
# Check that, in cygnus mode, target "check" does not depend target
# "all".
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
AM_MAINTAINER_MODE
$ACLOCAL
$AUTOMAKE --cygnus -Wno-obsolete
-$EGREP '(^| )all.*(:|:.* )check' Makefile.in && Exit 1
+$EGREP '(^| )all.*(:|:.* )check' Makefile.in && exit 1
$AUTOCONF
./configure
test -f check-target-has-run
test ! -r all-target-has-failed
# Sanity checks.
-$MAKE && Exit 1
+$MAKE && exit 1
test -f all-target-has-failed
:
# And check that this *cannot* be overridden.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
AM_MAINTAINER_MODE
# Sanity check.
$MAKE clean
-$MAKE >out 2>&1 && { cat out; Exit 1; }
+$MAKE >out 2>&1 && { cat out; exit 1; }
cat out
# Not all compilers mention the undefined symbol in the error message.
grep GIVE_BACK out || grep main out
# That feature will be removed in the next major Automake release.
# See automake bug#11034.
-. ./defs || Exit 1
+. ./defs || exit 1
warn_rx='support for Cygnus.*trees.*deprecated'
# Check that 'cygnus' mode imply 'foreign' mode.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
# This is *required* in cygnus mode
# Check that cygnus mode forbids creation of distribution tarball.
-. ./defs || Exit 1
+. ./defs || exit 1
echo AM_MAINTAINER_MODE >> configure.ac
mv -f configure.ac configure.stub
$MAKE
for target in dist distdir distcheck dist-all dist-gzip; do
- $MAKE -n $target >out 2>&1 && { cat out; Exit 1; }
+ $MAKE -n $target >out 2>&1 && { cat out; exit 1; }
cat out
grep $target out
done
./configure
$MAKE
cd sub2
-$MAKE -n distdir >out 2>&1 && { cat out; Exit 1; }
+$MAKE -n distdir >out 2>&1 && { cat out; exit 1; }
grep distdir out
cd ..
# Check that cygnus mode enables the 'no-installinfo' option.
required=makeinfo
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
AM_MAINTAINER_MODE
$AUTOMAKE --cygnus -Wno-override -Wno-obsolete
$AUTOCONF
-cwd=$(pwd) || Exit 1
+cwd=$(pwd) || exit 1
./configure --prefix="$cwd"/_inst
$MAKE
$MAKE install
# Check that, in cygnus mode, maintainer mode is required.
-. ./defs || Exit 1
+. ./defs || exit 1
: > Makefile.am
# Test basic Cygwin32 functionality.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
$ACLOCAL
$AUTOMAKE
-grep '^CYGWIN' Makefile.in && Exit 1
+grep '^CYGWIN' Makefile.in && exit 1
grep 'EXEEXT' Makefile.in
:
# Test to make sure '-' can be used in path.
# Report from Matthew D. Langston.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
include Make-lang
# Make sure aclocal picks up on all macro definitions.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > acinclude.m4 << 'END'
AC_DEFUN([AM_FUNC_THREE])
# Make sure we don't mistake a macro definition for an invocation.
# From Jim Meyering.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
dnl if buggy this will require getloadavg.c
# to an absolute path.
required=runtest
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
# (both as TCL variable and as environment variable).
required=runtest
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
# Check that the files in $(EXTRA_DEJAGNU_SITE_CONFIG) get appended to
# site.exp in the same order in which they're listed in that variable.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
# automake-generated Makefile.
required=runtest
-. ./defs || Exit 1
+. ./defs || exit 1
write_check_for ()
{
set qux "/foo/"
END
-$MAKE check && { cat site.exp; Exit 1; }
+$MAKE check && { cat site.exp; exit 1; }
grep 'PASS: test_foo' tool.sum
grep 'FAIL: test_bar' tool.sum
grep 'FAIL: test_baz' tool.sum
$AUTOMAKE Makefile
./config.status Makefile
-$MAKE check || { cat site.exp; Exit 1; }
+$MAKE check || { cat site.exp; exit 1; }
cat site.exp
cat bar.dir/bar
$FGREP '/bar/' site.exp
$MAKE check
grep 'PASS: test_zardoz' tool.sum
grep 'zardoz: /zardoz/' tool.log
-grep 'zardoz.*quux' tool.log && Exit 1
+grep 'zardoz.*quux' tool.log && exit 1
# Check that files in $(EXTRA_DEJAGNU_SITE_CONFIG) are not distributed
# by default.
# Check that the user can edit the Makefile-generated site.exp, and
# have its edits survive to the remaking of that file.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
# Superficial test to check that dejagnu tests and automake-style
# tests can coexist. See also related deeper test 'check12.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = dejagnu
# Make sure we don't override the user's site.exp rule.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
AC_OUTPUT
# Check that the DejaGnu rules work for a simple program and test case.
required=runtest
-. ./defs || Exit 1
+. ./defs || exit 1
cat > hammer << 'END'
#! /bin/sh
# Ensure that the envvar RUNTESTFLAGS is used.
# Report from Mark Mitchell.
RUNTESTFLAGS=--unknown-runtest-option $MAKE check >output 2>&1 \
- && { cat output; Exit 1; }
+ && { cat output; exit 1; }
cat output
$FGREP 'unknown-runtest-option' output
# previous tools, but at first glance "make check" has passed.
required=runtest
-. ./defs || Exit 1
+. ./defs || exit 1
cat > hammer << 'END'
#! /bin/sh
chmod +x hammer
rm -f hammer.log hammer.sum spanner.log spanner.sum
-$MAKE check && Exit 1
+$MAKE check && exit 1
test -f hammer.log
test -f hammer.sum
test -f spanner.log
# the package by default.
required=runtest
-. ./defs || Exit 1
+. ./defs || exit 1
package=$me
# Check that "make check" fails, when a DejaGnu test fails.
required=runtest
-. ./defs || Exit 1
+. ./defs || exit 1
cat > faildeja << 'END'
#! /bin/sh
./configure
-$MAKE check && Exit 1
+$MAKE check && exit 1
test -f faildeja.log
test -f faildeja.sum
$FGREP 'FAIL: failing_deja_test' faildeja.sum
# (to detect TCL errors) on a file with TCL errors.
required=runtest
-. ./defs || Exit 1
+. ./defs || exit 1
runtest --help | grep '.*--status' \
|| skip_ "dejagnu lacks support for '--status'"
./configure
-$MAKE check && Exit 1
+$MAKE check && exit 1
test -f failtcl.log
test -f failtcl.sum
$FGREP 'missing close-brace' failtcl.sum
# erroring out when a still-required file is missing.
# See also discussion about automake bug#9768.
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_OUTPUT >> configure.ac
rm -f zardoz.am
$sleep # Required to avoid racy failures with FreeBSD make.
-$MAKE >output 2>&1 && { cat output; Exit 1; }
+$MAKE >output 2>&1 && { cat output; exit 1; }
cat output
# This error will come from automake, not make, so we can be stricter
# in our grepping of it.
grep 'cannot open.*zardoz\.am' output
-grep 'foobar\.am' output && Exit 1 # No spurious error, please.
+grep 'foobar\.am' output && exit 1 # No spurious error, please.
# Try with one less indirection.
: > foobar.am
$MAKE # Sanity check.
rm -f foobar.am
$sleep # Required to avoid racy failures with FreeBSD make.
-$MAKE >output 2>&1 && { cat output; Exit 1; }
+$MAKE >output 2>&1 && { cat output; exit 1; }
cat output
# This error will come from automake, not make, so we can be stricter
# in our grepping of it.
# erroring out when a still-required file is missing.
# See also discussion about automake bug#9768.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
m4_include([foobar.m4])
$MAKE
rm -f zardoz.m4
-$MAKE >output 2>&1 && { cat output; Exit 1; }
+$MAKE >output 2>&1 && { cat output; exit 1; }
cat output
# This error will come from aclocal, not make, so we can be stricter
# in our grepping of it.
grep ' foobar\.m4:1:.*zardoz\.m4.*does not exist' output
# No spurious errors, please.
-$FGREP -v ' foobar.m4:1:' output | $FGREP 'foobar.m4' && Exit 1
+$FGREP -v ' foobar.m4:1:' output | $FGREP 'foobar.m4' && exit 1
# Try with one less indirection.
: > foobar.m4
./configure
$MAKE # Sanity check.
rm -f foobar.m4
-$MAKE >output 2>&1 && { cat output; Exit 1; }
+$MAKE >output 2>&1 && { cat output; exit 1; }
cat output
# This error will come from aclocal, not make, so we can be stricter
# in our grepping of it.
grep 'foobar\.m4.*does not exist' output
# No spurious errors, please (ok, this is really paranoid).
-$FGREP 'zardoz.m4' output && Exit 1
+$FGREP 'zardoz.m4' output && exit 1
:
# Test to make sure dependencies work when required macro is part of
# autoconf.
-. ./defs || Exit 1
+. ./defs || exit 1
echo 'AM_FOO' >> configure.ac
echo 'AC_DEFUN([AM_FOO], [AC_REQUIRE([AC_HEADER_STDC])])' > AM_FOO.m4
# Make sure a top-level depcomp file is found when
# AC_CONFIG_AUX_DIR is not specified.
-. ./defs || Exit 1
+. ./defs || exit 1
mkdir lib src
# so that more files are included in lib's DIST_COMMON definition,
# then you must handle the case in which depcomp is listed on a
# continued line.
-grep '^DIST_COMMON.*depcomp' lib/Makefile.in && Exit 1
+grep '^DIST_COMMON.*depcomp' lib/Makefile.in && exit 1
:
# Test to make sure depcomp is installed and found properly
# when required for multiple directories.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << END
AC_INIT([$me], [1.0])
# From Pavel Roskin.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_CONFIG_FILES([subdir/Makefile])
$ACLOCAL
$AUTOMAKE --add-missing
$AUTOCONF
-./configure 2>stderr || { cat stderr >&2; Exit 1; }
+./configure 2>stderr || { cat stderr >&2; exit 1; }
cat stderr >&2
test ! -s stderr
# same thing for libtool objects.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
grep include Makefile.in # For debugging.
grep 'include.*\./\$(DEPDIR)/foo\.P' Makefile.in
grep 'include.*\./\$(DEPDIR)/bar\.P' Makefile.in
-grep 'include.*/\./\$(DEPDIR)' Makefile.in && Exit 1
+grep 'include.*/\./\$(DEPDIR)' Makefile.in && exit 1
$AUTOCONF
# Don't reject slower dependency extractors, for better coverage.
grep include Makefile.in # For debugging.
grep 'include.*\./\$(DEPDIR)/foo\.P' Makefile.in
grep 'include.*[^a-zA-Z0-9_/]sub/\$(DEPDIR)/bar\.P' Makefile.in
-$EGREP 'include.*/(\.|sub)/\$\(DEPDIR\)' Makefile.in && Exit 1
+$EGREP 'include.*/(\.|sub)/\$\(DEPDIR\)' Makefile.in && exit 1
$AUTOCONF
# Don't reject slower dependency extractors, for better coverage.
# same thing for non-libtool objects.
required='cc libtoolize'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
grep include Makefile.in # For debugging.
grep 'include.*\./\$(DEPDIR)/foo\.P' Makefile.in
grep 'include.*\./\$(DEPDIR)/bar\.P' Makefile.in
-grep 'include.*/\./\$(DEPDIR)' Makefile.in && Exit 1
+grep 'include.*/\./\$(DEPDIR)' Makefile.in && exit 1
$AUTOCONF
# Don't reject slower dependency extractors, for better coverage.
grep include Makefile.in # For debugging.
grep 'include.*\./\$(DEPDIR)/foo\.P' Makefile.in
grep 'include.*[^a-zA-Z0-9_/]sub/\$(DEPDIR)/bar\.P' Makefile.in
-$EGREP 'include.*/(\.|sub)/\$\(DEPDIR\)' Makefile.in && Exit 1
+$EGREP 'include.*/(\.|sub)/\$\(DEPDIR\)' Makefile.in && exit 1
$AUTOCONF
# Don't reject slower dependency extractors, for better coverage.
# From Eric Magnien.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
rm -f configure.ac
# In some cases the auto-dependency can get confused and try
# to '-include' a directory (if a backslash-newline appears in _SOURCES).
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_PROG_CC >> configure.ac
# Test _DEPENDENCIES variable. From Lee Iverson.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Check that dependencies are included when there are many header files.
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_PROG_CC >> configure.ac
# quoting in $CONFIG_FILES, done by newer Autoconf.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac << END
AC_PROG_CC
do
rm -rf .deps _deps
./config.status "$arg" depfiles >stdout 2>stderr ||
- { cat stdout; cat stderr >&2; Exit 1; }
+ { cat stdout; cat stderr >&2; exit 1; }
cat stdout
cat stderr >&2
- grep '[Nn]o such file' stderr && Exit 1
+ grep '[Nn]o such file' stderr && exit 1
if test -n "$depdir"; then
- test -d $depdir || Exit 1
+ test -d $depdir || exit 1
fi
done
# Check for _AM_OUTPUT_DEPENDENCY_COMMANDS grouping bug,
# reported by Markus Duft.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac << END
AC_PROG_CC
$AUTOMAKE
$AUTOCONF
./configure --disable-dependency-tracking 2>stderr || {
- stat=$?; cat stderr >&2; Exit $stat;
+ stat=$?; cat stderr >&2; exit $stat;
}
cat stderr >&2
-grep shift stderr && Exit 1
+grep shift stderr && exit 1
:
# Check that automake and autoconf complain about an old-style AC_INIT
# call used with a new-style AM_AUTOMAKE_INIT call.
-. ./defs || Exit 1
+. ./defs || exit 1
: > Makefile.am
AC_CONFIG_FILES([Makefile])
END
cat configure.ac # For debugging.
- $ACLOCAL 2>stderr && { cat stderr >&2; Exit 1; }
+ $ACLOCAL 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
grep "^configure\\.ac:.* $errmsg" stderr
cp aclocal-m4.sav aclocal.m4
- $AUTOCONF 2>stderr && { cat stderr >&2; Exit 1; }
+ $AUTOCONF 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
grep "^configure\\.ac:.* $errmsg" stderr
AUTOMAKE_fails
# It will only work for non-root users.
required='ro-dir'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'EOF'
AC_OUTPUT
$AUTOCONF
$AUTOMAKE -a
./configure
-$MAKE distcheck && Exit 1
+$MAKE distcheck && exit 1
:
# Naming a subdirectory 'obj/' is a bad idea. Automake should say so.
-. ./defs || Exit 1
+. ./defs || exit 1
mkdir obj
# Check use of absolute paths in dirlist.
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
mkdir acdir-more sub sub/acdir
echo "$(pwd)/acdir-more" > sub/acdir/dirlist
$AUTOCONF
# Only -I directories are subject to file inclusion.
-grep m4_include aclocal.m4 && Exit 1
+grep m4_include aclocal.m4 && exit 1
grep 'foo-foo--foo' configure
# Check dirlist support.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac <<EOF
AC_INIT
# There should be no m4_include in aclocal.m4, even though m4/dirlist
# contains './dirlist-test' as a relative directory. Only -I directories
# are subject to file inclusion.
-grep m4_include aclocal.m4 && Exit 1
+grep m4_include aclocal.m4 && exit 1
grep 'GUILE-VERSION' configure
# This bug can occur only when we do a VPATH build of Automake
# (because of the '-I' passed to aclocal in tests/defs/aclocal.in) but
# it's OK because VPATH builds are done by 'make distcheck'.
-grep 'I should not be included' configure && Exit 1
+grep 'I should not be included' configure && exit 1
:
# Check dirlist globbing support.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac <<EOF
AC_INIT
# There should be no m4_include in aclocal.m4, even though m4/dirlist
# contains './dirlist-test' as a relative directory. Only -I directories
# are subject to file inclusion.
-grep m4_include aclocal.m4 && Exit 1
+grep m4_include aclocal.m4 && exit 1
grep 'GUILE-VERSION' configure
grep 'foo bar baz' configure
# Test to make sure LIBOBJS file cannot be mentioned explicitly.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_RANLIB
am_create_testdir=empty
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
count=0
ocwd=$(pwd) || fatal_ "cannot get current working directory"
# Related to automake bug#9651.
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# directory was set to '.' by AC_CONFIG_AUX_DIR.
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
i=0
for auxdir in build-aux ''; do
mkdir subdir
echo > subdir/Makefile.am # 'echo', not ':', for Solaris /bin/sh.
- test -z "$auxdir" || mkdir "$auxdir" || Exit 99
+ test -z "$auxdir" || mkdir "$auxdir" || exit 99
if test -z "$auxdir"; then
auxdir=.
$AUTOMAKE
./configure
$MAKE test
- $EGREP '(foo\.txt|bar\.sh|zardoz)' subdir/Makefile.in && Exit 1
+ $EGREP '(foo\.txt|bar\.sh|zardoz)' subdir/Makefile.in && exit 1
$MAKE distcheck
# archives.
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
plan_ 70
# Make sure included files in parent directory are distributed.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_CONFIG_FILES([sub/Makefile])
# required '.am' file from a distribution tarball.
# See discussion about automake bug#9768.
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_OUTPUT >> configure.ac
cd $distdir
./configure
fi
- $MAKE >output 2>&1 && { cat output; Exit 1; }
+ $MAKE >output 2>&1 && { cat output; exit 1; }
cat output
# This error comes from automake, not make, so we can be stricter
# in our grepping of it.
grep 'cannot open.*zardoz\.am' output
- grep 'foobar\.am' output && Exit 1 # No spurious error, please.
+ grep 'foobar\.am' output && exit 1 # No spurious error, please.
cd "$ocwd" || fatal_ "cannot chdir back to top-level test directory"
done
# See discussion about automake bug#9768.
# See also sister test 'dist-missing-m4.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
m4_include([foobar.m4])
cd $distdir
./configure
fi
- $MAKE >output 2>&1 && { cat output; Exit 1; }
+ $MAKE >output 2>&1 && { cat output; exit 1; }
cat output
# This error will come from automake, not make, so we can be stricter
# in our grepping of it.
grep 'zardoz\.m4.*does not exist' output
- grep 'foobar\.m4' output && Exit 1 # No spurious error, please.
+ grep 'foobar\.m4' output && exit 1 # No spurious error, please.
cd "$ocwd" || fatal_ "cannot chdir back to top-level test directory"
done
# See discussion about automake bug#9768.
# See also sister test 'dist-missing-included-m4.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
m4_pattern_forbid([^MY_])
cd $distdir
./configure
fi
- $MAKE >output 2>&1 && { cat output; Exit 1; }
+ $MAKE >output 2>&1 && { cat output; exit 1; }
cat output
# This error will come from autoconf, not make, so we can be stricter
# in our grepping of it.
grep 'possibly undefined .*MY_ZARDOZ' output
- grep 'MY_FOOBAR' output && Exit 1 # No spurious error, please.
+ grep 'MY_FOOBAR' output && exit 1 # No spurious error, please.
cd "$ocwd" || fatal_ "cannot chdir back to top-level test directory"
done
# so that the latter ones fail.
required=bzip2
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_OUTPUT >> configure.ac
: > Makefile.am
./configure
$MAKE dist-gzip dist-bzip2
-gzip -dc $distdir.tar.gz | tar tf - > one || { cat one; Exit 1; }
+gzip -dc $distdir.tar.gz | tar tf - > one || { cat one; exit 1; }
cat one
-bzip2 -dc $distdir.tar.gz | tar tf - > two || { cat two; Exit 1; }
+bzip2 -dc $distdir.tar.gz | tar tf - > two || { cat two; exit 1; }
cat two
$FGREP "$distdir/Makefile.am" one
# This test expect the user to be unable to write on files lacking
# write permissions -- so it won't work if the user is 'root'.
required='non-root cc'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
./configure
$MAKE distdir
ls -l $distdir # For debugging.
-test -f foo.c && test ! -w foo.c || Exit 1
-(echo x > foo.c) && Exit 1
-test -f bar.txt && test ! -w bar.txt || Exit 1
-(echo x > bar.txt) && Exit 1
+test -f foo.c && test ! -w foo.c || exit 1
+(echo x > foo.c) && exit 1
+test -f bar.txt && test ! -w bar.txt || exit 1
+(echo x > bar.txt) && exit 1
$MAKE distcheck
:
# The distdir target should take care of not copying it more than one
# time anyway.
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_OUTPUT >> configure.ac
# Check support for AM_DISTCHECK_CONFIGURE_FLAGS at "make distcheck"
# time, and its interactions with DISTCHECK_CONFIGURE_FLAGS.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_ARG_ENABLE([success], [], [success=$enableval], [success=no])
$FGREP '$(DISTCHECK_CONFIGURE_FLAGS)' Makefile.in
$FGREP '$(AM_DISTCHECK_CONFIGURE_FLAGS)' Makefile.in
grep 'DISTCHECK_CONFIGURE_FLAGS.*AM_DISTCHECK_CONFIGURE_FLAGS' Makefile.in \
- && Exit 1
+ && exit 1
$AUTOCONF
./configure --enable-success sentence='it works :-)'
$AUTOMAKE Makefile
./config.status Makefile
-$MAKE distcheck >output 2>&1 && { cat output; Exit 1; }
+$MAKE distcheck >output 2>&1 && { cat output; exit 1; }
cat output
grep "^configure:.* success='no', sentence='it works :-)'" output
# passed down to the configure script of the subpackage. This is
# explicitly documented in the manual.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_CONFIG_SUBDIRS([subpkg])
grep '^AM_DISTCHECK_CONFIGURE_FLAGS =' Makefile.in
grep '^DISTCHECK_CONFIGURE_FLAGS =' Makefile.in
-$EGREP '^(AM_)?DISTCHECK_CONFIGURE_FLAGS' subpkg/Makefile.in && Exit 1
+$EGREP '^(AM_)?DISTCHECK_CONFIGURE_FLAGS' subpkg/Makefile.in && exit 1
./configure dc=ok am_dc=ok
# ... but not when "make distcheck" is run from the subpackage.
cd subpkg
-$MAKE distcheck >output 2>&1 && { cat output; Exit 1; }
+$MAKE distcheck >output 2>&1 && { cat output; exit 1; }
cat output
grep '^configure:.* dc=KO am_dc=KO' output
# Check support for DISTCHECK_CONFIGURE_FLAGS at "make distcheck" time.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_ARG_ENABLE([success], [], [success=$enableval], [success=no])
DISTCHECK_CONFIGURE_FLAGS="--enable-success=yes sentence='it works :-)'"
# Sanity check.
-$MAKE distcheck >output 2>&1 && { cat output; Exit 1; }
+$MAKE distcheck >output 2>&1 && { cat output; exit 1; }
cat output
grep "^configure:.* success='no', sentence=''" output
# Check basic support for distcheck-hook.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
./configure
$MAKE
-$MAKE check && Exit 1
+$MAKE check && exit 1
$MAKE distdir
-test -f $distdir/dc-hook-has-run && Exit 1
+test -f $distdir/dc-hook-has-run && exit 1
$MAKE distcheck
:
# Automake, and that a used-defined 'distcheck-hook' is *not* honored
# in a subpackage Makefile.am.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_CONFIG_SUBDIRS([subpkg])
# For debugging.
$FGREP 'distcheck-hook' Makefile.in subpkg/Makefile.in
-$FGREP 'distcheck-hook' subpkg/Makefile.in && Exit 1
+$FGREP 'distcheck-hook' subpkg/Makefile.in && exit 1
$FGREP '$(MAKE) $(AM_MAKEFLAGS) distcheck-hook' Makefile.in
grep '^distcheck-hook:' Makefile.in
./configure
$MAKE
-$MAKE check && Exit 1
+$MAKE check && exit 1
cd subpkg
$MAKE check
cd ..
# missing from the dist tarball (interaction with '--install').
# See automake bug#9037.
-. ./defs || Exit 1
+. ./defs || exit 1
cwd=$(pwd) || fatal_ "cannot get current working directory"
# We don't use '--install' here. Our distcheck-hook should catch this.
$ACLOCAL -I m4
$AUTOCONF
-$EGREP 'MY_(FOO|BAR|BAZ|ZAR)' configure && Exit 1 # Sanity check.
+$EGREP 'MY_(FOO|BAR|BAZ|ZAR)' configure && exit 1 # Sanity check.
$AUTOMAKE
check_no_spurious_error ()
{
- $EGREP -i 'mkdir:|:.*(permission|denied)' output && Exit 1
+ $EGREP -i 'mkdir:|:.*(permission|denied)' output && exit 1
# On failure, some make implementations (such as Solaris make) print the
# whole failed recipe on stdout. The first grep works around this.
- grep -v 'rm -rf ' output | grep -i 'autom4te.*\.cache' && Exit 1
+ grep -v 'rm -rf ' output | grep -i 'autom4te.*\.cache' && exit 1
: To placate 'set -e'.
}
./configure
-$MAKE distcheck >output 2>&1 && { cat output; Exit 1; }
+$MAKE distcheck >output 2>&1 && { cat output; exit 1; }
cat output
for x in bar baz zar; do
$EGREP "required m4 file.*not distributed.* $x.m4( |$)" output
END
$MAKE
-$EGREP 'MY_(FOO|BAR|BAZ|QUX|ZAR|BLA)' configure && Exit 1 # Sanity check.
+$EGREP 'MY_(FOO|BAR|BAZ|QUX|ZAR|BLA)' configure && exit 1 # Sanity check.
-$MAKE distcheck >output 2>&1 && { cat output; Exit 1; }
+$MAKE distcheck >output 2>&1 && { cat output; exit 1; }
cat output
$EGREP "required m4 file.*not distributed.* qux.m4( |$)" output
$EGREP "required m4 file.*not distributed.* bla.m4( |$)" output
check_no_spurious_error
# Check that we don't complain for files that should have been found.
-$FGREP " (bar|baz|zar).m4" output && Exit 1
+$FGREP " (bar|baz|zar).m4" output && exit 1
# Now we again use '--install', and "make distcheck" should pass.
$ACLOCAL -I m4 --install
# files in a dist tarball (interaction with '--install').
# See automake bug#9037.
-. ./defs || Exit 1
+. ./defs || exit 1
cwd=$(pwd) || fatal_ "cannot get current working directory"
check_no_spurious_error ()
{
- $EGREP -i 'mkdir:|:.*(permission|denied)' output && Exit 1
+ $EGREP -i 'mkdir:|:.*(permission|denied)' output && exit 1
# On failure, some make implementations (such as Solaris make) print the
# whole failed recipe on stdout. The first grep works around this.
- grep -v 'rm -rf ' output | grep -i 'autom4te.*\.cache' && Exit 1
+ grep -v 'rm -rf ' output | grep -i 'autom4te.*\.cache' && exit 1
: To placate 'set -e'.
}
END
$MAKE # Rebuild configure and makefiles.
-$MAKE distcheck >output 2>&1 && { cat output; Exit 1; }
+$MAKE distcheck >output 2>&1 && { cat output; exit 1; }
cat output
$EGREP "required m4 file.* outdated.* baz.m4( |$)" output
check_no_spurious_error
# Check that we don't complain for files that aren't outdated.
-$EGREP " (foo|bar).m4" output && Exit 1
+$EGREP " (foo|bar).m4" output && exit 1
# Now we again use '--install' explicitly, and "make distcheck"
# should pass.
END
$MAKE # Rebuild configure and makefiles.
-$MAKE distcheck >output 2>&1 && { cat output; Exit 1; }
+$MAKE distcheck >output 2>&1 && { cat output; exit 1; }
cat output
$EGREP "required m4 file.* outdated.* fnord.m4( |$)" output
check_no_spurious_error
# Check that we don't complain for files that aren't outdated.
-$EGREP " (foo|bar|baz).m4" output && Exit 1
+$EGREP " (foo|bar|baz).m4" output && exit 1
# Now we again use '--install' explicitly, and "make distcheck"
# should pass.
# working. Related to automake bug#9579.
required='makeinfo tex texi2dvi install-info'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
$MAKE distcheck
infodir="$(pwd)/_info" $MAKE -e distcheck
-test -f _info/dir || Exit 99 # Sanity check.
+test -f _info/dir || exit 99 # Sanity check.
:
# by a process (e.g., that is its "current working directory").
# See automake bug#10470.
-. ./defs || Exit 1
+. ./defs || exit 1
mkdir foo.d
sh -c "cd foo.d && sleep '4'" &
./configure
# We can build the distribution.
-$MAKE distcheck >output 2>&1 || { cat output; Exit 1; }
+$MAKE distcheck >output 2>&1 || { cat output; exit 1; }
cat output
# Sanity check: verify that our code has hit a problem removing
# the distdir, but has recovered from it.
# Check against automake bug#9579: distcheck does not always detect
# incomplete uninstall as advertised.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
test -f inst/share/dir
rm -rf inst
-$MAKE distcheck >output 2>&1 && { cat output; Exit 1; }
+$MAKE distcheck >output 2>&1 && { cat output; exit 1; }
cat output
$FGREP 'ERROR: files left after uninstall:' output
test -f inst/share/info/more/dir
rm -rf inst
-$MAKE distcheck >output 2>&1 && { cat output; Exit 1; }
+$MAKE distcheck >output 2>&1 && { cat output; exit 1; }
cat output
$FGREP 'ERROR: files left after uninstall:' output
# case too (since it doesn't cost us anything but this test).
# See automake bug#10878.
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_OUTPUT >> configure.ac
# The example Makefile.am we use is from the FAQ entry 'distcleancheck'.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac << 'END'
AC_PROG_CC
$AUTOMAKE
./configure
$MAKE
-$MAKE distcheck 2>stderr && { cat srderr >&2; Exit 1; }
+$MAKE distcheck 2>stderr && { cat srderr >&2; exit 1; }
cat stderr >&2
grep 'ERROR:.*files left in build directory after distclean' stderr
# Test to make sure that if an auxfile (here depcomp) is required
# by a subdir Makefile.am, it is distributed by that Makefile.am.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_CONFIG_FILES([subdir/Makefile])
# Report from Pavel Roskin. Report of problems with '--no-force' from
# Scott James Remnant (Debian #206299)
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Test to make sure that non-existing common files are distributed
# if they are buildable.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
README:
$ACLOCAL
# Should not warn about missing README, since it is a target.
-$AUTOMAKE --add-missing --gnu >output 2>&1 || { cat output; Exit 1; }
+$AUTOMAKE --add-missing --gnu >output 2>&1 || { cat output; exit 1; }
cat output
-grep README output && Exit 1
+grep README output && exit 1
sed -n -e '/^DIST_COMMON =.*\\$/ {
:loop
# test with a Makefile in the directory.
# Also make sure that README appears first in DIST_COMMON.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_CONFIG_FILES([tests/autoconf:tests/wrapper.in],
# a Makefile in that directory. distcom4.test performs the same
# test without Makefile in the directory.
-. ./defs || Exit 1
+. ./defs || exit 1
extract_distcommon ()
{
# Also test DISTFILES containing a directory and a file in it,
# and repeated directories.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
../configure
$MAKE distdir
# Check to make sure 'foo' isn't made in build directory.
-test -d foo && Exit 1
+test -d foo && exit 1
rm -rf $me-1.0
# Remove the dot from VERSION for the next grep.
# Make sure no './' appear in the directory names. srcdir is '..', so
# this also checks that no directory is created in the source tree.
-grep 'MKDIR_P.*\.' stdout && Exit 1
+grep 'MKDIR_P.*\.' stdout && exit 1
cd ..
./configure --prefix "$(pwd)"
# Check that 'dist-hook' works. See automake bug#10878.
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_OUTPUT >> configure.ac
# Check that distributed symlinks in the source tree will be expanded
# as regular files in $(distdir).
-. ./defs || Exit 1
+. ./defs || exit 1
echo text > file
# Check that distributed broken symlinks cause 'make dist' to fail, and
# to do so with (mostly) meaningful diagnostic.
-. ./defs || Exit 1
+. ./defs || exit 1
# We need, for our broken symlinks, names that make it hard to get false
# positives when grepping make output to look for them.
$AUTOMAKE
./configure
# Distribution must fail, with a decent error message.
- $MAKE distdir >out 2>&1 && { cat out; Exit 1; }
+ $MAKE distdir >out 2>&1 && { cat out; exit 1; }
cat out
$FGREP $lnk out
done
# From Rainer Orth.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_CONFIG_SRCDIR([a.c])
$MAKE dist
gzip -d $me-1.0.tar.gz
-tar tf $me-1.0.tar > stdout || { cat stdout; Exit 1; }
+tar tf $me-1.0.tar > stdout || { cat stdout; exit 1; }
cat stdout
-$FGREP ./$me-1.0/a.c stdout && Exit 1
+$FGREP ./$me-1.0/a.c stdout && exit 1
:
# Simple checks on the 'AM_WITH_DMALLOC' macro.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_CONFIG_HEADERS([config.h])
# See: <http://lists.gnu.org/archive/html/automake/2010-08/msg00074.html>
# or: <http://thread.gmane.org/gmane.comp.sysutils.automake.general/11943/focus=11962>
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am <<'END'
$(FOO:=x): bar
# If you cause some parts of this test to fail, chances are that you've
# improved the Automake parser ;-)
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am <<END
.PHONY: test
$ACLOCAL
$AUTOMAKE
-$FGREP '$(EXEEEXT)' Makefile.in && Exit 1
-grep 'all:.*all-local' Makefile.in && Exit 1
+$FGREP '$(EXEEEXT)' Makefile.in && exit 1
+grep 'all:.*all-local' Makefile.in && exit 1
grep "^${tab}bin_PROGRAMS = foo" Makefile.in
$AUTOCONF
# Require GNU make for this test. SunOS Make does not support
# '$$' in a target or a dependency (it outputs the empty string instead).
required=GNUmake
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_OUTPUT >> configure.ac
# containing a '$' on the left hand side of an assignment are not
# portable in practice, even though POSIX allows them. :-/
-. ./defs || Exit 1
+. ./defs || exit 1
cat >Makefile.am <<'EOF'
x = 1
grep 'Makefile.am:3' stderr
grep 'Makefile.am:4' stderr
grep 'Makefile.am:5' stderr
-grep 'Makefile.am:6' stderr && Exit 1
-grep 'Makefile.am:7' stderr && Exit 1
+grep 'Makefile.am:6' stderr && exit 1
+grep 'Makefile.am:7' stderr && exit 1
:
# Test to make sure that -Wportability turns on portability-recursive,
# likewise for -Wno-...
-. ./defs || Exit 1
+. ./defs || exit 1
#
# First, try a setup where we have a 'portability-recursive' warning,
# 'portability' warnings.
AUTOMAKE_fails -Wportability -Wno-portability-recursive
grep AM_PROG_CC_C_O stderr
-grep 'recursive variable expansion' stderr && Exit 1
+grep 'recursive variable expansion' stderr && exit 1
# Enabling 'portability-recursive' warnings should not enable
# all the 'portability' warning.
AUTOMAKE_fails -Wno-portability -Wportability-recursive
-grep AM_PROG_CC_C_O stderr && Exit 1
+grep AM_PROG_CC_C_O stderr && exit 1
grep 'recursive variable expansion' stderr
:
# Test to make sure listing a program twice is ok.
# Report from Manu Rouat.
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_PROG_CC >> configure.ac
# Make sure aclocal only warns about definitions overridden by acinclude.m4.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_FUNC_STRTOD
# Test to make sure line numbers are correct in some error reports.
-. ./defs || Exit 1
+. ./defs || exit 1
echo 'AM_CONDITIONAL(FOO, true)' >> configure.ac
# Test for bug where if the list of installables is empty, invalid sh
# code is generated.
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_OUTPUT >>configure.ac
echo 'data_DATA =' >Makefile.am
# Test to make sure empty _SOURCES suppresses assumption about default
# name. Report from Pavel Roskin.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
$ACLOCAL
$AUTOMAKE
-grep 'pavel\.[co]' Makefile.in && Exit 1
-Exit 0
+grep 'pavel\.[co]' Makefile.in && exit 1
+exit 0
# A test for missing _SOURCES variable.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Test to make sure empty _SOURCES works.
# From Paul Berrevoets.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
$ACLOCAL
$AUTOMAKE
-$FGREP zoo. Makefile.in && Exit 1
-Exit 0
+$FGREP zoo. Makefile.in && exit 1
+exit 0
# Check to make sure new extended directory mechanism works.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'EOF'
htmldir = $(prefix)/html
# Test to make sure undefined directories are invalid.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'EOF'
quuz_DATA = zot.html
$ACLOCAL
AUTOMAKE_fails
-grep 'pkgdatadir' stderr && Exit 1
+grep 'pkgdatadir' stderr && exit 1
grep 'Makefile.am:1:.*quuzdir.*undefined' stderr
# Test to make sure pkgdatadir can be overridden via AC_SUBST.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'EOF'
AC_SUBST([pkgdatadir], ["FOO"])
# aren't left around. Report from Jim Meyering.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
test $(grep -c '^bin_PROGRAMS =' Makefile.in) -eq 1
# Make sure $(EXEEXT) gets stripped before canonicalization.
-grep 'maude3__EXEEXT__OBJECTS' Makefile.in && Exit 1
+grep 'maude3__EXEEXT__OBJECTS' Makefile.in && exit 1
./configure
# Make sure no-exeext option works.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Make sure we can override a program rule.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# programs, but not to @substitutions@.
# For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_CONDITIONAL([COND], [test -n "$cond"])
# Test to make sure EXTRA_..._SOURCES actually works.
# Bug report from Henrik Frystyk Nielsen.
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_PROG_CC >> configure.ac
# Test to make sure extensions are set correctly for various languages.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_F77
for ext in f for f90 f95 F F90 F95 r m mm upc; do
grep "^\.$ext\.o:" Makefile.in
- grep "^$ext\.o:" Makefile.in && Exit 1
+ grep "^$ext\.o:" Makefile.in && exit 1
: For shells with busted 'set -e'.
done
# Using different extensions for the same language should not
# output the build rules several times.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<EOF
AC_PROG_CXX
# In both cases, we don't try to create a rule; but we shouldn't
# fail either, because magic might be happening behind our back.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
END
$ACLOCAL
$AUTOMAKE
-Exit 0
+exit 0
# 2. '-Wno-portability' must imply '-Wno-extra-portability'.
# 3. '-Wall' must imply '-Wextra-portability'.
-. ./defs || Exit 1
+. ./defs || exit 1
# We want (almost) complete control over automake options.
AUTOMAKE="$am_original_AUTOMAKE --foreign -Werror"
# Disabling extra-portability leaves portability intact (1).
AUTOMAKE_fails -Wportability -Wno-extra-portability
grep 'requires.*AM_PROG_CC_C_O' stderr
-grep 'requires.*AM_PROG_AR' stderr && Exit 1
+grep 'requires.*AM_PROG_AR' stderr && exit 1
# Disabling extra-portability leaves portability intact (2).
AUTOMAKE_fails -Wall -Wno-extra-portability
grep 'requires.*AM_PROG_CC_C_O' stderr
-grep 'requires.*AM_PROG_AR' stderr && Exit 1
+grep 'requires.*AM_PROG_AR' stderr && exit 1
# Enabling portability does not enable extra-portability.
AUTOMAKE_fails -Wportability
grep 'requires.*AM_PROG_CC_C_O' stderr
-grep 'requires.*AM_PROG_AR' stderr && Exit 1
+grep 'requires.*AM_PROG_AR' stderr && exit 1
# Disabling portability disables extra-portability.
$AUTOMAKE -Wno-portability
# Make sure that extra-portability warnings are not enabled by --gnits,
# --gnu and --foreign.
-. ./defs || Exit 1
+. ./defs || exit 1
# We want complete control over automake options.
AUTOMAKE=$am_original_AUTOMAKE
# Check interactions between the 'portability-recursive' and
# 'extra-portability' warning categories.
-. ./defs || Exit 1
+. ./defs || exit 1
# We want (almost) complete control over automake options.
AUTOMAKE="$am_original_AUTOMAKE --foreign -Werror"
# We can disable 'extra-portability' while leaving
# 'portability-recursive' intact.
AUTOMAKE_fails -Wportability-recursive -Wno-extra-portability
-grep 'requires.*AM_PROG_AR' stderr && Exit 1
+grep 'requires.*AM_PROG_AR' stderr && exit 1
grep 'recursive variable expansion' stderr
# We can disable 'portability-recursive' while leaving
# 'extra-portability' intact.
AUTOMAKE_fails -Wextra-portability -Wno-portability-recursive
grep 'requires.*AM_PROG_AR' stderr
-grep 'recursive variable expansion' stderr && Exit 1
+grep 'recursive variable expansion' stderr && exit 1
# Disabling 'portability' disables 'portability-recursive' and
# 'extra-portability'.
# This check has been introduced in commit 'Release-1-9-254-g9d0eaef'
# into the former test 'subst2.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_CONFIG_FILES([Makefile2 Makefile3])
# targets should always be generated. However, they should not be
# built by default.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
grep "^zardoz" Makefile.in
# Can't have EXTRA clean rules.
-grep 'clean.*EXTRA' Makefile.in && Exit 1
-Exit 0
+grep 'clean.*EXTRA' Makefile.in && exit 1
+exit 0
# with the involvement of the $(wildcard) GNU make builtin.
required=GNUmake
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_OUTPUT >> configure.ac
# Suggested by observations from Braden McDaniel.
required=GNUmake
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_OUTPUT >> configure.ac
# Suggested by observations from Braden McDaniel.
required=GNUmake
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_OUTPUT >> configure.ac
# Check to make sure EXTRA_foo_SOURCES not defined unnecessarily.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
$ACLOCAL
$AUTOMAKE
-grep EXTRA_foo_SOURCES Makefile.in && Exit 1
-Exit 0
+grep EXTRA_foo_SOURCES Makefile.in && exit 1
+exit 0
# Check to make sure EXTRA_DATA not required.
-. ./defs || Exit 1
+. ./defs || exit 1
echo 'AC_SUBST(CODICIL)' >> configure.ac
# Check to make sure EXTRA_DATA can be specified.
-. ./defs || Exit 1
+. ./defs || exit 1
echo 'AC_SUBST(CODICIL)' >> configure.ac
# Check to make sure EXTRA_DIST can contain a directory from $buildir.
# From Dean Povey.
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_OUTPUT >> configure.ac
# Check to make sure EXTRA_DIST can contain a directory or
# a subdirectory, in $(builddir) or $(srcdir).
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_OUTPUT >> configure.ac
# $(srcdir)/X and ./X, with the files from the later overriding the
# files from the former.
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_OUTPUT >> configure.ac
# and that referring to the same program with inconsistent addition
# of $(EXEEXT) works, too.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'END'
AC_PROG_CC
# are missing; but only if the former is not AC_SUBSTed itself
# (lib_LIBRARIES is in the same boat here).
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'END'
AC_PROG_CC
$ACLOCAL
AUTOMAKE_fails
grep 'bin_PROGRAMS.*contains configure substitution' stderr
-grep 'lib_LIBRARIES.*contains configure substitution' stderr && Exit 1
+grep 'lib_LIBRARIES.*contains configure substitution' stderr && exit 1
-Exit 0
+exit 0
# Test EXTRA_*_DEPENDENCIES. See extradep2 for libtool variant.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
: >foodep
: >foodep2
: >bardep
-$MAKE >stdout || { cat stdout; Exit 1; }
+$MAKE >stdout || { cat stdout; exit 1; }
cat stdout
grep 'making libfoodep' stdout
rm -f foodep
-$MAKE && Exit 1
+$MAKE && exit 1
: >foodep
rm -f foodep2
-$MAKE && Exit 1
+$MAKE && exit 1
: >foodep2
rm -f bardep
-$MAKE && Exit 1
+$MAKE && exit 1
: >bardep
$MAKE
# Test EXTRA_*_DEPENDENCIES, libtool version; see extradep.test.
required='cc libtoolize'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
: >foodep
: >foodep2
: >bardep
-$MAKE >stdout || { cat stdout; Exit 1; }
+$MAKE >stdout || { cat stdout; exit 1; }
cat stdout
grep 'making libfoodep' stdout
rm -f bardep
-$MAKE && Exit 1
+$MAKE && exit 1
: >bardep
$MAKE
# Make sure programs with only Fortran 90 source are handled properly.
# (copied from fonly.test) Mike Nolta <mrnolta@princeton.edu>
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_FC
# options like '--ignore-deps' and '--silent-rules' are preserved across
# automake reruns.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_MAINTAINER_MODE
# Make sure 'AC_F77_LIBRARY_LDFLAGS' works properly.
# Matthew D. Langston <langston@SLAC.Stanford.EDU>
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_F77
# Check the filename-length-max=99 option.
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_OUTPUT >> configure.ac
END
(for i in 1 2 3 4 5 6 7 8 9; do
- mkdir -p 12345678 && cd 12345678 && touch x || Exit 1
+ mkdir -p 12345678 && cd 12345678 && touch x || exit 1
done) || skip_ "failed to create deep directory hierarchy"
# AIX 5.3 'cp -R' is too buggy for 'make dist'.
$MAKE distcheck
(for i in 1 2 3 4 5 6 7 8 9 10 11; do
- mkdir -p 12345678 && cd 12345678 && touch x || Exit 1
+ mkdir -p 12345678 && cd 12345678 && touch x || exit 1
done) || skip_ "failed to create deeper directory hierarchy"
-$MAKE dist 2>stderr && { cat stderr >&2; Exit 1; }
+$MAKE dist 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
grep 'filenames are too long' stderr
test 2 -eq $(grep -c 12345678 stderr)
# PR 507: Check the filename-length-max=99 option
# in conjunction with AC_CONFIG_SUBDIRS.
-. ./defs || Exit 1
+. ./defs || exit 1
# The name is so that 99 is exactly hit (including final \0).
subdirname='cnfsubdir'
EXTRA_DIST = 12345678
END
-(cd $subdirname || Exit 1
+(cd $subdirname || exit 1
for i in 1 2 3 4 5 6 7 8; do
- mkdir -p 12345678 && cd 12345678 && touch x || Exit 1
+ mkdir -p 12345678 && cd 12345678 && touch x || exit 1
done) || skip_ "failed to create deep directory hierarchy"
# AIX 5.3 'cp -R' is too buggy for 'make dist'.
./configure
$MAKE distcheck
-(cd $subdirname || Exit 1
+(cd $subdirname || exit 1
for i in 1 2 3 4 5 6 7 8 9; do
- mkdir -p 12345678 && cd 12345678 && touch x || Exit 1
+ mkdir -p 12345678 && cd 12345678 && touch x || exit 1
done) || skip_ "failed to create deeper directory hierarchy"
-$MAKE dist 2>stderr && { cat stderr >&2; Exit 1; }
+$MAKE dist 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
grep 'filenames are too long' stderr
test 1 -eq $(grep -c 12345678 stderr)
# C-specific code.
# Matthew D. Langston <langston@SLAC.Stanford.EDU>
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_F77
$ACLOCAL
$AUTOMAKE
-grep '[^F]CC' Makefile.in | grep -v MKDEP && Exit 1
-Exit 0
+grep '[^F]CC' Makefile.in | grep -v MKDEP && exit 1
+exit 0
# Make sure Fortran 77 files are rewritten to ".o" and not just "o".
# Matthew D. Langston <langston@SLAC.Stanford.EDU>
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_F77
# Make sure programs with only Fortran 77 source are handled properly.
# Matthew D. Langston <langston@SLAC.Stanford.EDU>
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_F77
# Test to make sure that 'automake --force-missing' works.
-. ./defs || Exit 1
+. ./defs || exit 1
rm -f install-sh
ls -l install-sh
test -f install-sh
-grep zot install-sh && Exit 1
+grep zot install-sh && exit 1
:
# Test to make sure that 'automake --force-missing' works, even with
# symlinked files.
-. ./defs || Exit 1
+. ./defs || exit 1
rm -f install-sh
ls -l install-sh
test -f install-sh
-grep zot install-sh && Exit 1
+grep zot install-sh && exit 1
diff foo foo2
:
# Test that Automake suggests using AC_PROG_F77/FC if Fortran sources
# are used.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >Makefile.am <<END
bin_PROGRAMS = hello
# Cf. fort1.test and link_f90_only.test.
-. ./defs || Exit 1
+. ./defs || exit 1
mkdir sub
$AUTOMAKE
# The following tests aren't fool-proof, but they don't
# need a Fortran compiler.
-grep '.\$(LINK)' Makefile.in && Exit 1
+grep '.\$(LINK)' Makefile.in && exit 1
grep '.\$(FCLINK)' Makefile.in
grep '.\$(FCCOMPILE)' Makefile.in > stdout
cat stdout
-grep -v '\$(FCFLAGS_f' stdout && Exit 1
-grep '.\$(FC.*\$(FCFLAGS_blabla' Makefile.in && Exit 1
+grep -v '\$(FCFLAGS_f' stdout && exit 1
+grep '.\$(FC.*\$(FCFLAGS_blabla' Makefile.in && exit 1
# Notice the TAB:
grep '^[ ].*\$(FC.*\$(FCFLAGS_f90).*\.f90' Makefile.in
grep '^[ ].*\$(FC.*\$(FCFLAGS_f95).*\.f95' Makefile.in
grep '^[ ].*\$(FC.*\$(FCFLAGS_f03).*\.f03' Makefile.in
grep '^[ ].*\$(FC.*\$(FCFLAGS_f08).*\.f08' Makefile.in
-grep '^[ ].*\$(FC.*\$(FCFLAGS_f90).*\.f95' Makefile.in && Exit 1
-grep '^[ ].*\$(FC.*\$(FCFLAGS_f95).*\.f90' Makefile.in && Exit 1
-grep '^[ ].*\$(FC.*\$(FCFLAGS_f90).*\.f03' Makefile.in && Exit 1
-grep '^[ ].*\$(FC.*\$(FCFLAGS_f08).*\.f90' Makefile.in && Exit 1
+grep '^[ ].*\$(FC.*\$(FCFLAGS_f90).*\.f95' Makefile.in && exit 1
+grep '^[ ].*\$(FC.*\$(FCFLAGS_f95).*\.f90' Makefile.in && exit 1
+grep '^[ ].*\$(FC.*\$(FCFLAGS_f90).*\.f03' Makefile.in && exit 1
+grep '^[ ].*\$(FC.*\$(FCFLAGS_f08).*\.f90' Makefile.in && exit 1
:
# For now, require the GNU compilers (to avoid some Libtool/Autoconf
# issues).
required='g77 gfortran'
-. ./defs || Exit 1
+. ./defs || exit 1
mkdir sub
$ACLOCAL
$AUTOMAKE -a
# The Fortran 77 linker should be preferred:
-grep '.\$(FCLINK)' Makefile.in && Exit 1
+grep '.\$(FCLINK)' Makefile.in && exit 1
$AUTOCONF
# ./configure may exit with status 77 if no compiler is found,
# For now, require the GNU compilers (to avoid some Libtool/Autoconf
# issues).
required='libtoolize g77 gfortran'
-. ./defs || Exit 1
+. ./defs || exit 1
mkdir sub
# Test to make sure dependency tracking doesn't interfere with Fortran.
# For PR 75.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_CONFIG_SRCDIR([foo.f])
$ACLOCAL
$AUTOMAKE
-grep 'foo\.Po' Makefile.in && Exit 1
-Exit 0
+grep 'foo\.Po' Makefile.in && exit 1
+exit 0
# Test of compiled java.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
_AM_DEPENDENCIES([GCJ])
# Make sure '..' invalid in subdir .o's.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
_AM_DEPENDENCIES(GCJ)
# Make sure dependency tracking works for java.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
_AM_DEPENDENCIES([GCJ])
# Make sure dependency tracking works for Java.
required=gcj
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_PROG_GCJ
$ACLOCAL
$AUTOCONF
$AUTOMAKE
-./configure >stdout || { cat stdout; Exit 1; }
+./configure >stdout || { cat stdout; exit 1; }
cat stdout
# Configure must be checking the dependency style of gcj ...
# Make sure Automake suggests AM_PROG_GCJ when GCJ is needed.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
_AM_DEPENDENCIES(GCJ)
# AM_PROG_GCJ should cause OBJEXT and EXEEXT to be set.
required='gcj'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_PROG_GCJ
# we won't have to ask him for more information to start analyzing the
# failure (that had happened too many times in the past!).
-. ./defs || Exit 1
+. ./defs || exit 1
st=0
if test -d "$am_top_srcdir"/.git; then
# This test SKIPs, so that all the information it has gathered and
# printed will get unconditionally copied into the 'test-suite.log'
# file.
- Exit 77
+ exit 77
fi
# Some unexpected error occurred; this must be reported as an hard
# error by the testsuite driver.
-Exit 99
+exit 99
# to the test cases requiring them.
# See also automake bug#9807.
-. ./defs || Exit 1
+. ./defs || exit 1
extract_program_version ()
{
# Check gettext support.
required='gettext'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<END
AM_GNU_GETTEXT
# PR/338, reported by Charles Wilson.
required='gettext'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<END
AM_GNU_GETTEXT([external])
# Don't try running ./configure --with-included-gettext if the
# user is using AM_GNU_GETTEXT([external]).
-grep 'with-included-gettext' Makefile.in && Exit 1
+grep 'with-included-gettext' Makefile.in && exit 1
# intl/ isn't wanted with AM_GNU_GETTEXT([external]).
# Check gettext 'AM_GNU_GETTEXT_INTL_SUBDIR' support.
required='gettext'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<END
AM_GNU_GETTEXT([external])
# Test to ensure --gnits version checking is correct.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << END
AC_INIT([$me], [3.5.3.2])
# Test to ensure std-options checking is correct.
required='cc native'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
$AUTOCONF
$AUTOMAKE -a
-grep README-alpha Makefile.in && Exit 1
+grep README-alpha Makefile.in && exit 1
mkdir build
cd build
# Check that AM_INSTALLCHECK_STD_OPTIONS_EXEMPT works.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
../configure "--prefix=$(pwd)/../inst-dir" --program-prefix=p
$MAKE
$MAKE install
-$MAKE installcheck && Exit 1
+$MAKE installcheck && exit 1
$MAKE -k installcheck 2>stderr || : # Never trust the exit status of make -k.
cat stderr >&2
$MAKE grep-stderr
# Report from Braden McDaniel.
required=GNUmake
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_CONFIG_FILES([sub/GNUmakefile])
# Check that Automake warns about user variables being overridden.
-. ./defs || Exit 1
+. ./defs || exit 1
# We need (almost) complete control over automake options.
AUTOMAKE="$am_original_AUTOMAKE -Werror"
grep '^Makefile\.am:1:.*CFLAGS' stderr
grep '^Makefile\.am:2:.*LDFLAGS' stderr
# No reason to warn about CXXFLAGS since it's not used.
-grep CXXFLAGS stderr && Exit 1
+grep CXXFLAGS stderr && exit 1
# Don't warn if -Wno-gnu.
$AUTOMAKE --gnu -Wno-gnu
# Check diagnostics about no-installman being disallowed in 'gnu'.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << 'END'
AC_INIT([gnuwarn2], [1.0])
# Test to make sure header vars defined only once when including.
# Report from Marcus G. Daniels.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<END
AC_OUTPUT
# in the HEADERS variable for *all* generated Makefile.ins in the
# project.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_SUBST([MY_HEADERS])
$ACLOCAL
$AUTOMAKE
-grep '[^@]MY_HEADERS' Makefile.in && Exit 1
-Exit 0
+grep '[^@]MY_HEADERS' Makefile.in && exit 1
+exit 0
# the configure help screen.
# Keep this in sync with sister test 'help-depend2.test'
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# dependency tracking, it adds proper text to the configure help screen.
# Keep this in sync with sister test 'help-depend.test'
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# Make sure that our macro 'AM_WITH_DMALLOC' adds proper text to
# the configure help screen.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# Make sure that our grand macro 'AM_INIT_AUTOMAKE' add proper text
# to the configure help screen.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac <<END
AC_INIT([$me], [1.0])
$ACLOCAL
$AUTOCONF
-./configure --help >stdout || { cat stdout; Exit 1; }
+./configure --help >stdout || { cat stdout; exit 1; }
cat stdout
grep '^ --program-prefix[= ]' stdout
# Make sure that our macro 'AM_PATH_LISPDIR' adds proper text to
# the configure help screen.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac <<END
AC_INIT([$me], [1.0])
$ACLOCAL
$AUTOCONF
-./configure --help >stdout || { cat stdout; Exit 1; }
+./configure --help >stdout || { cat stdout; exit 1; }
cat stdout
grep_configure_help --with-lispdir ' override.*lisp directory'
# FIXME: the features tested by this script has been moved in contrib.
# FIXME: We should move this script accordingly.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# Make sure that macro 'AM_PATH_PYTHON' adds proper text to the
# configure help screen.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# Make sure that our macro 'AM_SILENT_RULES' adds proper text to
# the configure help screen.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# Make sure that our macro 'AM_PROG_UPC' adds proper text to
# the configure help screen.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# Make sure --help and --version work, even when no configure.ac nor
# configure.in is in the current directory.
-. ./defs || Exit 1
+. ./defs || exit 1
# Ensure we run in an empty directory.
mkdir emptydir
# Sanity checks: aclocal and automake cannot work without configure.ac
# nor configure.in.
-$ACLOCAL 2>stderr && { cat stderr >&2; Exit 1; }
+$ACLOCAL 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
$FGREP configure.ac stderr
AUTOMAKE_fails
# Make sure --help and --version work, even when the current directory
# contains a broken configure.ac and a broken acinclude.m4.
-. ./defs || Exit 1
+. ./defs || exit 1
# Ensure we run in a new, clean directory.
mkdir cleandir
$ACLOCAL --help
# Sanity check: aclocal cannot work with broken acinclude.m4.
-$ACLOCAL 2>stderr && { cat stderr >&2; Exit 1; }
+$ACLOCAL 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
$FGREP acinclude.m4 stderr
rm -f acinclude.m4
# Sanity checks: aclocal and automake cannot work with broken configure.ac.
-$ACLOCAL 2>stderr && { cat stderr >&2; Exit 1; }
+$ACLOCAL 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
$FGREP configure.ac stderr
AUTOMAKE_fails
# Make sure --help and --version takes precedence over other options.
-. ./defs || Exit 1
+. ./defs || exit 1
# We must have full control over the content of the current directory.
mkdir cleandir
# Check that the first among --help and --version to be specified on
# the command line takes precedence over the following one.
-. ./defs || Exit 1
+. ./defs || exit 1
# Ensure we run in an empty directory.
mkdir emptydir
escape_dots () { sed 's/\./\\./g'; } # Avoid issues with "\" in backquotes.
apiversion_rx=$(echo "$APIVERSION" | escape_dots)
-$ACLOCAL --version --help >stdout || { cat stdout; Exit 1; }
+$ACLOCAL --version --help >stdout || { cat stdout; exit 1; }
cat stdout
grep "^aclocal.*$apiversion_rx" stdout
-grep "^Usage" stdout && Exit 1
+grep "^Usage" stdout && exit 1
-$ACLOCAL --help --version >stdout || { cat stdout; Exit 1; }
+$ACLOCAL --help --version >stdout || { cat stdout; exit 1; }
cat stdout
grep "^Usage" stdout
-grep "^aclocal.*$apiversion_rx" stdout && Exit 1
+grep "^aclocal.*$apiversion_rx" stdout && exit 1
-$AUTOMAKE --version --help >stdout || { cat stdout; Exit 1; }
+$AUTOMAKE --version --help >stdout || { cat stdout; exit 1; }
cat stdout
grep "^automake.*$apiversion_rx" stdout
-grep "^Usage" stdout && Exit 1
+grep "^Usage" stdout && exit 1
-$AUTOMAKE --help --version >stdout || { cat stdout; Exit 1; }
+$AUTOMAKE --help --version >stdout || { cat stdout; exit 1; }
cat stdout
grep "^Usage" stdout
-grep "^automake.*$apiversion_rx" stdout && Exit 1
+grep "^automake.*$apiversion_rx" stdout && exit 1
:
# Darwin).
# Report from Peter O'Gorman.
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_OUTPUT >>configure.ac
: >CHANGELOG
# Test to make sure implicit .o's are listed as appropriate. Report
# from Henrik Frystyk Nielsen.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# FIXME: This test is probably obsoleted, or wrong. The generated
# Makefile.in seems not to define any 'INFOS' variable!
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
info_TEXINFOS = foo.texi
foo*)
;;
*)
- Exit 1
+ exit 1
;;
esac
done
# Make sure we give a sensible error message when AC_INIT and
# AM_INIT_AUTOMAKE are both given less than two arguments.
-. ./defs || Exit 1
+. ./defs || exit 1
for ac_init_args in '' '([x])'; do
for am_init_args in '' '([1.10])'; do
END
cat configure.ac # For debugging.
# The error message should mention AC_INIT, not AC_PACKAGE_VERSION.
- ($ACLOCAL && $AUTOCONF) 2>stderr && { cat stderr >&2; Exit 1; }
+ ($ACLOCAL && $AUTOCONF) 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
- $FGREP AC_PACKAGE_VERSION stderr && Exit 1
+ $FGREP AC_PACKAGE_VERSION stderr && exit 1
grep 'configure\.ac:.* AC_INIT .*arguments' stderr
done
done
# Make sure we give a sensible error message when AM_INIT_AUTOMAKE
# contains junk.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >configure.ac <<END
AC_INIT([init2], [1.0])
$ACLOCAL
AUTOMAKE_fails
grep 'nosuchoption.*recognized' stderr
-Exit 0
+exit 0
# Test for bug where install-sh not included in distribution.
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_OUTPUT >> configure.ac
# FIXME: and could be merged with 'txinfo27.test'.
required=makeinfo
-. ./defs || Exit 1
+. ./defs || exit 1
cwd=$(pwd) || fatal_ "cannot get current working directory"
$MAKE uninstall
test ! -f $instdir/info/foo.info
- $FGREP 'but has a nice name' $instdir/info/dir && Exit 1
+ $FGREP 'but has a nice name' $instdir/info/dir && exit 1
dir="$destdir/$cwd/$instdir/info"
$FGREP 'Does nothing at all, but has a nice name' "$dir"/dir
$MAKE DESTDIR="$cwd/$destdir" uninstall
test ! -f "$dir"/foo.info
- $FGREP 'but has a nice name' "$dir"/dir && Exit 1
+ $FGREP 'but has a nice name' "$dir"/dir && exit 1
unset dir
exit 127
END
chmod a+x bin/install-info
-$MAKE install-info >output 2>&1 || { cat output; Exit 1; }
+$MAKE install-info >output 2>&1 || { cat output; exit 1; }
cat output
test -f $instdir/info/foo.info
test ! -f $instdir/info/dir
-grep 'error from install-info' output && Exit 1
+grep 'error from install-info' output && exit 1
rm -rf $instdir output
$MAKE uninstall
test ! -f $instdir/info/foo.info
test -f $instdir/info/dir
- $FGREP 'but has a nice name' $instdir/info/dir && Exit 1
+ $FGREP 'but has a nice name' $instdir/info/dir && exit 1
: For shells with busted 'set -e'.
fi
test -f $instdir/info/dir
env AM_UPDATE_INFO_DIR="$val" $MAKE uninstall
test ! -f $instdir/info/foo.info
- $FGREP 'but has a nice name' $instdir/info/dir && Exit 1
+ $FGREP 'but has a nice name' $instdir/info/dir && exit 1
: For shells with busted 'set -e'.
done
fi
# From Pavel Roskin.
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << END
AC_INIT([$me], [1.0])
# 'dist' should fail because we can't copy Makefile.am.
if $MAKE dist; then
- Exit 1
+ exit 1
else
- Exit 0
+ exit 0
fi
# installdirs is missing this. Ideally this would be an automatic
# feature of any exported target.
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_OUTPUT >> configure.ac
# Test to see if defining INSTALL_DATA causes problems. From EGCS
# list.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<END
AC_SUBST([INSTALL_DATA])
$ACLOCAL
$AUTOMAKE
-grep '^DATA =' Makefile.in | grep 'INSTALL_DATA' && Exit 1
-Exit 0
+grep '^DATA =' Makefile.in | grep 'INSTALL_DATA' && exit 1
+exit 0
# Test that installing under $exec_prefix is handled by install-exec.
# Testing with headers for instance.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >Makefile.am << 'EOF'
# User directories.
##pkginclude_SCRIPTS = script
EOF
-$ACLOCAL || Exit 1
+$ACLOCAL || exit 1
$AUTOMAKE
# install-SCRIPTS targets.
diff expected produced
-Exit 0
+exit 0
# Check against automake bug#10997: directories holding only
# conditionally-installed files should not be created unconditionally.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_CONDITIONAL([ENABLE_FOO], [false])
# FIXME: So this test is still xfailing.
# See sister test 'instdir-cond.test' for the succeeding part.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_CONDITIONAL([ENABLE_FOO], [false])
./configure --prefix="$(pwd)/inst"
$MAKE installdirs
-test ! -d inst || { find inst; Exit 1; }
+test ! -d inst || { find inst; exit 1; }
:
# If $(javadir) is the empty string, then nothing should be installed there.
required=javac
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'END'
AC_OUTPUT
$MAKE -e install DESTDIR="$destdir"
test ! -d "$instdir"
test ! -d "$destdir"
-$MAKE -e uninstall > stdout || { cat stdout; Exit 1; }
+$MAKE -e uninstall > stdout || { cat stdout; exit 1; }
cat stdout
-grep 'rm -f' stdout && Exit 1
+grep 'rm -f' stdout && exit 1
$MAKE -e uninstall DESTDIR="$destdir"
:
# If $(lispdir) is the empty string, then nothing should be installed there.
required=emacs
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'END'
AM_PATH_LISPDIR
$MAKE -e install DESTDIR="$destdir"
test ! -d "$instdir"
test ! -d "$destdir"
-$MAKE -e uninstall > stdout || { cat stdout; Exit 1; }
+$MAKE -e uninstall > stdout || { cat stdout; exit 1; }
cat stdout
-grep 'rm -f' stdout && Exit 1
+grep 'rm -f' stdout && exit 1
$MAKE -e uninstall DESTDIR="$destdir"
:
# This test exercises the libtool code paths.
required='cc libtoolize'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'END'
AC_PROG_CC
$MAKE -e install DESTDIR="$destdir"
test ! -d "$instdir"
test ! -d "$destdir"
-$MAKE -e uninstall > stdout || { cat stdout; Exit 1; }
+$MAKE -e uninstall > stdout || { cat stdout; exit 1; }
cat stdout
# Creative quoting below to please maintainer-check.
-grep 'rm'' ' stdout && Exit 1
-$MAKE -e uninstall DESTDIR="$destdir" > stdout || { cat stdout; Exit 1; }
+grep 'rm'' ' stdout && exit 1
+$MAKE -e uninstall DESTDIR="$destdir" > stdout || { cat stdout; exit 1; }
cat stdout
# Creative quoting below to please maintainer-check.
-grep 'rm'' ' stdout && Exit 1
+grep 'rm'' ' stdout && exit 1
:
# An empty "foo_PRIMARY" declaration should *not* cause "make install"
# to create directory $(foodir). See automake bug#10997 and bug#11030.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
AC_SUBST([CC], [whatever])
./configure --prefix="$cwd/inst"
doinst
-test ! -d inst || { find inst; Exit 1; }
+test ! -d inst || { find inst; exit 1; }
$MAKE uninstall
doinst bin_SCRIPTS=foo.sh AM_MAKEFLAGS='bin_SCRIPTS=foo.sh'
test -f inst/bin/foo.sh
./configure
doinst DESTDIR="$cwd/dest"
-test ! -d dest || { find dest; Exit 1; }
+test ! -d dest || { find dest; exit 1; }
$MAKE uninstall
doinst DESTDIR="$cwd/dest" bin_SCRIPTS=foo.sh AM_MAKEFLAGS='bin_SCRIPTS=foo.sh'
test -f dest/usr/local/bin/foo.sh
# This test exercises the prog and libs code paths.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'END'
AC_PROG_CC
$MAKE -e install DESTDIR="$destdir"
test ! -d "$instdir"
test ! -d "$destdir"
-$MAKE -e uninstall > stdout || { cat stdout; Exit 1; }
+$MAKE -e uninstall > stdout || { cat stdout; exit 1; }
cat stdout
# Creative quoting below to please maintainer-check.
-grep 'rm'' ' stdout && Exit 1
-$MAKE -e uninstall DESTDIR="$destdir" > stdout || { cat stdout; Exit 1; }
+grep 'rm'' ' stdout && exit 1
+$MAKE -e uninstall DESTDIR="$destdir" > stdout || { cat stdout; exit 1; }
cat stdout
# Creative quoting below to please maintainer-check.
-grep 'rm'' ' stdout && Exit 1
+grep 'rm'' ' stdout && exit 1
:
# If $(pythondir) is the empty string, then nothing should be installed there.
required=python
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'END'
AM_PATH_PYTHON
$MAKE -e install DESTDIR="$destdir"
test ! -d "$instdir"
test ! -d "$destdir"
-$MAKE -e uninstall > stdout || { cat stdout; Exit 1; }
+$MAKE -e uninstall > stdout || { cat stdout; exit 1; }
cat stdout
-grep 'rm -f' stdout && Exit 1
+grep 'rm -f' stdout && exit 1
$MAKE -e uninstall DESTDIR="$destdir"
:
# Likewise for the other install-* targets used for texinfo files.
required='makeinfo-html tex texi2dvi'
-. ./defs || Exit 1
+. ./defs || exit 1
dvips --help \
|| skip_ "dvips is missing"
$MAKE -e install install-html install-dvi install-ps install-pdf DESTDIR="$destdir"
test ! -d "$instdir"
test ! -d "$destdir"
-$MAKE -e uninstall > stdout || { cat stdout; Exit 1; }
+$MAKE -e uninstall > stdout || { cat stdout; exit 1; }
cat stdout
-grep 'rm -f' stdout && Exit 1
+grep 'rm -f' stdout && exit 1
$MAKE -e uninstall DESTDIR="$destdir"
:
# This test only ensures this if $(foo_PRIMARY) is also empty, see
# instdir2.test and siblings instdir-*.test for nonempty contents.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'END'
AC_SUBST([foodir], ['${datadir}'/foo])
$MAKE -e install DESTDIR="$destdir"
test ! -d "$instdir"
test ! -d "$destdir"
-$MAKE -e uninstall > stdout || { cat stdout; Exit 1; }
+$MAKE -e uninstall > stdout || { cat stdout; exit 1; }
cat stdout
-grep 'rm -f' stdout && Exit 1
+grep 'rm -f' stdout && exit 1
$MAKE -e uninstall DESTDIR="$destdir"
:
# This test ensures this also if $(foo_PRIMARY) is nonempty, see
# instdir.test.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'END'
AC_SUBST([foodir], ['${datadir}'/foo])
$MAKE -e install DESTDIR="$destdir"
test ! -d "$instdir"
test ! -d "$destdir"
-$MAKE -e uninstall > stdout || { cat stdout; Exit 1; }
+$MAKE -e uninstall > stdout || { cat stdout; exit 1; }
cat stdout
-grep 'rm -f' stdout && Exit 1
+grep 'rm -f' stdout && exit 1
$MAKE -e uninstall DESTDIR="$destdir"
:
# Test for this bug: when a Makefile.am builds nothing, no
# install-exec target is generated.
-. ./defs || Exit 1
+. ./defs || exit 1
: > Makefile.am
# This test has a few sister tests, for java, info, libtool.
required='makeinfo'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<END
AC_OUTPUT
do
chmod a-r $file
test ! -r $file || skip_ "cannot drop file read permissions"
- $MAKE install-data && Exit 1
+ $MAKE install-data && exit 1
chmod u+r $file
done
# This is the java sister test of instfail.test.
required=javac
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'END'
AC_OUTPUT
do
chmod a-r $file
test ! -r $file || skip_ "cannot drop file read permissions"
- $MAKE install-data && Exit 1
+ $MAKE install-data && exit 1
chmod u+r $file
done
# This is the libtool sister test of instfail.test
required='cc libtool libtoolize'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<END
AM_PROG_AR
do
chmod a-r $file
test ! -r $file || skip_ "cannot drop file read permissions"
- $MAKE install-exec && Exit 1
+ $MAKE install-exec && exit 1
chmod u+r $file
done
$MAKE unreadable-prog
-$MAKE install-exec && Exit 1
+$MAKE install-exec && exit 1
$MAKE readable-prog
$MAKE unreadable-progn
-$MAKE install-exec && Exit 1
+$MAKE install-exec && exit 1
$MAKE readable-progn
:
# This test has a few sister tests, for java, info, libtool.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<END
AC_PROG_CC
do
chmod a-r $file
test ! -r $file || skip_ "cannot drop file read permissions"
- $MAKE install-exec && Exit 1
+ $MAKE install-exec && exit 1
chmod u+r $file
done
$MAKE unreadable-prog
-$MAKE install-exec && Exit 1
+$MAKE install-exec && exit 1
$MAKE readable-prog
$MAKE unreadable-progn
-$MAKE install-exec && Exit 1
+$MAKE install-exec && exit 1
$MAKE readable-progn
if ! grep "^EMACS = no" Makefile; then
for file in lisp1.el lisp1.elc; do
chmod a-r $file
- $MAKE install-data && Exit 1
+ $MAKE install-data && exit 1
chmod u+r $file
done
fi
# Make sure the install-exec-hook example we give in the manual works.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'EOF'
AC_PROG_LN_S
# Make sure the MKDIR_P invocation is correct in install-man
# target. Bug reported by Gordon Irlam <gordoni@cygnus.com>.
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_OUTPUT >> configure.ac
# Test to make sure mkinstalldirs invocation correct in install-man
# target. Bug reported by Gordon Irlam <gordoni@cygnus.com>.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'EOF'
man8_MANS = frob.8
# This is the mans sister test of instmany.test, see there for details.
-. ./defs || Exit 1
+. ./defs || exit 1
# In order to have a useful test on modern systems (which have a high
# limit, if any), use a fake install program that errors out for more
for file in page3.1 page$nfiles.1 npage3.1 npage$nfiles.1; do
chmod a-r $srcdir/$file
test ! -r $srcdir/$file || skip_ "cannot drop file read permissions"
- $MAKE install-man1 && Exit 1
+ $MAKE install-man1 && exit 1
chmod u+r $srcdir/$file
done
for file in page3.man page$nfiles.man npage3.man npage$nfiles.man; do
chmod a-r $srcdir/$file
- $MAKE install-man3 && Exit 1
+ $MAKE install-man3 && exit 1
chmod u+r $srcdir/$file
done
# This is the python sister test of instmany.test, see there for details.
required='python'
-. ./defs || Exit 1
+. ./defs || exit 1
limit=2500
subdir=long_subdir_name_with_many_characters
do
chmod a-r $srcdir/$file
test ! -r $srcdir/$file || skip_ "cannot drop file read permissions"
- $MAKE install && Exit 1
+ $MAKE install && exit 1
chmod u+r $srcdir/$file
done
for file in npython3.py npython$nfiles.py
do
chmod a-r $srcdir/$file
- $MAKE install && Exit 1
+ $MAKE install && exit 1
chmod u+r $srcdir/$file
done
# For texinfos, we expand names using $(srcdir) in the first place.
# Let's hope nobody uses many texinfos.
-. ./defs || Exit 1
+. ./defs || exit 1
# In order to have a useful test on modern systems (which have a high
# limit, if any), use a fake install program that errors out for more
do
chmod a-r $srcdir/$file
test ! -r $srcdir/$file || skip_ "cannot drop file read permissions"
- $MAKE install-binSCRIPTS && Exit 1
+ $MAKE install-binSCRIPTS && exit 1
chmod u+r $srcdir/$file
done
for file in nscript3 nscript$nfiles
do
chmod a-r $srcdir/$file
- $MAKE install-nobase_binSCRIPTS && Exit 1
+ $MAKE install-nobase_binSCRIPTS && exit 1
chmod u+r $srcdir/$file
done
for file in data3 data$nfiles
do
chmod a-r $srcdir/$file
- $MAKE install-dataDATA && Exit 1
+ $MAKE install-dataDATA && exit 1
chmod u+r $srcdir/$file
done
for file in ndata3 ndata$nfiles
do
chmod a-r $srcdir/$file
- $MAKE install-nobase_dataDATA && Exit 1
+ $MAKE install-nobase_dataDATA && exit 1
chmod u+r $srcdir/$file
done
for file in header3.h header$nfiles.h
do
chmod a-r $srcdir/$file
- $MAKE install-includeHEADERS && Exit 1
+ $MAKE install-includeHEADERS && exit 1
chmod u+r $srcdir/$file
done
for file in nheader3.h nheader$nfiles.h
do
chmod a-r $srcdir/$file
- $MAKE install-nobase_includeHEADERS && Exit 1
+ $MAKE install-nobase_includeHEADERS && exit 1
chmod u+r $srcdir/$file
done
# automake: Makefile.am: required file "../../install-sh" not found; installing
# This also makes sure that install-sh is created in the correct directory.
-. ./defs || Exit 1
+. ./defs || exit 1
: > Makefile.am
rm -f install-sh
# Only one '/' should appear in the output.
cat output
-grep '/.*/' output && Exit 1
+grep '/.*/' output && exit 1
test -f install-sh
# Various install-sh checks.
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
get_shell_script install-sh
# Basic errors.
-./install-sh && Exit 1
-./install-sh -m 644 dest && Exit 1
+./install-sh && exit 1
+./install-sh -m 644 dest && exit 1
# Directories.
./install-sh -T x d3/y
test -f x
test -f d3/y
-./install-sh -T x d3 && Exit 1
-./install-sh -T x d4// && Exit 1
+./install-sh -T x d3 && exit 1
+./install-sh -T x d4// && exit 1
# Ensure that install-sh works with names that include spaces.
touch 'a b'
# Ensure we do not run into 'test' operator precedence bugs with Tru64 sh.
for c in = '(' ')' '!'; do
- ./install-sh $c 2>stderr && { cat stderr >&2; Exit 1; }
+ ./install-sh $c 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
- grep 'test: ' stderr && Exit 1
+ grep 'test: ' stderr && exit 1
# Skip tests if the file system is not capable.
mkdir ./$c || continue
rmdir ./$c
am_create_testdir=empty
required=non-root
-. ./defs || Exit 1
+. ./defs || exit 1
# Solaris /usr/ucb/touch does not accept -t.
touch -t $old_timestamp foo \
# Original report from James Amundson about file names with spaces.
# Other characters added by Paul Eggert.
-. ./defs || Exit 99
+. ./defs || exit 99
# Usage: is_in_list ITEM [LIST...]
is_in_list ()
# Test to make sure variable interpolation works.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Test to make sure variable interpolation doesn't break other
# features. Report from Joel N. Weber, II.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# See automake bug#8234.
required=javac
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
./configure --prefix="$inst"
$MAKE
-ls | $EGREP '\.(class|stamp)$' && Exit 1
+ls | $EGREP '\.(class|stamp)$' && exit 1
# Make Two.java compilable.
echo '}' >> Two.java
test -f One.class
test -f Two.class
# ... but should *not* install them.
-$FGREP checkdir Makefile && Exit 1
+$FGREP checkdir Makefile && exit 1
$MAKE install
-test -d _inst && Exit 1
+test -d _inst && exit 1
:
# Test cleaning of Java class files and timestamps.
required=javac
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
AC_OUTPUT
done
done
$MAKE clean
-find . -name '*.class' -o -name '*.stamp' | grep . && Exit 1
+find . -name '*.class' -o -name '*.stamp' | grep . && exit 1
# We should not remove unrelated stamp files.
echo timestamp > classjava2.stamp
echo timestamp > classdist_java.stamp
# Test on compilation and installation of Java class files.
required=javac
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'EOF'
AC_OUTPUT
required='java javac'
am_serial_tests=yes
-. ./defs || Exit 1
+. ./defs || exit 1
echo "AC_SUBST([PATH_SEPARATOR], ['$PATH_SEPARATOR'])" >> configure.ac
# of the older non-parallel 'simple-tests' driver.
required='java javac'
-. ./defs || Exit 1
+. ./defs || exit 1
echo "AC_SUBST([PATH_SEPARATOR], ['$PATH_SEPARATOR'])" >> configure.ac
# compilation time. See automake bug#9306.
required=javac
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
AC_CONFIG_SRCDIR([org/gnu/bug/Library.java])
# conditionals).
required=javac
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_CONDITIONAL([COND], [test x"$cond" = x"yes"])
# modifiers. Also check that '.java' files are not distributed by
# default.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
# Automake used to display non-fatal warnings with this test, but
# they were unexpected, so we want to consider them as failures in
# this test.
-$AUTOMAKE 2>stderr || { cat stderr >&2; Exit 1; }
+$AUTOMAKE 2>stderr || { cat stderr >&2; exit 1; }
cat stderr >&2
test ! -s stderr
# Test that some Java-related variables and rules are not repeatedly
# defined.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
javadir = $(datadir)/java
# Test support of 'nobase_' with the 'JAVA' primary.
required=javac
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'END'
AC_OUTPUT
# be installed.
required=javac
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
done
$MAKE install
-test -d _inst && { ls -l _inst; Exit 1; }
+test -d _inst && { ls -l _inst; exit 1; }
:
# Test rebuild rules for Java class files.
required='javac'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
AC_OUTPUT
# Test definition of automake-generated private Makefile variable
# '$(am__java_sources)'.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
# Check uninstallation of Java class files.
required=javac
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
# Minimal test of Java functionality.
required=javac
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'EOF'
AC_OUTPUT
# no classes to compile.
# Report from Braden McDaniel.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_CONDITIONAL(WITH_JDK, false)
# *.java files when there are none.
# Report from Johannes Nicolai (PR/441).
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_CONDITIONAL([WHO_CARES], [false])
$MAKE
$MAKE install
ls -l .
-find . -name '*.class' | grep . && Exit 1
+find . -name '*.class' | grep . && exit 1
# If we have nothing to install, we shouldn't create any installation
# directory. Related to automake bug#11030.
test ! -d _inst
# the *.class files).
# See automake bug#8461.
-. ./defs || Exit 1
+. ./defs || exit 1
$ACLOCAL
echo java_JAVA = a.java > Makefile.am
AUTOMAKE_fails
grep '^Makefile\.am:1:.*java_JAVA.*javadir.* undefined' stderr
-$EGREP '(uninitialized|line) ' stderr && Exit 1
+$EGREP '(uninitialized|line) ' stderr && exit 1
echo javadir = a-dummy-value >> Makefile.am
$AUTOMAKE
# Check support for $(JAVACFLAGS) and $(AM_JAVACFLAGS).
-. ./defs || Exit 1
+. ./defs || exit 1
cat > fake-javac <<'END'
#!/bin/sh
$ACLOCAL
$AUTOMAKE
-grep '\$(JAVACFLAGS).*\$(AM_JAVACFLAGS)' Makefile.in && Exit 1
+grep '\$(JAVACFLAGS).*\$(AM_JAVACFLAGS)' Makefile.in && exit 1
: > bar.java
# Test to make sure JAVA variable can be defined by AC_SUBST.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_SUBST([JAVA])
# Test to make sure redefining JAVAC with AC_SUBST works.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_SUBST([JAVAC])
# Check to make sure incorrect LDADD usage is diagnosed.
required=libtool
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
: > config.sub
: > q.c
-$ACLOCAL || Exit 1
+$ACLOCAL || exit 1
AUTOMAKE_fails -Wno-extra-portability
grep "libtu_la_LDADD" stderr
grep " use 'libtu_la_LIBADD'" stderr
# PR 77.
required=libtool
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# See also sister test 'lex-clean.test'.
required='c++ lex'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CXX
# See also sister test 'lex-clean-cxx.test'.
required='cc lex'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Test synthesized from PR automake/6.
required='c++ lex'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CXX
# in obvious ways. See PR automake/6, and related semantic tests
# 'lex-depend.test' and 'lex-depend-cxx.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Test suggested by PR automake/6.
required='cc lex'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
$MAKE test-deps-exist
$MAKE
-cross_compiling || test "$(./zoo)" = 'Hello, World!' || Exit 1
+cross_compiling || test "$(./zoo)" = 'Hello, World!' || exit 1
$sleep
cat >> my-hdr.h << 'END'
END
$MAKE test-obj-updated
$MAKE
-cross_compiling || test "$(./zoo)" = 'Howdy, Earth!' || Exit 1
+cross_compiling || test "$(./zoo)" = 'Howdy, Earth!' || exit 1
:
# library, if that's available.
required='cc lex'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
$MAKE all
if ! cross_compiling; then
echo GOOD | ./lexer
- echo BAD | ./lexer && Exit 1
+ echo BAD | ./lexer && exit 1
: For shells with busted 'set -e'.
fi
yl_distcheck
# See also test 'lex-lib-external.test'.
required='cc lex'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# LIBOBJ machinery.
required='cc lex'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# See also sister test 'yacc-line.test'.
required='cc lex'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_CONFIG_FILES([sub/Makefile])
ls -l . sub sub/dir
$EGREP 'line|\.l' $c_outputs
- grep '#.*line.*build.*\.l' $c_outputs && Exit 1
+ grep '#.*line.*build.*\.l' $c_outputs && exit 1
# Adjusted "#line" should not contain reference to the absolute
# srcdir.
- $EGREP '#.*line *"?/.*\.l' $c_outputs && Exit 1
+ $EGREP '#.*line *"?/.*\.l' $c_outputs && exit 1
# Adjusted "#line" should not contain reference to the default
# output file names, e.g., 'lex.yy.c'.
- grep '#.*line.*lex\.yy' $c_outputs && Exit 1
+ grep '#.*line.*lex\.yy' $c_outputs && exit 1
# Look out for a silly regression.
- grep "#.*\.l.*\.l" $c_outputs && Exit 1
+ grep "#.*\.l.*\.l" $c_outputs && exit 1
if $vpath; then
grep '#.*line.*"\.\./zardoz\.l"' zardoz.c
grep '#.*line.*"\.\./dir/quux\.l"' bar-quux.c
# for yacc-generated .c and .h files.
required='cc lex'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Check Lex support with flex using the '%noyywrap' option.
required='cc flex'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
$MAKE
if ! cross_compiling; then
echo GOOD | ./foo
- echo BAD | ./foo && Exit 1
+ echo BAD | ./foo && exit 1
: For shells with busted 'set -e'.
fi
# for yacc-generated .c and .h files.
required='cc lex'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'EOF'
AM_MAINTAINER_MODE
# are used, even when dependency tracking is disabled.
required='cc lex'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<\END
AC_PROG_CC
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Test to make sure that lex source generates correct clean rule.
# From Ralf Corsepius.
-$FGREP joel Makefile.in && Exit 1
+$FGREP joel Makefile.in && exit 1
:
# Make sure that Automake suggest using AM_PROG_LEX when a lexer is used.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# From Matthew D. Langston.
required='cc lex'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
$MAKE
if ! cross_compiling; then
echo GOOD | ./foo
- echo BAD | ./foo && Exit 1
+ echo BAD | ./foo && exit 1
: For shells with busted 'set -e'.
fi
# Test for subdir lexers.
required='cc lex'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Test to make sure Lex + C++ is supported.
# Please keep this is sync with sister test yaccpp.test.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CXX
# Please keep this in sync with sister test 'yaccvapth.test'.
required='cc lex'
-. ./defs || Exit 1
+. ./defs || exit 1
cat > lexoutroot.in << 'END'
LEX_OUTPUT_ROOT='@LEX_OUTPUT_ROOT@'
# and yflags2.test.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >fake-lex <<'END'
#!/bin/sh
$ACLOCAL
$AUTOMAKE -a
-grep '\$(LFLAGS).*\$(bar_LFLAGS)' Makefile.in && Exit 1
-grep '\$(LFLAGS).*\$(AM_LFLAGS)' Makefile.in && Exit 1
+grep '\$(LFLAGS).*\$(bar_LFLAGS)' Makefile.in && exit 1
+grep '\$(LFLAGS).*\$(AM_LFLAGS)' Makefile.in && exit 1
: > foo.l
: > bar.l
# Please keep this in sync with the sister tests lflags.test, yflags.test
# and yflags2.test.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >fake-lex <<'END'
#!/bin/sh
$ACLOCAL
$AUTOMAKE -a
-grep '\$(LFLAGS).*\$(bar_LFLAGS)' Makefile.in && Exit 1
-grep '\$(LFLAGS).*\$(AM_LFLAGS)' Makefile.in && Exit 1
+grep '\$(LFLAGS).*\$(bar_LFLAGS)' Makefile.in && exit 1
+grep '\$(LFLAGS).*\$(AM_LFLAGS)' Makefile.in && exit 1
: > foo.ll
: > bar.l++
# PROGRAMS and LIBRARIES can be installed in (pkg)libexecdir.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
libexec_PROGRAMS = foo
# Make sure AC_LIBSOURCE and AC_LIBSOURCES work.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
mv configure.ac configure.proto
cat >> configure.proto << 'END'
# it's in BUILT_SOURCES. Reported by Erez Zadok.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Test if a file can be mentioned in LIBOBJS and explicitly.
# (See libobj13.test for the LTLIBRARIES check.)
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# (Like libobj12.test, but for Libtool libraries.)
required='libtoolize'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# that uses it.
# Report from Bill Davidson.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'EOF'
AC_PROG_CC
# Nonexistent sources for AC_LIBOBJ should cause an Automake failure.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Nonexistent source for AC_LIBSOURCE should cause Automake to fail.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Nonexistent sources for AC_LIBSOURCES should cause Automake to fail.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
: > foobar.c
AUTOMAKE_fails
grep 'configure\.ac:.*required file.*bazquux\.c.*' stderr
-grep 'foobar\.c' stderr && Exit 1
+grep 'foobar\.c' stderr && exit 1
:
# Please keep this in sync with sister test 'libobj16b.test'.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
mv configure.ac configure.proto
cat >> configure.proto << 'END'
# Please keep this in sync with sister test 'libobj16a.test'.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
mv configure.ac configure.proto
cat >> configure.proto << 'END'
# Make sure AC_LIBOBJ accept non-literal arguments.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Make sure AC_LIBSOURCE and AC_LIBSOURCES use arguments literally.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Test support for AC_CONFIG_LIBOBJ_DIR.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_CONFIG_LIBOBJ_DIR([libobj-dir])
# Bug from Josh MacDonald.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_CONFIG_FILES([subdir/Makefile])
# Test error reporting for AC_CONFIG_LIBOBJ_DIR.
# See also sister tests 'libobj20b.test' and 'libobj20c.test' .
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_CONFIG_LIBOBJ_DIR([libobj-dir])
# Test error reporting for AC_CONFIG_LIBOBJ_DIR.
# See also sister tests 'libobj20a.test' and 'libobj20c.test' .
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_CONFIG_LIBOBJ_DIR([libobj-dir])
# Test error reporting for AC_CONFIG_LIBOBJ_DIR.
# See also sister tests 'libobj20a.test' and 'libobj20b.test' .
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_CONFIG_LIBOBJ_DIR([libobj-dir])
# Make sure we complain if @LIBOBJS@ is used without being set in
# configure.ac.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_RANLIB
# Test to make sure LIBOBJS error only occurs if LIBOBJS seen. Report
# from Jim Meyering.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
bin_PROGRAMS = foo
# Test to make sure AC_REPLACE_FUNCS works across lines. Report from
# Jim Meyering.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
bin_PROGRAMS = joe
# Test for multiple replacement functions.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Test for _DEPENDENCIES with libraries.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_RANLIB
# Make sure Automake suggest using AC_PROG_RANLIB when *_LIBRARIES is used.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Make sure Automake simplify conditions in diagnostics.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<EOF
AC_PROG_CC
# Report from Guillermo Ontañón.
required='cc libtoolize'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_PROG_AR
# Report by Charles Wilson.
required='cc libtoolize'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_LIBTOOL
# to the test cases requiring them.
# See also automake bug#9807.
-. ./defs || Exit 1
+. ./defs || exit 1
echo "# Automatically generated by $me." > get.sh
echo : >> get.sh
# Report from Kevin Dalley.
required=libtool
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_LIBTOOL_DLOPEN
# Report from Eric Magnien.
required=libtoolize
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Also make sure we do not bloat the Makefile with unneeded rules.
required='cc libtoolize'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# We need explicit rules to build 1.o and a.lo. Make sure
# Automake did not output additional rules for 1.lo and and a.lo.
$FGREP '1.o:' Makefile.in
-$FGREP '1.lo:' Makefile.in && Exit 1
-$FGREP 'a.o:' Makefile.in && Exit 1
+$FGREP '1.lo:' Makefile.in && exit 1
+$FGREP 'a.o:' Makefile.in && exit 1
$FGREP 'a.lo:' Makefile.in
./configure
# Make sure Automake suggests AC_PROG_LIBTOOL when *_LTLIBRARIES is used.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
AC_PROG_CC
# Report from Harlan Stenn.
required='libtoolize'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'END'
AM_CONDITIONAL([COND1], [true])
# in different directories. PR/285.
required='libtoolize'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'END'
AM_CONDITIONAL([COND1], [true])
# Also check basic support for AM_LIBTOOLFLAGS/LIBTOOLFLAGS
required='cc libtoolize'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
./configure "--prefix=$(pwd)/_inst"
env LIBTOOLFLAGS=--silent $MAKE print >output 2>&1 || {
cat output
- Exit 1
+ exit 1
}
cat output
grep '1BEG: libmod1.la mod2.la :END1' output
env LIBTOOLFLAGS=--silent $MAKE install >output 2>&1 || {
cat output
- Exit 1
+ exit 1
}
cat output
grep 'silent.*silent.*prg' output
env LIBTOOLFLAGS=--silent $MAKE uninstall >output 2>&1 || {
cat output
- Exit 1
+ exit 1
}
cat output
grep 'silent.*silent.*libmod1' output
# Make sure Automake diagnoses conflicting installations.
required='libtoolize'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'END'
AM_CONDITIONAL([COND1], [true])
libtoolize
$ACLOCAL
AUTOMAKE_fails --add-missing
-grep libb stderr && Exit 1
+grep libb stderr && exit 1
grep 'Makefile.am:3:.*libc.la.*multiply defined' stderr
grep "Makefile.am:9:.*'pkglib" stderr
grep "Makefile.am:2:.*'lib" stderr
# xxx_LDFLAGS.
required='cc libtoolize'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
./configure
env LDFLAGS=ldflags AM_LDFLAGS=am_ldflags libmod1_la_LDFLAGS=lm1_la_ldflags \
CFLAGS=cflags AM_CFLAGS=am_cflags prg2_CFLAGS=prg2_cflags \
- $MAKE -e print >output 2>&1 || { cat output; Exit 1; }
+ $MAKE -e print >output 2>&1 || { cat output; exit 1; }
cat output
grep '1BEG: libmod1.la mod2.la :END1' output
grep '2BEG: mod2.la :END2' output
grep '3BEG:.* am_cflags cflags .*lm1_la_ldflags ldflags.* :END3' output
-grep '3BEG: .*am_ldflags.* :END3' output && Exit 1
+grep '3BEG: .*am_ldflags.* :END3' output && exit 1
grep '4BEG: :END4' output
grep '5BEG: :END5' output
grep '6BEG:.* prg2_cflags cflags .*am_ldflags ldflags.* :END6' output
-grep '6BEG: .*am_cflags.* :END6' output && Exit 1
+grep '6BEG: .*am_cflags.* :END6' output && exit 1
$MAKE
:
# Make sure COPYING is not overwritten, even with -a -f.
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_OUTPUT >>configure.ac
# Check that installing 'COPYING' outputs a warning.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = gnu
# Test to make sure the C++ linker is used when appropriate.
# Matthew D. Langston <langston@SLAC.Stanford.EDU>
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
grep '.\$(CXXLINK)' Makefile.in
# We should not see these patterns:
-grep '.\$(FLINK)' Makefile.in && Exit 1
-grep '.\$(LINK)' Makefile.in && Exit 1
+grep '.\$(FLINK)' Makefile.in && exit 1
+grep '.\$(LINK)' Makefile.in && exit 1
-Exit 0
+exit 0
# See automake bug#11089.
required='cc c++'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Sanity check.
rm -f foo foo.exe
-CC=false $MAKE -e && Exit 99
+CC=false $MAKE -e && exit 99
$MAKE distclean
# Sanity check.
rm -f foo foo.exe
-CXX=false $MAKE -e && Exit 99
+CXX=false $MAKE -e && exit 99
:
# *_SOURCES
# Richard Boulton <richard@tartarus.org>
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
grep '.\$(CXXLINK)' Makefile.in
# We should not see these patterns:
-grep '.\$(FLINK)' Makefile.in && Exit 1
-grep '.\$(LINK)' Makefile.in && Exit 1
+grep '.\$(FLINK)' Makefile.in && exit 1
+grep '.\$(LINK)' Makefile.in && exit 1
-Exit 0
+exit 0
# Test to make sure the Fortran 90 linker is used when appropriate.
# (copied from link_f_only.test) Mike Nolta <mrnolta@princeton.edu>
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_FC
grep '.\$(FCLINK)' Makefile.in
# We should not see these patterns:
-grep '.\$(CXXLINK)' Makefile.in && Exit 1
-grep '.\$(LINK)' Makefile.in && Exit 1
+grep '.\$(CXXLINK)' Makefile.in && exit 1
+grep '.\$(LINK)' Makefile.in && exit 1
-Exit 0
+exit 0
# Test to make sure the Fortran 77 linker is used when appropriate.
# Matthew D. Langston <langston@SLAC.Stanford.EDU>
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_F77
grep '.\$(F77LINK)' Makefile.in
# We should not see these patterns:
-grep '.\$(CXXLINK)' Makefile.in && Exit 1
-grep '.\$(LINK)' Makefile.in && Exit 1
+grep '.\$(CXXLINK)' Makefile.in && exit 1
+grep '.\$(LINK)' Makefile.in && exit 1
-Exit 0
+exit 0
# Test to make sure the Fortran 77 linker is used when appropriate.
# Matthew D. Langston <langston@SLAC.Stanford.EDU>
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
grep '.\$(F77LINK)' Makefile.in
# We should not see these patterns:
-grep '.\$(LINK)' Makefile.in && Exit 1
-grep '.\$(CXXLINK)' Makefile.in && Exit 1
+grep '.\$(LINK)' Makefile.in && exit 1
+grep '.\$(CXXLINK)' Makefile.in && exit 1
-Exit 0
+exit 0
# Test to make sure the C++ linker is used when appropriate.
# Matthew D. Langston <langston@SLAC.Stanford.EDU>
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
grep '.\$(CXXLINK)' Makefile.in
# We should not see these patterns:
-grep '.\$(F77LINK)' Makefile.in && Exit 1
-grep '.\$(LINK)' Makefile.in && Exit 1
+grep '.\$(F77LINK)' Makefile.in && exit 1
+grep '.\$(LINK)' Makefile.in && exit 1
-Exit 0
+exit 0
# Test to make sure the C++ linker is used when appropriate.
# Matthew D. Langston <langston@SLAC.Stanford.EDU>
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CXX
grep '.\$(CXXLINK)' Makefile.in
# We should not see these patterns:
-grep '.\$(F77LINK)' Makefile.in && Exit 1
-grep '.\$(LINK)' Makefile.in && Exit 1
+grep '.\$(F77LINK)' Makefile.in && exit 1
+grep '.\$(LINK)' Makefile.in && exit 1
-Exit 0
+exit 0
# Test to make sure _LINK variables are detected and used as documented.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# We should use foo_LINK not LINK.
grep '.\$(foo_LINK)' Makefile.in
-grep '.\$(LINK).*foo' Makefile.in && Exit 1
+grep '.\$(LINK).*foo' Makefile.in && exit 1
# We should not override the user definition of bar_LINK.
# IOW, bar_LDFLAGS is useless unless bar_LINK refers to it.
-grep '^ *bar_LINK *=.*bar_LDFLAGS' Makefile.in && Exit 1
+grep '^ *bar_LINK *=.*bar_LDFLAGS' Makefile.in && exit 1
grep '.\$(bar_LINK).*bar' Makefile.in
-Exit 0
+exit 0
# Make sure that Automake suggest using AM_PATH_LISPDIR to define lispdir.
-. ./defs || Exit 1
+. ./defs || exit 1
: TRY 1 -- We lack both EMACS and lispdir.
$ACLOCAL
AUTOMAKE_fails
-grep 'lispdir.*undefined' stderr && Exit 1
+grep 'lispdir.*undefined' stderr && exit 1
grep '[Ll]isp source.*EMACS.* undefined' stderr
grep 'define .*EMACS.* add .*AM_PATH_LISPDIR' stderr
$ACLOCAL
AUTOMAKE_fails
-grep 'EMACS.*undefined' stderr && Exit 1
+grep 'EMACS.*undefined' stderr && exit 1
grep '[Ll]isp source.*lispdir.* undefined' stderr
grep 'define .*lispdir.* add .*AM_PATH_LISPDIR' stderr
# Test that compiling interdependent elisp files works.
required=emacs
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'EOF'
lisp_LISP = am-one.el am-two.el am-three.el
# Keep thin in sync with m4/lispdir.m4.
for dir in lib/emacs lib/xemacs share/emacs share/xemacs :; do
if test $dir = :; then
- Exit 1
+ exit 1
elif test -d _inst/$dir/site-lisp; then
break
fi
test -f _inst/$dir/site-lisp/am-three.elc
$MAKE uninstall
-find _inst | $EGREP '\.elc?$' && Exit 1
+find _inst | $EGREP '\.elc?$' && exit 1
# Make sure we build all files when any of them change.
# (We grep a message to make sure the compilation happens.)
unique=0a3346e2af8a689b85002b53df09142a
$sleep
echo "(message \"$unique\")(provide 'am-three)" > am-three.el
-$MAKE >output 2>&1 || { cat output; Exit 1; }
+$MAKE >output 2>&1 || { cat output; exit 1; }
cat output
grep $unique output
# Report from Simon Josefsson.
required=emacs
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'EOF'
lisp_LISP = am-one.el am-two.el am-three.el
# non-bytecompiled *.el files.
required=emacs
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'EOF'
lisp_DATA = am-one.el am-two.el am-three.el
# Test for conditional _LISP.
required=emacs
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'EOF'
dist_lisp_LISP = am-one.el
# Make sure that lisp_LISP also works when emacs is not installed.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'EOF'
dist_lisp_LISP = am-one.el am-two.el am-three.el
$AUTOMAKE --add-missing
./configure
-$MAKE >stdout || { cat stdout; Exit 1; }
+$MAKE >stdout || { cat stdout; exit 1; }
cat stdout
test 1 -eq $(grep -c 'Warnings can be ignored' stdout)
# Check the recover rule of lisp_LISP with parallel make.
required='GNUmake emacs'
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'EOF'
dist_lisp_LISP = am-one.el am-two.el am-three.el
# Use append mode here to avoid dropping output. See automake bug#11413.
: >stdout
-$MAKE -j >>stdout || { cat stdout; Exit 1; }
+$MAKE -j >>stdout || { cat stdout; exit 1; }
cat stdout
test 1 -eq $(grep -c 'Warnings can be ignored' stdout)
# Use append mode here to avoid dropping output. See automake bug#11413.
: >stdout
-$MAKE -j >>stdout || { cat stdout; Exit 1; }
+$MAKE -j >>stdout || { cat stdout; exit 1; }
cat stdout
test 1 -eq $(grep -c 'Warnings can be ignored' stdout)
# Check that 'make -n' works with the lisp_LISP recover rule.
required='emacs non-root'
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'EOF'
dist_lisp_LISP = am-one.el am-two.el am-three.el
# From Adam J. Richter.
required=libtool
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_SUBST([LTLIBOBJS])
# Test for locations in error messages.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_CONDITIONAL([COND1], [true])
cat expected
cat observed
-diff expected observed || Exit 1
+diff expected observed || exit 1
AUTOMAKE_fails -Werror
smash_useless_diffs stderr >observed
cat expected
cat observed
-diff expected observed || Exit 1
+diff expected observed || exit 1
:
# Long lines should be wrapped.
# Report from Albert Chin.
-. ./defs || Exit 1
+. ./defs || exit 1
n=1 files= match=
while test $n -le 100
$ACLOCAL
$AUTOMAKE
-grep $match Makefile.in && Exit 1
+grep $match Makefile.in && exit 1
grep 'filenameb100 grepme' Makefile.in
:
# Long lines of += should be wrapped.
# Report from Simon Josefsson.
-. ./defs || Exit 1
+. ./defs || exit 1
(echo DUMMY = some_long_filename_1;
for i in 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20;
# This combines two examples from the manual.
required='cc libtoolize'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'END'
AM_CONDITIONAL([WANT_LIBFOO], [true])
test -f lib/lib2foo.la
test ! -f lib/lib3foo.la
find empty -type f -print > empty.lst
-test -s empty.lst && { cat empty.lst; Exit 1; }
+test -s empty.lst && { cat empty.lst; exit 1; }
$MAKE uninstall
find lib -type f -print > lib.lst
-test -s lib.lst && { cat lib.lst; Exit 1; }
+test -s lib.lst && { cat lib.lst; exit 1; }
test -f lib1foo.la
test -f lib1bar.la
test -f lib2foo.la
# Test for bug in conditionals.
required='cc native libtoolize'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# This example is taken from the manual.
required='cc native libtoolize'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'END'
AC_PROG_CC
rm -f installcheck-ok
find empty -type f -print > empty.lst
-test -s empty.lst && { cat empty.lst; Exit 1; }
+test -s empty.lst && { cat empty.lst; exit 1; }
$MAKE clean
test ! -f libtop.la
$MAKE uninstall
for d in lib bin; do
find $d -type f -print > $d.lst
- test -s $d.lst && { cat $d.lst; Exit 1; }
+ test -s $d.lst && { cat $d.lst; exit 1; }
: For shells with busted 'set -e'.
done
# Test to make sure libtool library dependencies are correct.
# Report from Lars J. Aas.
required=libtool
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_PROG_AR
$ACLOCAL
$AUTOMAKE
-grep 'OBJECTS =$' Makefile.in && Exit 1
-Exit 0
+grep 'OBJECTS =$' Makefile.in && exit 1
+exit 0
# present since libtool 1.9b, circa 2004).
required='cc libtoolize'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'END'
AC_PROG_CC
if test $? -eq 63; then
skip_ "libtool is too old (probably < 2.0)"
else
- Exit 1
+ exit 1
fi
}
-$EGREP 'LT_(INIT|PREREQ)' configure && Exit 1 # Sanity check.
+$EGREP 'LT_(INIT|PREREQ)' configure && exit 1 # Sanity check.
$AUTOMAKE -a
-./configure --prefix="$(pwd)/inst" >stdout || { cat stdout; Exit 1; }
+./configure --prefix="$(pwd)/inst" >stdout || { cat stdout; exit 1; }
cat stdout
grep '^checking.*dlfcn\.h.* no$' stdout || grep '^checking.*dlopen' stdout
required='libtoolize'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'END'
AC_PROG_CC
# Test to make sure LTLIBOBJS alone works ok.
# Report from Vadim Zeitlin.
required=libtool
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_SUBST([LTLIBOBJS])
# Test to make sure a sensible default source for libraries is used.
required='cc libtool'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Test for correct installation order of nobase libtool libraries.
required='cc libtoolize'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'END'
AC_PROG_CC
./configure --prefix="$(pwd)/inst"
$MAKE
-$MAKE install 2>stderr || { cat stderr >&2; Exit 1; }
+$MAKE install 2>stderr || { cat stderr >&2; exit 1; }
cat stderr >&2
-grep 'has not been installed' stderr && Exit 1
+grep 'has not been installed' stderr && exit 1
$MAKE uninstall
test $(find inst -type f -print | wc -l) -eq 0
# Check support for no-dist-gzip with lzma.
-. ./defs || Exit 1
+. ./defs || exit 1
errmsg='support for lzma.*removed'
# Test to see if 'm4_sinclude' and 'm4_include' works.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'EOF'
sinclude([doesntexist.m4])
$AUTOMAKE
-grep doesntexist Makefile.in && Exit 1
+grep doesntexist Makefile.in && exit 1
grep MAGICALPIG Makefile.in
grep MAGICALHOG Makefile.in
grep GREPME Makefile.in
# This test is for VPATH builds; see sister test 'maintclean.test'
# for in-tree builds.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_CONFIG_FILES([bar sub/Makefile])
# This test is for in-tree builds; see sister test 'maintclean-vpath.test'
# for VPATH builds.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_CONFIG_FILES([bar sub/Makefile])
# related to the enabling/disabling of maintainer mode are correct (see
# automake bug#9890).
-. ./defs || Exit 1
+. ./defs || exit 1
set_maintmode ()
{
check_configure_message_with ()
{
answer=$1; shift
- ./configure ${1+"$@"} >stdout || { cat stdout; Exit 1; }
+ ./configure ${1+"$@"} >stdout || { cat stdout; exit 1; }
cat stdout
grep "^checking whether to enable maintainer-specific.*\\.\\.\\. $answer$" stdout
test $(grep -c 'checking.*maint' stdout) -eq 1
set_maintmode "enable"
$AUTOCONF --force
-./configure --help >stdout || { cat stdout; Exit 1; }
+./configure --help >stdout || { cat stdout; exit 1; }
cat stdout
grep_configure_help --disable-maintainer-mode 'disable make rules'
# Check that $(am__make_dryrun) works as expected.
-. ./defs || Exit 1
+. ./defs || exit 1
plan_ 14
# From Ralf Corsepius.
required=GNUmake
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_MAKE_INCLUDE
rm -f config.cache
done
-Exit 0
+exit 0
# Make sure we don't emit a rule with empty target if list of
# automatically-computed dependencies for Makefile.in is empty.
-. ./defs || Exit 1
+. ./defs || exit 1
: > Makefile.am
$ACLOCAL
$AUTOMAKE
-grep "^ *:" Makefile.in && Exit 1
+grep "^ *:" Makefile.in && exit 1
:
# via autom4te.
required=GNUmake
-. ./defs || Exit 1
+. ./defs || exit 1
cat >configure.ac <<END
m4_include([version.m4])
# without -B, it may reuse the same shell for separate commands in a
# rule, which can lead to interesting results.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'END'
AC_OUTPUT
# Also, ensure that 'make -n dist' and 'make -n distcheck' show what
# would happen, at least when using GNU make.
-. ./defs || Exit 1
+. ./defs || exit 1
mkdir sub
for target in dist distcheck; do
$MAKE -n $target
if using_gmake; then
- $MAKE -n $target | grep stamp-sub-dist-hook || Exit 1
+ $MAKE -n $target | grep stamp-sub-dist-hook || exit 1
fi
$MAKE test-no-distdir
# No file has been actually touched or created.
# as well as tags, TAGS.
# For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || Exit 1
+. ./defs || exit 1
# Does $MAKE support the '.MAKE' special target?
have_dotmake=false
install-info install-html install-dvi install-pdf install-ps \
installcheck installdirs tags TAGS mostlyclean maintainer-clean
do
- $MAKE -n $target >stdout || { cat stdout; Exit 1; }
+ $MAKE -n $target >stdout || { cat stdout; exit 1; }
cat stdout
case $target in
install-* | installdirs | tags | TAGS ) ;;
*)
if $have_dotmake; then
- grep "stamp-$target$" stdout || Exit 1
+ grep "stamp-$target$" stdout || exit 1
fi
- test ! -f "stamp-$target$" || Exit 1
+ test ! -f "stamp-$target$" || exit 1
;;
esac
case $target in
install-* | installdirs ) ;;
*)
if $have_dotmake; then
- grep "stamp-$target-sub" stdout || Exit 1
+ grep "stamp-$target-sub" stdout || exit 1
fi
- test ! -f "sub/stamp-$target-sub" || Exit 1
+ test ! -f "sub/stamp-$target-sub" || exit 1
;;
esac
case $target in
distclean | maintainer-clean ) ;;
*)
if $have_dotmake; then
- grep "should-not-be-executed" stdout || Exit 1
+ grep "should-not-be-executed" stdout || exit 1
fi
- test ! -f "sub2/sub2-$target-should-not-be-executed" || Exit 1
+ test ! -f "sub2/sub2-$target-should-not-be-executed" || exit 1
;;
esac
done
$AUTOMAKE -a -Wno-override
./configure
-check_targets || Exit 1
+check_targets || exit 1
# Now, introduce BUILT_SOURCES into the toplevel Makefile
# TODO: add BUILT_SOURCES to sub2, fix fallout.
mv -f t Makefile.am
$AUTOMAKE -Wno-override --force Makefile
./configure
-check_targets || Exit 1
+check_targets || exit 1
-Exit 0
+exit 0
# Test to make sure that automake includes the needed variables,
# but not too many.
-. ./defs || Exit 1
+. ./defs || exit 1
# Find the macros wanted by Automake.
$ACLOCAL
$AUTOMAKE
# We are definitely not needing a compiler or preprocessor.
-$EGREP '^ *(CC|CPP|CXX|CXXCPP) *=' Makefile.in && Exit 1
+$EGREP '^ *(CC|CPP|CXX|CXXCPP) *=' Makefile.in && exit 1
:
# Test to make sure 'dist' prefix works with man pages.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
dist_man_MANS = foo.1
# Make sure that man pages listed in man_MANS are installed and
# renamed as documented.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
AC_OUTPUT
# PR 516: Prefer generated manpages to distributed ones.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
dist_man_MANS = foo.1
# when developers ask users to try out a fix from VCS; the developers themselves
# will usually have help2man installed (or should install it).
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
dist_man_MANS = $(srcdir)/foo.1 bar.1
grep ' man pages contain.*missing help2man.* replacement text' stderr \
&& grep 'install help2man' stderr \
&& grep 'regenerate the man pages' stderr \
- || Exit 1
+ || exit 1
}
$ACLOCAL
./configure
$MAKE
-$MAKE dist 2>stderr && { cat stderr >&2; Exit 1; }
+$MAKE dist 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
grep_error_messages
-$MAKE distcheck 2>stderr && { cat stderr >&2; Exit 1; }
+$MAKE distcheck 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
grep_error_messages
$MAKE distclean
cd build
../configure
$MAKE
-$MAKE dist 2>stderr && { cat stderr >&2; Exit 1; }
+$MAKE dist 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
grep_error_messages
-$MAKE distcheck 2>stderr && { cat stderr >&2; Exit 1; }
+$MAKE distcheck 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
grep_error_messages
# Make sure to extract the correct mansection from files in man_MANS.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
AC_OUTPUT
# even if the 'missing' script is involved.
required=help2man
-. ./defs || Exit 1
+. ./defs || exit 1
# Avoid a spurious failure due to a known FreeBSD make incompatibility.
useless_vpath_rebuild \
# Check for a bug in maintainer-clean w.r.t. generated manpages.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
dist_man_MANS = $(srcdir)/foo.1 bar.1
# Check for a bug in distcheck w.r.t. generated manpages.
-. ./defs || Exit 1
+. ./defs || exit 1
# Avoid a spurious failure due to a known FreeBSD make incompatibility.
useless_vpath_rebuild \
# Test that mdate-sh is required when Texinfo used and version.texi needed.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
info_TEXINFOS = textutils.texi
# Test to make sure mdate-sh is included in distribution.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
info_TEXINFOS = textutils.texi
# Test to make sure mdate-sh run correctly.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << END
AC_INIT([$me], [1.0])
$ACLOCAL
$AUTOMAKE
-grep '[^/]mdate-sh' Makefile.in && Exit 1
-Exit 0
+grep '[^/]mdate-sh' Makefile.in && exit 1
+exit 0
# Test to make sure that mdate-sh is added to the right directory.
# Report from Kevin Dalley.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_CONFIG_FILES([sub/Makefile])
# Test to make sure mdate-sh works correctly.
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
get_shell_script mdate-sh
# Check that mdate output looks like a date:
test $# = 3
-case $1$3 in *[!0-9]*) Exit 1;; esac
+case $1$3 in *[!0-9]*) exit 1;; esac
test $1 -lt 32
# Hopefully automake will be obsolete in 80 years ;-)
-case $3 in 20[0-9][0-9]) :;; *) Exit 1;; esac
+case $3 in 20[0-9][0-9]) :;; *) exit 1;; esac
case $2 in
January|February|March|April|May|June|July|August) ;;
September|October|November|December) ;;
- *) Exit 1
+ *) exit 1
esac
# Stricter checks on the year required a POSIX date(1) command.
if year=$(date +%Y) && test $year -gt 2010; then
- test $year = $3 || Exit 1
+ test $year = $3 || exit 1
fi
:
# mdate-sh can work with weird file names, doesn't eval too much.
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
a=
file='file name $a'
get_shell_script mdate-sh
./mdate-sh "$file" >stdout 2>stderr ||
- { cat stdout; cat stderr >&2; Exit 1; }
+ { cat stdout; cat stderr >&2; exit 1; }
cat stdout
cat stderr >&2
grep '[12][0-9]\{3\}' stdout
# Automake should stop the creation of Makefile.in files at the first
# encountered error due to a required auxiliary file not found.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<END
AM_PATH_PYTHON
# Test missing with version mismatches.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'EOF'
AC_OUTPUT
# Make sure $MAKE fails when timestamps aren't updated and missing is not used.
$sleep
touch aclocal.m4
-$MAKE && Exit 1
+$MAKE && exit 1
:
# Test missing with version mismatches.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'EOF'
m4_include([v.m4])
# Make sure $MAKE fail when timestamps aren't updated and missing is not used.
$sleep
touch v.m4
-$MAKE && Exit 1
+$MAKE && exit 1
:
# Test missing when running a tool's --version.
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
get_shell_script missing
# b7cb8259 assumed not to exist.
-./missing b7cb8259 --version 2>stderr && { cat stderr >&2; Exit 1; }
+./missing b7cb8259 --version 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
-grep . stderr && Exit 1
-./missing b7cb8259 --grep 2>stderr && { cat stderr >&2; Exit 1; }
+grep . stderr && exit 1
+./missing b7cb8259 --grep 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
grep WARNING stderr
-./missing --run b7cb8259 --version && Exit 1
-./missing --run b7cb8259 --grep 2>stderr && { cat stderr >&2; Exit 1; }
+./missing --run b7cb8259 --version && exit 1
+./missing --run b7cb8259 --grep 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
grep WARNING stderr
# missing itself it known to exist :)
-./missing ./missing --version 2>stderr && { cat stderr >&2; Exit 1; }
+./missing ./missing --version 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
-grep . stderr && Exit 1
-./missing ./missing --grep 2>stderr && { cat stderr >&2; Exit 1; }
+grep . stderr && exit 1
+./missing ./missing --grep 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
grep WARNING stderr
-./missing --run ./missing --version 2>stderr || { cat stderr >&2; Exit 1; }
+./missing --run ./missing --version 2>stderr || { cat stderr >&2; exit 1; }
cat stderr >&2
-grep . stderr && Exit 1
-./missing --run ./missing --grep 2>stderr && { cat stderr >&2; Exit 1; }
+grep . stderr && exit 1
+./missing --run ./missing --grep 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
-grep WARNING stderr && Exit 1
+grep WARNING stderr && exit 1
grep Unknown stderr
# See how well the rebuild rule handles an aclocal.m4 that was
# generated for another version of autoconf.
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_OUTPUT >>configure.ac
$MAKE
sed '1,20 s/m4_defn(\[AC_AUTOCONF_VERSION\]),/9999,/' < aclocal.m4 > aclocal.tmp
-cmp aclocal.m4 aclocal.tmp && Exit 1
+cmp aclocal.m4 aclocal.tmp && exit 1
mv aclocal.tmp aclocal.m4
-$MAKE 2>stderr || { cat cat stderr >&2; Exit 1; }
+$MAKE 2>stderr || { cat cat stderr >&2; exit 1; }
cat stderr >&2
grep 'You have another version of autoconf' stderr
grep 'aclocal.m4:.*this file was generated for' stderr
-$MAKE 2>stderr || { cat cat stderr >&2; Exit 1; }
+$MAKE 2>stderr || { cat cat stderr >&2; exit 1; }
cat stderr >&2
-grep 'You have another version of autoconf' stderr && Exit 1
-grep 'aclocal.m4:.*this file was generated for' stderr && Exit 1
+grep 'You have another version of autoconf' stderr && exit 1
+grep 'aclocal.m4:.*this file was generated for' stderr && exit 1
:
# PR automake/483.
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
get_shell_script missing
# Make sure autoconf version checks in aclocal.m4 are robust.
am_create_testdirs=empty
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac <<END
m4_define([AC_AUTOCONF_VERSION], [9999a])
: > Makefile.am
$ACLOCAL
-$AUTOCONF 2>stderr || { cat stderr >&2; Exit 1; }
+$AUTOCONF 2>stderr || { cat stderr >&2; exit 1; }
cat stderr >&2
grep 'You have another version of autoconf' stderr
grep 'aclocal.m4:.*this file was generated for' stderr
cmp configure.ac configure.tmp && fatal_ 'failed to edit configure.ac'
mv -f configure.tmp configure.ac
-$MAKE 2>stderr || { cat stderr >&2; Exit 1; }
+$MAKE 2>stderr || { cat stderr >&2; exit 1; }
cat stderr >&2
grep 'You have another version of autoconf' stderr
grep 'aclocal.m4:.*this file was generated for autoconf 9999a' stderr
# Check that the AM_PROG_MKDIR_P macro is deprecated. It will be
# be removed in the next major Automake release.
-. ./defs || Exit 1
+. ./defs || exit 1
echo AM_PROG_MKDIR_P >> configure.ac
: > Makefile.am
$ACLOCAL
-$AUTOCONF -Werror -Wobsolete 2>stderr && { cat stderr >&2; Exit 1; }
+$AUTOCONF -Werror -Wobsolete 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
grep_err
# Test to make sure no-installman suppresses man dir creation.
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_OUTPUT >> configure.ac
# Test mkinstalldirs with spaces in directory names.
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
cwd=$(pwd) || fatal_ "getting current working directory"
# Test for bug where mkinstalldirs variable can be set incorrectly.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
pkgdata_DATA =
$ACLOCAL
$AUTOMAKE ././Makefile
-grep ' /mkinstalldirs' Makefile.in && Exit 1
-Exit 0
+grep ' /mkinstalldirs' Makefile.in && exit 1
+exit 0
# Check for AM_MAINTAINER_MODE defaults.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_MAINTAINER_MODE
grep '^MAINT.*#' Makefile
./configure --enable-maintainer-mode
-grep '^MAINT.*#' Makefile && Exit 1
+grep '^MAINT.*#' Makefile && exit 1
sed 's/\(AM_MAINTAINER_MODE\).*/\1([disable])/' configure.ac > configure.int
mv -f configure.int configure.ac
$AUTOCONF --force
./configure
-grep '^MAINT.*#' Makefile && Exit 1
+grep '^MAINT.*#' Makefile && exit 1
./configure --enable-maintainer-mode
-grep '^MAINT.*#' Makefile && Exit 1
+grep '^MAINT.*#' Makefile && exit 1
./configure --disable-maintainer-mode
grep '^MAINT.*#' Makefile
sed 's/\(AM_MAINTAINER_MODE\).*/\1([foo])/' configure.ac > configure.int
mv -f configure.int configure.ac
-$AUTOCONF --force -Werror && Exit 1
+$AUTOCONF --force -Werror && exit 1
:
# From Derek R. Price.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_MAINTAINER_MODE
# FIXME: We should move this script accordingly.
required='gcc GNUmake'
-. ./defs || Exit 1
+. ./defs || exit 1
mldir=$am_top_srcdir/contrib/multilib
mkdir m4
# by a regression caused by removal of automatic de-ANSI-fication support:
# <http://lists.gnu.org/archive/html/automake-patches/2011-08/msg00200.html>
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_OUTPUT >> configure.ac
$AUTOMAKE
$EGREP 'DEFAULT_INCLUDES|@am__isrc@|-compile|\$\(OBJEXT\)|tab\.[ch]' \
- Makefile.in && Exit 1
+ Makefile.in && exit 1
:
# Check that the '-o' aka '--output-dir' option is not recognized anymore.
-. ./defs || Exit 1
+. ./defs || exit 1
: > Makefile.am
# up for greater exposure of nobase.test.
required='cc libtoolize'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'EOF'
AC_PROG_CC
# Interaction of 'nobase_' and 'nodist_' prefixes.
-. ./defs || Exit 1
+. ./defs || exit 1
# Simulate no emacs and no python (it shouldn't be needed in this test).
EMACS="no" PYTHON=":"; export EMCAS PYTHON
# Make sure nobase_* works for python files.
required=python
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<EOF
AM_PATH_PYTHON
$MAKE test-install-data
$MAKE uninstall
-find inst/my -type f -print | grep . && Exit 1
+find inst/my -type f -print | grep . && exit 1
$MAKE install-strip
$MAKE
$MAKE test-install-data
$MAKE uninstall
-find inst/my -type f -print | grep . && Exit 1
+find inst/my -type f -print | grep . && exit 1
:
# Make sure nobase_* works.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'EOF'
AC_PROG_CC
# Make sure that PACKAGE and VERSION are AC_DEFINEd when requested.
-. ./defs || Exit 1
+. ./defs || exit 1
# -------------------------------------------------------------------
# Do not upgrade this file to use the modern AC_INIT/AM_INIT_AUTOMAKE
$AUTOCONF
./configure
-grep 'DEFS.*-DVERSION=\\"UnIqUe' output && Exit 1
+grep 'DEFS.*-DVERSION=\\"UnIqUe' output && exit 1
:
# Make sure that PACKAGE and VERSION are AC_DEFINEd when requested.
-. ./defs || Exit 1
+. ./defs || exit 1
# First, check that PACKAGE and VERSION are output by default.
$AUTOMAKE # Dummy call to make sure Automake grok 'no-define' silently.
./configure
-grep 'DEFS.*-DVERSION=\\"UnIqUe' output && Exit 1
+grep 'DEFS.*-DVERSION=\\"UnIqUe' output && exit 1
:
# Test to make sure no-dependencies option does the right thing.
# Bug report from Greg A. Woods.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = no-dependencies
$ACLOCAL
$AUTOMAKE
-grep '%' Makefile.in && Exit 1
-Exit 0
+grep '%' Makefile.in && exit 1
+exit 0
# Another test to make sure no-dependencies option does the right thing.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
bin_PROGRAMS = foo
$ACLOCAL
$AUTOMAKE
-grep DEPMODE Makefile.in && Exit 1
+grep DEPMODE Makefile.in && exit 1
:
# Test to make sure depcomp isn't always required.
-. ./defs || Exit 1
+. ./defs || exit 1
rm -f depcomp
# Test to make sure dist_*_SOURCES and nodist_*_SOURCES work.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
grep '^am_eyeball_OBJECTS' Makefile.in
grep '^DIST_SOURCES =' Makefile.in
-grep '^DIST_SOURCES =.*nodist' Makefile.in && Exit 1
+grep '^DIST_SOURCES =.*nodist' Makefile.in && exit 1
:
# Test to make sure nodist_noinst_HEADERS work.
# For PR 249.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'EOF'
AC_OUTPUT
# Test to make sure no-dist option works.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
$ACLOCAL
$AUTOMAKE
-grep '^dist:' Makefile.in && Exit 1
-grep '^DIST_SOURCES =' Makefile.in && Exit 1
+grep '^dist:' Makefile.in && exit 1
+grep '^DIST_SOURCES =' Makefile.in && exit 1
:
# Check to make sure "make install" will build all in directory with
# nothing to install.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
all-local:
# Test to make sure that noinst_* and check_* are not installed.
# From Pavel Roskin.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
noinst_SCRIPTS = foo.sh
$ACLOCAL
$AUTOMAKE
-grep 'noinstdir' Makefile.in && Exit 1
-grep 'checkdir' Makefile.in && Exit 1
+grep 'noinstdir' Makefile.in && exit 1
+grep 'checkdir' Makefile.in && exit 1
:
# Make sure Automake does not emit a link rule for unknown languages.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = no-exeext
$ACLOCAL
$AUTOMAKE -Wno-override
-grep '^meal.*:' Makefile.in | grep -v beef.meat && Exit 1
+grep '^meal.*:' Makefile.in | grep -v beef.meat && exit 1
-Exit 0
+exit 0
# just skip the rest of the test if configure fails to find a working C
# compiler.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
$ACLOCAL
$AUTOMAKE
-$EGREP '(-I *\.|-I.*srcdir|am__isrc)' Makefile.in && Exit 1
+$EGREP '(-I *\.|-I.*srcdir|am__isrc)' Makefile.in && exit 1
# We'll test the fully-processed Makefile too.
$AUTOCONF
# Test with $builddir != $srcdir
mkdir build
cd build
-../configure || Exit $?
-$EGREP '.*-I *(\.|\$.srcdir.)' Makefile && Exit 1
+../configure || exit $?
+$EGREP '.*-I *(\.|\$.srcdir.)' Makefile && exit 1
# Test with $builddir = $srcdir
cd ..
-./configure || Exit $?
-$EGREP '.*-I *(\.|\$.srcdir.)' Makefile && Exit 1
+./configure || exit $?
+$EGREP '.*-I *(\.|\$.srcdir.)' Makefile && exit 1
-Exit 0
+exit 0
# Check all notrans_, dist_, nodist_ prefix combinations for MANS
# primary and install-man dependencies.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'END'
AC_OUTPUT
grep '^install-man4:' Makefile.in | grep '\$(notrans_man_MANS)'
grep '^install-man5:' Makefile.in | grep '\$(notrans_dist_man_MANS)'
grep '^install-man6:' Makefile.in | grep '\$(notrans_nodist_man_MANS)'
-grep '^install-man8:' Makefile.in && Exit 1
-grep '^install-man9:' Makefile.in && Exit 1
+grep '^install-man8:' Makefile.in && exit 1
+grep '^install-man9:' Makefile.in && exit 1
cwd=$(pwd) || fatal_ "getting current working directory"
test -d inst/man/man5
test -d inst/man/man6
test -d inst/man/man7
-test -d inst/man/man8 && Exit 1
-test -d inst/man/man9 && Exit 1
+test -d inst/man/man8 && exit 1
+test -d inst/man/man9 && exit 1
:
# Test to make sure _OBJECTS is only generated once. Bug reported by
# Joerg-Martin Schwarz.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# require an Objective-C compiler.
# See also sister test 'objcxx-basic.sh'.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am <<'END'
bin_PROGRAMS = hello
# Automatic dependency tracking for Objective C.
# See also sister test 'objcxx-deps.sh'.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_OBJC
./configure --enable-dependency-tracking
$MAKE
-cross_compiling || (./foo | $FGREP 'Hello, World') || Exit 1
+cross_compiling || (./foo | $FGREP 'Hello, World') || exit 1
$sleep
: > old
echo '#define MSG "Howdy, Earth"' > baz2.h
else
is_newest foo.exe old
fi
-cross_compiling || (./foo | $FGREP 'Howdy, Earth') || Exit 1
+cross_compiling || (./foo | $FGREP 'Howdy, Earth') || exit 1
$MAKE distcheck
# Test Objective C compilation flags.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_OBJC
$AUTOMAKE -a
$FGREP OBJCFLAGS Makefile.in # For debugging.
-grep '\$(OBJCFLAGS).*\$(AM_OBJCFLAGS)' Makefile.in && Exit 1
-grep '\$(OBJCFLAGS).*\$(foo.*_OBJCFLAGS)' Makefile.in && Exit 1
-grep '\$(foo.*_OBJCFLAGS).*\$(AM_OBJCFLAGS)' Makefile.in && Exit 1
+grep '\$(OBJCFLAGS).*\$(AM_OBJCFLAGS)' Makefile.in && exit 1
+grep '\$(OBJCFLAGS).*\$(foo.*_OBJCFLAGS)' Makefile.in && exit 1
+grep '\$(foo.*_OBJCFLAGS).*\$(AM_OBJCFLAGS)' Makefile.in && exit 1
./configure OBJCFLAGS=-UERROR
$MAKE
required=libtoolize
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
## Autotools Input Files.
elif test $? -eq 63; then
skip_ "Object C++ support requires Autoconf 2.65 or later"
else
- Exit 1 # Some other aclocal failure.
+ exit 1 # Some other aclocal failure.
fi
$AUTOHEADER
$AUTOCONF
[Hello ObjC, world ObjC]
[Hello ObjC++, world ObjC++]
END
- ./play > got || { cat got; Exit 1; }
+ ./play > got || { cat got; exit 1; }
cat exp
cat got
diff exp got
# See also sister test 'objcxx-minidemo.sh'.
required=native
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_OBJC
elif test $? -eq 63; then
skip_ "Object C++ support requires Autoconf 2.65 or later"
else
- Exit 1 # Some other aclocal failure.
+ exit 1 # Some other aclocal failure.
fi
$ACLOCAL
# require an Objective-C++ compiler.
# See also sister test 'objc-basic.sh'.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am <<'END'
bin_PROGRAMS = hello
elif test $? -eq 63; then
skip_ "Object C++ support requires Autoconf 2.65 or later"
else
- Exit 1 # Some other aclocal failure.
+ exit 1 # Some other aclocal failure.
fi
$AUTOMAKE
# Automatic dependency tracking for Objective C++.
# See also sister test 'objc-deps.sh'.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
dnl Support for Object C++ was introduced only in Autoconf 2.65.
elif test $? -eq 63; then
skip_ "Object C++ support requires Autoconf 2.65 or later"
else
- Exit 1 # Some other aclocal failure.
+ exit 1 # Some other aclocal failure.
fi
$AUTOCONF
$AUTOMAKE --add-missing
./configure --enable-dependency-tracking
$MAKE
-cross_compiling || (./foo | $FGREP 'Hello, World') || Exit 1
+cross_compiling || (./foo | $FGREP 'Hello, World') || exit 1
$sleep
: > old
else
is_newest foo.exe old
fi
-cross_compiling || (./foo | $FGREP 'Howdy, Earth') || Exit 1
+cross_compiling || (./foo | $FGREP 'Howdy, Earth') || exit 1
$MAKE distcheck
# Test Objective C++ compilation flags.
# See also sister test 'objc-flags.sh'.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
dnl Support for Object C++ was introduced only in Autoconf 2.65.
elif test $? -eq 63; then
skip_ "Object C++ support requires Autoconf 2.65 or later"
else
- Exit 1 # Some other aclocal failure.
+ exit 1 # Some other aclocal failure.
fi
$AUTOCONF
$AUTOMAKE -a
$FGREP OBJCXXFLAGS Makefile.in # For debugging.
-grep '\$(OBJCXXFLAGS).*\$(AM_OBJCXXFLAGS)' Makefile.in && Exit 1
-grep '\$(OBJCXXFLAGS).*\$(foo.*_OBJCXXFLAGS)' Makefile.in && Exit 1
-grep '\$(foo.*_OBJCXXFLAGS).*\$(AM_OBJCXXFLAGS)' Makefile.in && Exit 1
+grep '\$(OBJCXXFLAGS).*\$(AM_OBJCXXFLAGS)' Makefile.in && exit 1
+grep '\$(OBJCXXFLAGS).*\$(foo.*_OBJCXXFLAGS)' Makefile.in && exit 1
+grep '\$(foo.*_OBJCXXFLAGS).*\$(AM_OBJCXXFLAGS)' Makefile.in && exit 1
./configure OBJCXXFLAGS=-UERROR
$MAKE
# See also sister test 'objc-minidemo.sh'.
required=native
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
dnl Support for Object C++ was introduced only in Autoconf 2.65.
elif test $? -eq 63; then
skip_ "Object C++ support requires Autoconf 2.65 or later"
else
- Exit 1 # Some other aclocal failure.
+ exit 1 # Some other aclocal failure.
fi
$AUTOCONF
$AUTOHEADER
# Test for automake bug#10128: $(OBJEXT) redefinition causes
# $(foo_OBJECTS) to be defined as empty.
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_OUTPUT >> configure.ac
# AUTOUPDATE='autoupdate --verbose'.
set x ${AUTOUPDATE-autoupdate}
required=$2
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << 'END'
AC_INIT
$PERL -ne '/AU_DEFUN\(\[(\w+)\]/ && print "$1\n"' \
"$am_automake_acdir/obsolete.m4" > obs
cat obs >> configure.ac
-$PERL -ne 'chomp; print "grep $_ output || Exit 1\n"; ' obs > obs.1
-$PERL -ne 'chomp; print "grep $_ configure.ac && Exit 1\n"; ' obs > obs.2
+$PERL -ne 'chomp; print "grep $_ output || exit 1\n"; ' obs > obs.1
+$PERL -ne 'chomp; print "grep $_ configure.ac && exit 1\n"; ' obs > obs.2
echo : >> obs.1 # Since it will be sourced, it must end with a success.
echo : >> obs.2 # Likewise.
$ACLOCAL
# Expect Autoconf to complain about each of the macros in obs.
-$AUTOCONF -Wobsolete >output 2>&1 || { cat output; Exit 1; }
+$AUTOCONF -Wobsolete >output 2>&1 || { cat output; exit 1; }
cat output
. ./obs.1
# Make sure Autoupdate remove each of these macros.
# Use of these variables is deprecated:
# LISP, HEADERS, DATA, SCRIPTS, LTLIBRARIES, LIBRARIES, PROGRAMS, MANS.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >Makefile.am <<\EOF
DATA =
# Make sure AC_DEFUN is handled correctly. This test isn't named very
# well. Report from Jim Meyering.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
jm_TEST
# Test that 'automake -a' output order is stable.
# From report by Bruno Haible.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'END'
AC_OUTPUT
$ACLOCAL
$AUTOCONF
rm -f missing install-sh
-$AUTOMAKE --add-missing --copy 2>stderr || { cat stderr >&2; Exit 1; }
+$AUTOMAKE --add-missing --copy 2>stderr || { cat stderr >&2; exit 1; }
cat stderr >&2
for i in 1 2 3 4 5 6; do
# Test to make sure files listed in AC_OUTPUT are found.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# This is comparable to output9.test, but testing Makefile rules.
# PR/411
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << END
AC_SUBST([FOO], [top])
# Make sure an AC_CONFIG_FILES ignore filenames with shell variables.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << \END
AC_SUBST([FOO], [foo])
$AUTOCONF
$AUTOMAKE
-$FGREP ' $file' Makefile.in sub/Makefile.in && Exit 1
+$FGREP ' $file' Makefile.in sub/Makefile.in && exit 1
./configure
$MAKE distcheck
# Make sure an AC_CONFIG_FILES process filenames with AC_SUBST variables.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << \END
AC_SUBST([FOO], [foo])
# Make sure an AC_CONFIG_FILES, AC_CONFIG_LINKS, and AC_CONFIG_COMMANDS
# are not prerequisites of 'all'.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << \END
AC_SUBST([FOO], [foo])
# Another AC_OUTPUT test. From report by Ulrich Drepper.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac <<END
AC_INIT([$me], [1.0])
$ACLOCAL
$AUTOMAKE
-grep '^gettextize' Makefile.in && Exit 1
-Exit 0
+grep '^gettextize' Makefile.in && exit 1
+exit 0
# Yet another AC_OUTPUT test.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# It's hard to believe there are so many AC_OUTPUT-related bugs.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac <<END
AC_INIT([$me], [1.0])
$ACLOCAL
$AUTOMAKE
-grep tests/defs.in tests/Makefile.in && Exit 1
-Exit 0
+grep tests/defs.in tests/Makefile.in && exit 1
+exit 0
# Make sure Automake complains when there is no Makefile specified.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << 'END'
AC_INIT([foo], [bar], [baz])
# Check for support for colon-separated input files in AC_CONFIG_FILES.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << END
AC_INIT([$me], [1.0])
# Check for support for colon separated input files in AC_CONFIG_FILES,
# with sources in sub directories.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << END
AC_INIT([$me], [1.0])
# Check AC_CONFIG_FILES support for files starting with '../'.
# Report from Bruno Haible.
-. ./defs || Exit 1
+. ./defs || exit 1
mkdir testdir
cd testdir
# Make sure an AC_CONFIG_FILES can have an AC_CONFIG_FILES output as input.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << END
AC_CONFIG_FILES([a/mid.in:a/input.in.in])
# Test for conditionally-defined overrides.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_CONDITIONAL([COND], [test x"$cond" = x"yes"])
# This test is still xfailing; see the FIXME in Automake::Rule::define.
# Once that is fixed, the test should succeed.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_CONDITIONAL([COND], [:])
# Test that overriding 'html' target causes only one "html:" rule to
# be output.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
html:
# Make sure automake -Woverride suggests using TARGET-local instead
# of TARGET when possible.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
install:
$AUTOMAKE -Wno-override
AUTOMAKE_fails
# There is no such thing as 'install-local'.
-grep ':.*install-local' stderr && Exit 1
+grep ':.*install-local' stderr && exit 1
grep ':.*installcheck-local' stderr
grep ':.*html-local' stderr
# Make sure overriding *-am targets suggest using *-local, not *-am.
-grep ':.*clean-am-local' stderr && Exit 1
+grep ':.*clean-am-local' stderr && exit 1
grep ':.*clean-local' stderr
:
# This test checks (0), (1), and (2). See sister tests for further coverage.
required=perl-threads
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << 'END'
AC_INIT([parallel-am], [1.0])
# warnings should be omitted in the same way as without threads.
required=perl-threads
-. ./defs || Exit 1
+. ./defs || exit 1
mkdir sub
# installation of aux files should be race-free.
required=perl-threads
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << 'END'
AC_INIT([parallel-am], [1.0])
# Check that we can use indirections when overriding TESTS and
# TEST_LOGS from the command line.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
do_check ()
{
- env "$@" $MAKE -e check >stdout || { cat stdout; Exit 1; }
+ env "$@" $MAKE -e check >stdout || { cat stdout; exit 1; }
cat stdout
grep '^PASS:' stdout | LC_ALL=C sort > got-out
cat got-out
# parallel-tests: some checks on console output about testsuite
# progress.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
srcdir=.
fi
$srcdir/configure
- $MAKE check >stdout && { cat stdout; Exit 1; }
+ $MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
LC_ALL=C grep '^[A-Z][A-Z]*:' stdout > got
cat got
# Check that auxiliary script 'test-driver' gets automatically installed
# in the correct directory by 'parallel-tests' option.
-. ./defs || Exit 1
+. ./defs || exit 1
: Try first with parallel-tests defined in AM_INIT_AUTOMAKE.
END
$ACLOCAL
-$AUTOMAKE -a 2>stderr || { cat stderr >&2; Exit 1; }
+$AUTOMAKE -a 2>stderr || { cat stderr >&2; exit 1; }
cat stderr >&2
ls -l . sub my_aux_dir # For debugging.
$ACLOCAL
$AUTOMAKE --add-missing --copy dir/GNUmakefile 2>stderr \
- || { cat stderr >&2; Exit 1; }
+ || { cat stderr >&2; exit 1; }
cat stderr >&2
ls -l . dir build-aux # For debugging.
# Check parallel-tests interactions with "make -n".
# See also sister test 'parallel-tests-dry-run-2.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_OUTPUT >> configure.ac
chmod a+x foo.test bar.test
-$MAKE check && Exit 1
+$MAKE check && exit 1
for targ in recheck clean mostlyclean distclean; do
$MAKE -n "$targ"
# Check parallel-tests interactions with "make -n".
# See also sister test 'parallel-tests-dry-run-1.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
make_n_ ()
{
st=0
- $MAKE -n "$@" >output 2>&1 || { cat output; ls -l; Exit 1; }
+ $MAKE -n "$@" >output 2>&1 || { cat output; ls -l; exit 1; }
cat output
# Look out for possible errors from common tools used by recipes.
- $EGREP -i ' (exist|permission|denied|no .*(such|file))' output && Exit 1
- $EGREP '(mv|cp|rm|cat|grep|sed|awk): ' output && Exit 1
+ $EGREP -i ' (exist|permission|denied|no .*(such|file))' output && exit 1
+ $EGREP '(mv|cp|rm|cat|grep|sed|awk): ' output && exit 1
:
}
test ! -f test-suite.log
done
-# Creative quoting below to please maintainer-check.
-echo exit '0' > foo.test
-echo exit '1' > bar.test
+echo 'exit 0' > foo.test
+echo 'exit 1' > bar.test
-$MAKE check && Exit 1
+$MAKE check && exit 1
chmod a-w .
test -f foo.log
test -f bar.trs
-# Creative quoting below to please maintainer-check.
cat > foo.test <<END
echo this is bad
exit 1
END
-echo exit '0' > bar.test
+echo 'exit 0' > bar.test
for target in check recheck test-suite.log; do
make_n_ $target
grep '^:test-result: *FAIL' bar.trs
- grep 'this is bad' foo.log test-suite.log && Exit 1
+ grep 'this is bad' foo.log test-suite.log && exit 1
: For shells with busted 'set -e'.
done
for target in check recheck test-suite.log; do
make_n_ $target
for f in $files; do
- test -f $f && test ! -r $f || Exit 1
+ test -f $f && test ! -r $f || exit 1
done
done
fi
# - empty TESTS
# - empty TEST_LOGS
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_CONFIG_FILES([sub1/Makefile sub2/Makefile])
no_test_has_run ()
{
- ls -1 *.log | grep -v '^test-suite\.log$' | grep . && Exit 1
+ ls -1 *.log | grep -v '^test-suite\.log$' | grep . && exit 1
grep '^# TOTAL: *0$' test-suite.log
:
}
# parallel-tests:
# - check2.am and interaction with $(EXEEXT)
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
dnl We need to fool the init.m4 internals a little.
# Check parallel-tests features: normal and special exit statuses
# in the test scripts.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
$MAKE check >stdout && st=0
cat stdout
cat test-suite.log
-test $st -gt 0 || Exit 1
+test $st -gt 0 || exit 1
LC_ALL=C grep '^[A-Z][A-Z]*:' stdout | LC_ALL=C sort > got-fail
diff exp-fail got-fail
XFAIL_TESTS="$failure_statuses 99" $MAKE -e check >stdout && st=0
cat stdout
cat test-suite.log
-test $st -gt 0 || Exit 1
+test $st -gt 0 || exit 1
LC_ALL=C grep '^[A-Z][A-Z]*:' stdout | LC_ALL=C sort > got-xfail-1
diff exp-xfail-1 got-xfail-1
$MAKE -e check >stdout || st=$?
cat stdout
cat test-suite.log
-test $st -eq 0 || Exit 1
+test $st -eq 0 || exit 1
LC_ALL=C grep '^[A-Z][A-Z]*:' stdout | LC_ALL=C sort > got-xfail-2
diff exp-xfail-2 got-xfail-2
# (or even be) $(EXTRA_PROGRAMS).
required='cc native'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
cat stderr >&2
ls -l
if using_gmake; then
- test $st -gt 0 || Exit 1
+ test $st -gt 0 || exit 1
else
# Don't trust exit status of "make -k" for non-GNU make.
- $MAKE check && Exit 1
+ $MAKE check && exit 1
: For shells with busted 'set -e'.
fi
RECHECK_LOGS= $MAKE -e check >stdout || st=$?
cat stdout
ls -l
-test $st -eq 0 || Exit 1
+test $st -eq 0 || exit 1
# For debugging.
stat stamp foo.log bar.log baz.log || :
test -f none.log
test -f test-suite.log
# Tests that shouldn't have been re-run.
-$EGREP '(foo|bar)\.bin|baz\.test$' stdout && Exit 1
+$EGREP '(foo|bar)\.bin|baz\.test$' stdout && exit 1
# Tests that should have been run. Again, we don't anchor the end
# of the next pattern, to allow for non-empty $(EXEEXT).
grep '^PASS: none\.bin' stdout
# sister test 'parallel-tests-fd-redirect.test'.
required='cc native'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
test $st -eq 0
grep "^ bazbazbaz$" stdout
grep "^ quxquxqux$" stdout
-$EGREP '(bazbazbaz|quxquxqux)' *.log && Exit 1
+$EGREP '(bazbazbaz|quxquxqux)' *.log && exit 1
:
# check for tests that are binary executables.
# See also the more generic test 'check-fd-redirect.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
test $st -eq 0
grep "^ foofoofoo$" stdout
grep "^ barbarbar$" stdout
-$EGREP '(foofoofoo|barbarbar)' *.log && Exit 1
+$EGREP '(foofoofoo|barbarbar)' *.log && exit 1
:
# - If $(TEST_SUITE_LOG) is in $(TEST_LOGS), we get a diagnosed
# error, not a make hang or a system freeze.
-. ./defs || Exit 1
+. ./defs || exit 1
# We don't want localized error messages from make, since we'll have
# to grep them. See automake bug#11452.
log=$1; shift
env "$@" $MAKE -e check >output 2>&1 || st=$?
cat output
- $FGREP '::OOPS::' output && Exit 1 # Possible infinite recursion.
+ $FGREP '::OOPS::' output && exit 1 # Possible infinite recursion.
# Check that at least we don't create a botched global log file.
test ! -f "$log"
if using_gmake; then
err_seen=yes
break
done
- test $err_seen = yes || Exit 1
+ test $err_seen = yes || exit 1
fi
}
# Check parallel-tests features: DISABLE_HARD_ERRORS
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_CONFIG_FILES([sub/Makefile])
# But an empty values for DISABLE_HARD_ERRORS means that hard errors
# are not to be counted like normal failures.
-$MAKE check DISABLE_HARD_ERRORS='' && Exit 1
+$MAKE check DISABLE_HARD_ERRORS='' && exit 1
cat test-suite.log
grep '^ERROR: foo$' test-suite.log
cd sub
# The '-e' is wanted here.
-DISABLE_HARD_ERRORS='' $MAKE -e check && Exit 1
+DISABLE_HARD_ERRORS='' $MAKE -e check && exit 1
cat test-suite.log
grep '^ERROR: bar$' test-suite.log
cd ..
echo 'DISABLE_HARD_ERRORS = yes' >> Makefile.am
$AUTOMAKE Makefile
./config.status Makefile
-VERBOSE=yes $MAKE check && Exit 1
-grep '^FAIL' test-suite.log && Exit 1
+VERBOSE=yes $MAKE check && exit 1
+grep '^FAIL' test-suite.log && exit 1
grep '^ERROR: bar$' sub/test-suite.log
echo 'DISABLE_HARD_ERRORS = zardoz' >> sub/Makefile
# but we couldn't find a better way to deal with inter-processes
# signals and the whole process-synchronization mess.
-. ./defs || Exit 1
+. ./defs || exit 1
plan_ 16
# and xxx_LOG_FLAGS), also with AC_SUBST'd stuff.
# See also related test 'parallel-tests-log-compiler-2.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_SUBST([acsubst_compiler], [t-compiler])
$AUTOMAKE -a
./configure
-$MAKE check || { cat test-suite.log; Exit 1; }
+$MAKE check || { cat test-suite.log; exit 1; }
ls -l . sub
cat test-suite.log
test -f foo.log
test -f bli.suff.log
test -f sub/test.log
-T_LOG_FLAGS=--bad $MAKE -e check && Exit 1
+T_LOG_FLAGS=--bad $MAKE -e check && exit 1
cat test-suite.log
cat bla.log
# With the above flag overridden, bla.t should fail ...
$EGREP '(^ *|/)t-compiler:.* invalid .*--bad' bla.log
# ... but no other test should.
-grep -v '^FAIL: bla\.t ' bla.log | grep 'FAIL:' && Exit 1
+grep -v '^FAIL: bla\.t ' bla.log | grep 'FAIL:' && exit 1
# Try also with a VPATH build.
$MAKE distcheck
# See also related test 'parallel-tests-log-compiler-1.test'.
required='cc native'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
./configure
$MAKE
-$MAKE check || { cat test-suite.log; Exit 1; }
+$MAKE check || { cat test-suite.log; exit 1; }
ls -l . sub
cat test-suite.log
grep 'chk-compiler *1 *2' foo.log
# LOG_COMPILER and LOG_FLAGS given in the manual.
required=python
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<END
AC_SUBST([PERL], ['$PERL'])
cat foo.log
cat bar.log
cat baz.log
-test $st -eq 0 || Exit $st
+test $st -eq 0 || exit $st
# Check that the wrappers have been run with the expected flags.
grep '[rR]eversed.*+=.*operator.*foo\.pl' foo.log
# Check parallel-tests features: runtime redefinition of $(TEST_SUITE_LOG).
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
AC_OUTPUT
{
test_log_edit orig > exp
test_log_edit $1 > got
- diff exp got || Exit 1
+ diff exp got || exit 1
rm -f exp got
}
cp test-suite.log orig
$MAKE clean
-test -f test-suite.log && Exit 99 # Sanity check.
+test -f test-suite.log && exit 99 # Sanity check.
# Check that we can override the testsuite log file at runtime.
TEST_SUITE_LOG=zardoz.log $MAKE -e check
# - $(TEST_SUITE_LOG) and $(TESTS)
# - $(TEST_SUITE_LOG) and $(TEST_LOGS)
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
AC_OUTPUT
'TEST_LOGS=pass.log skip.log'
do
env TEST_SUITE_LOG=partial.log "$test_list_override" \
- $MAKE -e check >stdout || { cat stdout; Exit 1; }
+ $MAKE -e check >stdout || { cat stdout; exit 1; }
cat stdout
ls -l
count_test_results total=2 pass=1 fail=0 skip=1 xfail=0 xpass=0 error=0
grep '^SKIP: skip\.test$' stdout
$FGREP 'SKIP: skip' partial.log
$FGREP '% skipped test %' partial.log
- $EGREP '(pass2|skip2|fail)\.test' stdout && Exit 1
- $EGREP '(pass2|skip2|fail)' partial.log && Exit 1
+ $EGREP '(pass2|skip2|fail)\.test' stdout && exit 1
+ $EGREP '(pass2|skip2|fail)' partial.log && exit 1
rm -f *.log
done
# Check parallel-tests features: runtime redefinition of $(TEST_SUITE_LOG)
# for the recheck target.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
AC_OUTPUT
}
./configure
-$MAKE check >stdout && { cat stdout; Exit 1; }
+$MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
chmod a-rw test-suite.log
TEST_SUITE_LOG=my.log $MAKE -e recheck >stdout \
- && { cat stdout; Exit 1; }
+ && { cat stdout; exit 1; }
cat stdout
ls -l
filter_stdout
count_test_results total=2 pass=0 fail=1 skip=0 xfail=0 xpass=0 error=1
for x in stdout my.log; do
- $FGREP foofoo $x && Exit 1
+ $FGREP foofoo $x && exit 1
$FGREP barbar $x
$FGREP bazbaz $x
done
chmod a-rw my.log
BAZ_EXIT_STATUS=0 TEST_SUITE_LOG=my2.log $MAKE -e recheck >stdout \
- && { cat stdout; Exit 1; }
+ && { cat stdout; exit 1; }
cat stdout
ls -l
count_test_results total=2 pass=1 fail=0 skip=0 xfail=0 xpass=0 error=1
filter_stdout
-$FGREP foofoo stdout && Exit 1
+$FGREP foofoo stdout && exit 1
$FGREP barbar stdout
$FGREP bazbaz stdout
-$FGREP foofoo my2.log && Exit 1
+$FGREP foofoo my2.log && exit 1
$FGREP barbar my2.log
-$FGREP bazbaz my2.log && Exit 1
+$FGREP bazbaz my2.log && exit 1
chmod u+r test-suite.log my.log
$FGREP bazbaz test-suite.log
# an exceeded command line length when there are many tests.
# For automake bug#7868. This test is currently expected to fail.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
mkdir $new_deepdir || break
tmpfile=$new_deepdir/$tname-some-more-chars-for-good-measure
if touch $tmpfile; then
- rm -f $tmpfile || Exit 99
+ rm -f $tmpfile || exit 99
else
- rmdir $new_deepdir || Exit 99
+ rmdir $new_deepdir || exit 99
fi
deepdir=$new_deepdir
unset tmpfile new_deepdir
print " \\\n";
}
}
- ' > list-of-tests.am || Exit 99
- sed 20q list-of-tests.am || Exit 99 # For debugging.
+ ' > list-of-tests.am || exit 99
+ sed 20q list-of-tests.am || exit 99 # For debugging.
$AUTOMAKE Makefile \
|| framework_failure_ "unexpected automake failure"
./config.status Makefile \
&& test -f $deepdir/$tname-1.log \
|| framework_failure_ "\"make check\" with one single tests"
-rm -f $deepdir/* || Exit 99
+rm -f $deepdir/* || exit 99
-$MAKE check > stdout || { cat stdout; Exit 1; }
+$MAKE check > stdout || { cat stdout; exit 1; }
cat stdout
grep "^# TOTAL: $count$" stdout
test $st -eq 0 || fatal_ "couldn't simulate failure of two tests"
unset st
-$MAKE recheck > stdout || { cat stdout; Exit 1; }
+$MAKE recheck > stdout || { cat stdout; exit 1; }
cat stdout
grep "^PASS: .*$tname-1\.test" stdout
grep "^PASS: .*$tname-2\.test" stdout
# "make clean" might ignore some failures, so we prefer to also grep its
# output to ensure that no "Argument list too long" error was encountered.
-$MAKE clean >output 2>&1 || { cat output; Exit 1; }
+$MAKE clean >output 2>&1 || { cat output; exit 1; }
cat output
-grep -i 'list.* too long' output && Exit 1
-ls $deepdir | grep '\.log$' && Exit 1
+grep -i 'list.* too long' output && exit 1
+ls $deepdir | grep '\.log$' && exit 1
:
# Colorized output from the testsuite report shouldn't end up in log files.
required='grep-nonprint'
-. ./defs || Exit 1
+. ./defs || exit 1
TERM=ansi; export TERM
XFAIL_TESTS = xpass xfail
END
-# Creative quoting to please maintainer-check.
-echo exit '0' > pass
-echo exit '0' > xpass
-echo exit '1' > fail
-echo exit '1' > xfail
-echo exit '77' > skip
-echo exit '99' > error
+echo 'exit 0' > pass
+echo 'exit 0' > xpass
+echo 'exit 1' > fail
+echo 'exit 1' > xfail
+echo 'exit 77' > skip
+echo 'exit 99' > error
$ACLOCAL
$AUTOCONF
./configure
mv config.log config-log # Avoid possible false positives below.
-AM_COLOR_TESTS=always $MAKE -e check && Exit 1
+AM_COLOR_TESTS=always $MAKE -e check && exit 1
# Not a useless use of cat; see above comments "grep-nonprinting"
# requirement in 'test-init.sh'.
-cat *.log | grep "$esc" && Exit 1
+cat *.log | grep "$esc" && exit 1
:
# Check that ':test-results:' directives in test scripts' output doesn't
# originate spurious results in the testsuite summary.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
cat test-suite.log
cat foo.log
cat bar.log
-test $st -eq 0 || Exit $st
+test $st -eq 0 || exit $st
grep '^:test-result:XFAIL$' foo.log
grep '^:test-result: SKIP$' foo.log
# clean directory. An early implementation of the '.trs' intermediate
# files incurred a similar problem.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
cat > foo.test <<'END'
#! /bin/sh
-test -f foo.run && Exit 1
+test -f foo.run && exit 1
: > foo.run
END
chmod a+x foo.test
# See automake bug#11252.
required='cc native'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
$AUTOMAKE -a
./configure
-$MAKE check >stdout && { cat stdout; Exit 1; }
+$MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=3 pass=1 fail=2 skip=0 xfail=0 xpass=0 error=0
test ! -f status
}
END
-$MAKE recheck >stdout || { cat stdout; Exit 1; }
+$MAKE recheck >stdout || { cat stdout; exit 1; }
cat stdout
count_test_results total=2 pass=2 fail=0 skip=0 xfail=0 xpass=0 error=0
grep '^PASS: b\.test$' stdout
grep '^PASS: c\.test$' stdout
-$MAKE recheck >stdout || { cat stdout; Exit 1; }
+$MAKE recheck >stdout || { cat stdout; exit 1; }
cat stdout
count_test_results total=0 pass=0 fail=0 skip=0 xfail=0 xpass=0 error=0
# TERM variable by either TESTS_ENVIRONMENT and AM_TESTS_ENVIRONMENT.
required='grep-nonprint'
-. ./defs || Exit 1
+. ./defs || exit 1
TERM=ansi; export TERM
# Check that the parallel-tests driver creates parent directories for
# the log files when needed.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
# See also sister test 'parallel-tests-suffix.test'.
required='cc native'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# - suffix rules
# See also sister test 'parallel-tests-suffix-prog.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
# older bash versions (e.g., bash 2.05b).
# See automake bug#10436.
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_OUTPUT >> configure.ac
# Check that the testsuite driver copes well with unreadable '.log'
# and '.trs' files.
-. ./defs || Exit 1
+. ./defs || exit 1
: > t
chmod a-r t && test ! -r t || skip_ "you can still read unreadable files"
$MAKE check
rm -f test-suite.log
chmod a-r $files
- $MAKE test-suite.log || { ls -l; Exit 1; }
+ $MAKE test-suite.log || { ls -l; exit 1; }
ls -l
grep '^foofoofoo$' foo.log
grep '^:test-result: PASS' foo.trs
grep '^:test-result: SKIP' bar.trs
grep '^SKIP: bar' test-suite.log
grep '^barbarbar$' test-suite.log
- $EGREP ':.*foo|foofoofoo' test-suite.log && Exit 1
+ $EGREP ':.*foo|foofoofoo' test-suite.log && exit 1
: For shells with busted 'set -e'.
done
# - TEST_LOGS redefinition at runtime
# - RECHECK_LOGS redefinition at runtime
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
./configure
-$MAKE check >stdout && { cat stdout; Exit 1; }
+$MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=3 pass=1 fail=1 skip=0 xfail=0 xpass=0 error=1
test -f test-suite.log
cat test-suite.log
test $(grep -c '^FAIL:' test-suite.log) -eq 1
test $(grep -c '^ERROR:' test-suite.log) -eq 1
-$EGREP '^(X?PASS|XFAIL|SKIP)' test-suite.log && Exit 1
+$EGREP '^(X?PASS|XFAIL|SKIP)' test-suite.log && exit 1
test -f baz.log
test -f bar.log
test -f foo.log
# Note that this usage has a problem: the summary will only
# take bar.log into account, because the $(TEST_SUITE_LOG) rule
# does not "see" baz.log. Hmm.
-env TESTS='bar.test' $MAKE -e check >stdout && { cat stdout; Exit 1; }
+env TESTS='bar.test' $MAKE -e check >stdout && { cat stdout; exit 1; }
cat stdout
grep '^FAIL: baz\.test$' stdout
grep '^ERROR: bar\.test$' stdout
# Note that the previous test and this one taken together expose the timing
# issue that requires the check-TESTS rule to always remove TEST_SUITE_LOG
# before running the tests lazily.
-env RECHECK_LOGS= $MAKE -e check > stdout && { cat stdout; Exit 1; }
+env RECHECK_LOGS= $MAKE -e check > stdout && { cat stdout; exit 1; }
cat stdout
test -f foo.log
grep '^PASS: foo\.test$' stdout
-grep bar.test stdout && Exit 1
-grep baz.test stdout && Exit 1
+grep bar.test stdout && exit 1
+grep baz.test stdout && exit 1
grep '^# PASS: *1$' stdout
grep '^# FAIL: *1$' stdout
grep '^# ERROR: *1$' stdout
# Now, explicitly retry with all test logs already updated, and ensure
# that the summary is still displayed.
-env RECHECK_LOGS= $MAKE -e check > stdout && { cat stdout; Exit 1; }
+env RECHECK_LOGS= $MAKE -e check > stdout && { cat stdout; exit 1; }
cat stdout
-grep foo.test stdout && Exit 1
-grep bar.test stdout && Exit 1
-grep baz.test stdout && Exit 1
+grep foo.test stdout && exit 1
+grep bar.test stdout && exit 1
+grep baz.test stdout && exit 1
grep '^# PASS: *1$' stdout
grep '^# FAIL: *1$' stdout
grep '^# ERROR: *1$' stdout
# Lazily rerunning only foo should only rerun this one test.
-env RECHECK_LOGS=foo.log $MAKE -e check > stdout && { cat stdout; Exit 1; }
+env RECHECK_LOGS=foo.log $MAKE -e check > stdout && { cat stdout; exit 1; }
cat stdout
grep foo.test stdout
-grep bar.test stdout && Exit 1
-grep baz.test stdout && Exit 1
+grep bar.test stdout && exit 1
+grep baz.test stdout && exit 1
grep '^# PASS: *1$' stdout
grep '^# FAIL: *1$' stdout
grep '^# ERROR: *1$' stdout
$MAKE clean
-env TEST_LOGS=baz.log $MAKE -e check > stdout && { cat stdout; Exit 1; }
+env TEST_LOGS=baz.log $MAKE -e check > stdout && { cat stdout; exit 1; }
cat stdout
-grep foo.test stdout && Exit 1
-grep bar.test stdout && Exit 1
+grep foo.test stdout && exit 1
+grep bar.test stdout && exit 1
grep baz.test stdout
$MAKE clean
-env TESTS=baz.test $MAKE -e check > stdout && { cat stdout; Exit 1; }
+env TESTS=baz.test $MAKE -e check > stdout && { cat stdout; exit 1; }
cat stdout
-grep foo.test stdout && Exit 1
-grep bar.test stdout && Exit 1
+grep foo.test stdout && exit 1
+grep bar.test stdout && exit 1
grep baz.test stdout
:
# - trailing whitespace in TESTS
# GNU make 3.80 may expand trailing white space to '.log'.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
# FIXME: the features tested by this script has been moved in contrib.
# FIXME: We should move this script accordingly.
-. ./defs || Exit 1
+. ./defs || exit 1
# Try the variants that are tried in check-html.am.
while :; do
./configure
-$MAKE check-html && Exit 1
+$MAKE check-html && exit 1
test -f mylog.html
# check-html should cause check_SCRIPTS to be created.
test -f bla
# Check parallel-tests features:
# - concurrent parallel execution
-. ./defs || Exit 1
+. ./defs || exit 1
case $MAKE in
*\ -j*) skip_ "\$MAKE contains '-j'";;
# It merely serves as demonstration. :-)
required='cc native GNUmake'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# BSD make will expand '$(TESTS:=.log)' to '.log' unless overridden.
# See parallel-tests10.test for a similar issue.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
END
$AUTOMAKE -a
./configure
-$MAKE check >stdout || { cat stdout; Exit 1; }
+$MAKE check >stdout || { cat stdout; exit 1; }
cat stdout
for x in TOTAL PASS FAIL XPASS FAIL SKIP ERROR; do
grep "^# $x: *0$" stdout
done
-Exit 0
+exit 0
# manual for the ugliness in this area, when VPATH comes into
# play. :-/
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
# Check parallel-tests features:
# - recheck
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
$AUTOMAKE -a
./configure
-$MAKE check >stdout && { cat stdout; Exit 1; }
+$MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=3 pass=1 fail=1 skip=0 xfail=0 xpass=0 error=1
-$MAKE recheck >stdout && { cat stdout; Exit 1; }
+$MAKE recheck >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=2 pass=0 fail=1 skip=0 xfail=0 xpass=0 error=1
-grep 'foo\.test' stdout && Exit 1
+grep 'foo\.test' stdout && exit 1
grep '^ERROR: bar\.test$' stdout
grep '^FAIL: baz\.test$' stdout
# Test to make sure backslash-newline is treated as whitespace.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
$ACLOCAL
$AUTOMAKE
-$FGREP zar.cdoz Makefile.in && Exit 1
-Exit 0
+$FGREP zar.cdoz Makefile.in && exit 1
+exit 0
# Test to make sure that -Wportability understands %-style pattern
# rules.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<EOF
AC_PROG_CC
# '${ARCH}/%.$(OBJEXT):'.
# Report from Ralf Corsepius.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>Makefile.am << 'EOF'
${ARCH}/%.$(OBJEXT): %.S
# Check that many conditions do not lead to combinatorial explosion.
# (This is related to PR/352.)
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_PROG_CC >>configure.ac
# FIXME: performance is too low, and FAIL accordingly; it just offers an
# FIXME: easy way to verify how effective a performance optimization is.
-. ./defs || Exit 1
+. ./defs || exit 1
count=5000
# FIXME: performance is too low, and FAIL accordingly; it just offers
# FIXME: an easy way verify how effective a performance optimization is.
-. ./defs || Exit 1
+. ./defs || exit 1
count=10000
./configure
-$MAKE test-suite.log >stdout || { cat stdout; Exit 1; }
+$MAKE test-suite.log >stdout || { cat stdout; exit 1; }
cat stdout
# Sanity checks.
# Make sure .PHONY can be given dependencies several times.
# From Ralf Corsepius.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >Makefile.am << 'EOF'
.PHONY: foo
# Test '+=' functionality.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
data_DATA = zar
# Test for += and backslashes.
# Reported by Ralf Corsepius.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac << 'END'
AM_CONDITIONAL([A], [true])
$AUTOMAKE
./configure
-$MAKE print >stdout || { cat stdout; Exit 1; }
+$MAKE print >stdout || { cat stdout; exit 1; }
cat stdout
$FGREP 'BEG: 0.h a0.h a1.h a2.h a3.h :END' stdout
# is erroneously retained in the final value.
# See also sister test pluseq11b.test.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'END'
AC_OUTPUT
$ACLOCAL
$AUTOMAKE
-grep '^ *FOO *=.*\\.' Makefile.in && Exit 1
+grep '^ *FOO *=.*\\.' Makefile.in && exit 1
$AUTOCONF
./configure
# Test '+=' with conditionals.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_CONDITIONAL([CHECK], [true])
# Another '+=' test with conditionals.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_CONDITIONAL([CHECK], [true])
# Yet another '+=' test.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Test for another '+=' problem. Report from Brian Jones.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_CONDITIONAL([CHECK], [true])
# -Wno-obsolete:
echo 'AUTOMAKE_OPTIONS = -Wno-obsolete' >> Makefile.am
AUTOMAKE_fails
-grep AM_CPPFLAGS stderr && Exit 1
+grep AM_CPPFLAGS stderr && exit 1
# !CHECK should still be mentioned.
grep ':.*!CHECK$' stderr
# Test that '+=' works with standard header-vars.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_SUBST([ZZZ])
# Test that '+=' fails when required.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Another '+=' test. From Paul Berrevoets.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
VAR = \
# Test the += diagnostics.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac << 'END'
AM_CONDITIONAL([COND1], [true])
# Test that POSIX variable expansion '$(var:str=rpl)' works
# in when used with the DATA primary.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
# Test that POSIX variable expansion '$(var:str=rpl)' works when used
# in EXTRA_DIST.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
# when used in LDADD.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Keep this in sync with sister test 'posixsubst-ltlibraries.test'.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Keep this in sync with sister test 'posixsubst-libraries.test'.
required='cc libtool libtoolize'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# with the PROGRAMS primary.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Test that POSIX variable expansion '$(var:str=rpl)' works when used
# with the SCRIPTS primary.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
# with the SOURCES primary.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# with the TESTS special variable.
# For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
$AUTOMAKE -a
./configure
-$MAKE check >out 2>&1 && { cat out; Exit 1; }
+$MAKE check >out 2>&1 && { cat out; exit 1; }
cat out
ls -l
grep '^FAIL: foo1\.test *$' out
# and renamed.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >configure.ac <<END
AC_INIT([$me], [1.0])
./configure
-test -f .deps/fred.Po || test -f _deps/fred.Po || Exit 1
+test -f .deps/fred.Po || test -f _deps/fred.Po || exit 1
:
# Test to make sure preprocessed F77 works.
# Report from Jochen Kuepper.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_F77
# to the distribution directory before it creates a templ
# subdirectory in the distribution directory.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT([README.foo:templ/README.foo.in])
# rename one of the 'foo.o' files.
required=libtoolize
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# to debug the problem.
# Note that this should be also in the documentation.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'EOF'
if NEVER_TRUE
cd build
# configure should fail since we've done something invalid.
-../configure 2>stderr && { cat stderr >&2; Exit 1; }
+../configure 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
grep 'conditional.*NEVER_TRUE' stderr
# should be '$(top_builddir)/bar/.deps'.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
mkdir foo
$MAKE
test -d foo/.deps
$MAKE distclean
-test -d foo/.deps && Exit 1
+test -d foo/.deps && exit 1
:
# Make sure AC_CYGWIN requires config.{sub,guess}.
# Reported by James Youngman.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<EOF
AC_CYGWIN
# the colon in the CONFIG_FILES variable.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << END
AC_INIT([$me], [1.0])
# Dependency tracking -vs- nonstandard Makefile names
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << END
AC_INIT([$me], [1.0])
# fail with messages like:
# foo_DEPENDENCIES was already defined in condition TRUE, ...
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# fail with messages like:
# foo_DEPENDENCIES was already defined in condition TRUE, ...
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Test for PR 287: empty SUBDIRS.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
# PR/300
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_RANLIB
$MAKE uninstall
-test -f inst/lib/liba.a && Exit 1
-test -f inst/lib/subdir/libb.a && Exit 1
+test -f inst/lib/liba.a && exit 1
+test -f inst/lib/subdir/libb.a && exit 1
$MAKE install-strip
# PR/300
required='cc libtoolize'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# A rule in the Makefile should create subdir.
test ! -d subdir
-$MAKE >stdout || { cat stdout; Exit 1; }
+$MAKE >stdout || { cat stdout; exit 1; }
cat stdout
test -d subdir
grep 'liba.la .*-rpath .*lib' stdout
-grep 'liba.la .*-rpath .*lib/subdir' stdout && Exit 1
+grep 'liba.la .*-rpath .*lib/subdir' stdout && exit 1
grep 'libb.la .*-rpath .*lib/subdir' stdout
test -f subdir/liba.la
test -f subdir/libb.la
-$MAKE install 2>stderr || { cat stderr >&2; Exit 1; }
+$MAKE install 2>stderr || { cat stderr >&2; exit 1; }
cat stderr >&2
-grep 'remember.*--finish' stderr && Exit 1
+grep 'remember.*--finish' stderr && exit 1
test -f inst/lib/liba.la
test -f inst/lib/subdir/libb.la
$MAKE uninstall
-test -f inst/lib/liba.la && Exit 1
-test -f inst/lib/subdir/libb.la && Exit 1
+test -f inst/lib/liba.la && exit 1
+test -f inst/lib/subdir/libb.la && exit 1
$MAKE install-strip
# PR/300
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# compilation.
required='libtoolize gcc'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
./configure am_cv_CC_dependencies_compiler_type=dashmstdout
$MAKE
-test -f librace.la && Exit 1
+test -f librace.la && exit 1
$MAKE check
# The failure we check usually occurs during the above build,
# (pr401b.test and pr401c.test do the same for LTLIBOBJS and ALLOCA)
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
mkdir lib src
# (pr401.test and pr401c.test do the same for LIBOBJS and ALLOCA)
required='cc libtoolize'
-. ./defs || Exit 1
+. ./defs || exit 1
mkdir lib src
# (pr401.test and pr401b.test do the same for LIBOBJS and LTLIBOBJS)
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
mkdir lib src
# Empty _SOURCES results in $(LINK) undefined.
required=libtool
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# make by hand. Thus, fixing it would not be worth the hassle, but
# we prefer to keep it exposed anyway.
-. ./defs || Exit 1
+. ./defs || exit 1
# We'll use calls to stat to get debugging information.
if stat /dev/null; then stat=stat; else stat=:; fi
# "make distcheck" fails when two source dirs exist.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
subdirs="foo bar"
if test "$line" = ".c.o:"; then
read next
if test -z "$next"; then
- Exit 1
+ exit 1
else
: # For shells with broken 'set -e'.
fi
break
fi
- done) < foo/Makefile.in || Exit 1
+ done) < foo/Makefile.in || exit 1
cd build
../configure
# ltconfig, ltmain.sh, mdate-sh, missing, and mkinstalldirs. In fact,
# the entire 'support/' directory is omitted.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << END
AC_INIT([$me], [1.0])
# Test to make sure range of prefixes can be extended
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# examples in the Automake manual do not cause obvious errors.
# Please keep this test in sync with the automake manual.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
AC_PROG_CC
# should work.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
AC_PROG_CC
# cover more cases.
# See also test 'primary-prefix-valid-couples.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
plan_ "later"
done <all.list
# Check that automake really failed only for the expected reason(s).
-grep -v 'dir.* not a legitimate directory' stderr && Exit 1
+grep -v 'dir.* not a legitimate directory' stderr && exit 1
# Check that the same failures are present without the '--add-missing'
# option.
# Test for valid prefix/primary combinations.
# See also test 'primary-prefix-invalid-couples.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
AC_PROG_CC
# Test to make sure errors in am_install_var work.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
bin_PROGRAMS = @programs@
# Test to make sure errors in am_install_var work.
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_PROG_CC >> configure.ac
# Make sure we can build programs ending in '.la'
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<EOF
AC_PROG_CC
# Test on automake options '--print-data-dir' and '--print-script-dir'.
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
-libdir=$($AUTOMAKE --print-libdir) || Exit 1
-case $libdir in /*);; *) Exit 1;; esac
+libdir=$($AUTOMAKE --print-libdir) || exit 1
+case $libdir in /*);; *) exit 1;; esac
test -d "$libdir"
test "$libdir" = "$am_pkgvdatadir"
test "$libdir" = "$am_scriptdir"
# Test for bug where when multiple scripts are installed,
# the check for AC_PROG_INSTALL fails.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
bin_SCRIPTS = zardoz qbert brownie
# checks have been introduced in commit 'Release-1-9-254-g9d0eaef' into
# the former test 'subst2.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_SUBST([FOO], [c])
# Test the '--basedir' option of the 'py-compile' script,
required=python
-. ./defs || Exit 1
+. ./defs || exit 1
# We'll need to create files in '..', so we need one more subdirectory
# level in order not to clutter up the top-level tests directory.
else
d2=$d
fi
- ../install-sh -d "$d2" "$d2/sub" || Exit 99
+ ../install-sh -d "$d2" "$d2/sub" || exit 99
: > "$d2/$f.py"
: > "$d2/sub/$f.py"
./py-compile --basedir "$d" "$f.py" "sub/$f.py"
test -f "$d2/sub/$f.pyc"
test -f "$d2/sub/$f.pyo"
rm -f "$d2/$f.pyc" "$d2/$f.pyo" "$d2/sub/$f.pyc" "$d2/sub/$f.pyo"
- find . | grep '\.py[co]$' && Exit 1
+ find . | grep '\.py[co]$' && exit 1
done
:
# 'py-compile-basic2.test'.
required=python
-. ./defs || Exit 1
+. ./defs || exit 1
cp "$am_scriptdir/py-compile" . \
|| fatal_ "failed to fetch auxiliary script py-compile"
# related test 'py-compile-basic.test'.
required=python
-. ./defs || Exit 1
+. ./defs || exit 1
ocwd=$(pwd) || fatal_ "getting current working directory"
# Test the '--destdir' option of the 'py-compile' script,
required=python
-. ./defs || Exit 1
+. ./defs || exit 1
cp "$am_scriptdir/py-compile" . \
|| fatal_ "failed to fetch auxiliary script py-compile"
./py-compile --destdir $destdir foo.py sub/bar.py
ls -l $destdir $destdir/sub # For debugging.
-ls . sub | grep '\.py[co]$' && Exit 1
+ls . sub | grep '\.py[co]$' && exit 1
test -f $destdir/foo.pyc
test -f $destdir/foo.pyo
test -f $destdir/sub/bar.pyc
test -f $destdir/sub/bar.pyo
strings $destdir/*.py[co] $destdir/sub/*.py[co] || : # For debugging.
-$FGREP $destdir $destdir/*.py[co] $destdir/sub/*.py[co] && Exit 1
+$FGREP $destdir $destdir/*.py[co] $destdir/sub/*.py[co] && exit 1
:
# Make sure 'py-compile' honours the PYTHON environment variable.
-. ./defs || Exit 1
+. ./defs || exit 1
cp "$am_scriptdir/py-compile" . \
|| fatal_ "failed to fetch auxiliary script py-compile"
cd sub1
PYTHON=: ../py-compile foo.py
-ls | grep . && Exit 1
+ls | grep . && exit 1
-PYTHON=false ../py-compile foo.py && Exit 1
-ls | grep . && Exit 1
+PYTHON=false ../py-compile foo.py && exit 1
+ls | grep . && exit 1
PYTHON='echo GrEpMe AndMeToo' ../py-compile foo.py
PYTHON='echo GrEpMe AndMeToo' ../py-compile foo.py | grep 'GrEpMe AndMeToo'
-ls | grep . && Exit 1
+ls | grep . && exit 1
cd ..
mkdir sub2
PYTHON=../my-py ../py-compile foo.py
test -f my-py.run
-ls | grep -v '^my-py\.run$' | grep . && Exit 1
+ls | grep -v '^my-py\.run$' | grep . && exit 1
cd ..
mkdir sub3
PATH=..$PATH_SEPARATOR$PATH; export PATH
PYTHON=my-py py-compile foo.py
test -f my-py.run
-ls | grep -v '^my-py\.run$' | grep . && Exit 1
+ls | grep -v '^my-py\.run$' | grep . && exit 1
:
# explicitly terminate the option list for 'py-compile'.
required=python
-. ./defs || Exit 1
+. ./defs || exit 1
cp "$am_scriptdir/py-compile" . \
|| fatal_ "failed to fetch auxiliary script py-compile"
# Test 'py-compile --help', 'py-compile --version', and that 'py-compile'
# correctly complains on wrong usage.
-. ./defs || Exit 1
+. ./defs || exit 1
cp "$am_scriptdir/py-compile" . \
|| fatal_ "failed to fetch auxiliary script py-compile"
# --help
./py-compile --help >stdout 2>stderr \
- || { cat stdout; cat stderr >&2; Exit 1; }
+ || { cat stdout; cat stderr >&2; exit 1; }
cat stdout
-test -s stderr && { cat stderr >&2; Exit 1; }
+test -s stderr && { cat stderr >&2; exit 1; }
grep '^Usage: py-compile .' stdout
$FGREP ' [--basedir DIR]' stdout
$FGREP ' [--destdir DIR]' stdout
# --version
./py-compile --version >stdout 2>stderr \
- || { cat stdout; cat stderr >&2; Exit 1; }
+ || { cat stdout; cat stderr >&2; exit 1; }
cat stdout
-test -s stderr && { cat stderr >&2; Exit 1; }
+test -s stderr && { cat stderr >&2; exit 1; }
year='20[0-9][0-9]' # Hopefully automake will be obsolete in 80 years ;-)
month='(0[0-9]|1[012])'
day='([012][0-9]|3[01])'
# Unknown option.
for opt in -b -d --foo; do
- ./py-compile $opt 2>stderr && { cat stderr >&2; Exit 1; }
+ ./py-compile $opt 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
grep "^py-compile: unrecognized option '$opt'" stderr
grep "^Try 'py-compile --help' for more information" stderr
# Missing option argument.
for opt in --basedir --destdir; do
- ./py-compile $opt 2>stderr && { cat stderr >&2; Exit 1; }
+ ./py-compile $opt 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
grep "^py-compile: option '$opt' requires an argument" stderr
grep "^Try 'py-compile --help' for more information" stderr
# Missing files.
for args in '' '--basedir dir' '--destdir dir'; do
- ./py-compile $args 2>stderr && { cat stderr >&2; Exit 1; }
+ ./py-compile $args 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
grep '^py-compile: no files given' stderr
grep "^Try 'py-compile --help' for more information" stderr
# Test distribution of *_PYTHON files.
# This test does not require python.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_PATH_PYTHON([], [:], [:])
# declaration.
required=python
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'EOF'
AM_PATH_PYTHON
# advertised in the manual.
required=python
-. ./defs || Exit 1
+. ./defs || exit 1
# In case the user's config.site defines pythondir or pyexecdir.
CONFIG_SITE=/dev/null; export CONFIG_SITE
# vary among different python installations, so we need more relaxed
# and ad-hoc checks for them. Also, more proper "functional" checks
# on them should be done in the 'python-virtualenv.test' test.
-PYTHON_VERSION=$($PYTHON -c 'import sys; print(sys.version[:3])') || Exit 1
-PYTHON_PLATFORM=$($PYTHON -c 'import sys; print(sys.platform)') || Exit 1
+PYTHON_VERSION=$($PYTHON -c 'import sys; print(sys.version[:3])') || exit 1
+PYTHON_PLATFORM=$($PYTHON -c 'import sys; print(sys.platform)') || exit 1
PYTHON_EXEC_PREFIX='${exec_prefix}'
PYTHON_PREFIX='${prefix}'
pkgpythondir="\${pythondir}/$me"
# This test also works as a mild stress-test on the python support.
required='cc python virtualenv'
-. ./defs || Exit 1
+. ./defs || exit 1
# In case the user's config.site defines pythondir or pyexecdir.
CONFIG_SITE=/dev/null; export CONFIG_SITE
python -c 'import am_foo; print(am_foo.__file__)'
python -c 'import am_virtenv; print(am_virtenv.__file__)'
deactivate "nondestructive"
-python -c 'import am_foo' && Exit 1
-python -c 'import am_virtenv' && Exit 1
+python -c 'import am_foo' && exit 1
+python -c 'import am_virtenv' && exit 1
:
# Test to make sure py_compile and am__py_compile are correctly defined.
-. ./defs || Exit 1
+. ./defs || exit 1
echo 'AM_PATH_PYTHON' >> configure.ac
# Test _PYTHON with conditionals.
required=python
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'EOF'
AM_PATH_PYTHON
# Test missing python.
# Python is not required for this test.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'EOF'
m4_define([_AM_PYTHON_INTERPRETER_LIST], [IShouldNotExist1 IShouldNotExist2])
$ACLOCAL
$AUTOCONF
-./configure >stdout 2>stderr && { cat stdout; cat stderr >&2; Exit 1; }
+./configure >stdout 2>stderr && { cat stdout; cat stderr >&2; exit 1; }
cat stdout
cat stderr >&2
grep 'checking for IShouldNotExist1' stdout
./configure
# Any user setting should be used.
-./configure PYTHON=foo >stdout && { cat stdout; Exit 1; }
+./configure PYTHON=foo >stdout && { cat stdout; exit 1; }
cat stdout
grep 'PYTHON = foo' stdout
# Ensure DESTDIR is not included in byte-compiled files.
required=python
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'EOF'
AM_PATH_PYTHON
# If DESTDIR has made it into the byte compiled files, fail the test.
$FGREP "$instdir" "$instdir/usr/share/my/my.pyo" \
- "$instdir/usr/share/my/my.pyc" && Exit 1
+ "$instdir/usr/share/my/my.pyc" && exit 1
:
# Make sure that Automake suggests using AM_PATH_PYTHON.
-. ./defs || Exit 1
+. ./defs || exit 1
$ACLOCAL
# Make sure we install built python files.
required=python
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<EOF
AM_PATH_PYTHON
# Test detection of missing Python.
# Python is not required for this test.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<EOF
AM_PATH_PYTHON
$AUTOMAKE --add-missing
# Simulate no Python.
-./configure PYTHON=: 2>stderr && { cat stderr >&2; Exit 1; }
+./configure PYTHON=: 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
grep 'no suitable Python interpreter found' stderr
# Again, but from the environment this time.
-env PYTHON=: ./configure 2>stderr && { cat stderr >&2; Exit 1; }
+env PYTHON=: ./configure 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
grep 'no suitable Python interpreter found' stderr
# Same as python4.test, but requiring a version.
# Python is not required for this test.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<EOF
# Hopefully the Python team will never release such a version.
./configure >stdout 2>stderr && {
cat stdout
cat stderr >&2
- Exit 1
+ exit 1
}
cat stdout
cat stderr >&2
# Same as python5.test, but with the user forcing the python to use.
required=python
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac << 'END'
# Hopefully the Python team will never release such a version.
./configure PYTHON=my-python >stdout 2>stderr && {
cat stdout
cat stderr >&2
- Exit 1
+ exit 1
}
cat stdout
cat stderr >&2
# Same as python4.test, but using a custom ACTION-IF-NOT-FOUND.
# Python is not required for this test.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<\EOF
AM_PATH_PYTHON(,, [echo "$PYTHON" > py])
# Same as python6.test, but requiring a version.
# Python is not required for this test.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<\EOF
# Hopefully the Python team will never release such a version.
# Test ACTION-IF-TRUE in AM_PATH_PYTHON.
required=python
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'EOF'
# $PYTHON is supposed to be properly set in ACTION-IF-TRUE.
# Similar to python8.test, but requiring a version.
required=python
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'EOF'
# $PYTHON is supposed to be properly set in ACTION-IF-TRUE.
# Test to make sure recursive variable definitions die.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Test to make sure recursive variable definitions die.
# From Jim Meyering.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
man_MANS = chgrp.1
# Test Automake-provided internal make macro $(am__relativize).
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
plan_ later
# Check that the "all" target triggers rebuilt of outdated Makefiles.
# See also sister test 'remake-all-2.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
mkfile=Makefile
$AUTOCONF
./configure
-$FGREP "$magic1" mkfile.in && Exit 1 # Sanity check.
+$FGREP "$magic1" mkfile.in && exit 1 # Sanity check.
# Two code paths in configure.am:
# This handle the case in which the makefiles are not called 'Makefile'.
# See also sister test 'remake-all-1.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
mkfile=foobar
$AUTOCONF
./configure
-$FGREP "$magic1" mkfile.in && Exit 1 # Sanity check.
+$FGREP "$magic1" mkfile.in && exit 1 # Sanity check.
# Two code paths in configure.am:
# big deal in practice (in fact, this test *currently fails*). Still,
# keeping the limitation exposed is a good idea anyway.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
AC_OUTPUT
# of the "deleted header problem". This test checks deeper inclusion
# stacks, and use VPATH builds.
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_OUTPUT >> configure.ac
rm -f $srcdir/fnord.am
$MAKE
# Sanity checks.
-$FGREP 'you are not seeing this' $srcdir/Makefile.in Makefile && Exit 1
+$FGREP 'you are not seeing this' $srcdir/Makefile.in Makefile && exit 1
$FGREP 'this is baz' $srcdir/Makefile.in
$FGREP 'this is baz' Makefile
echo '# no more inclusions' > $srcdir/Makefile.am
$MAKE
# Sanity checks.
-$EGREP 'this is (foo|bar|baz)' Makefile $srcdir/Makefile.in && Exit 1
+$EGREP 'this is (foo|bar|baz)' Makefile $srcdir/Makefile.in && exit 1
$FGREP 'no more inclusions' Makefile
:
# of the "deleted header problem". This test does the check when the
# SUBDIRS variable is involved.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
AC_CONFIG_FILES([sub1/Makefile sub2/Makefile])
rm -f sub1/bar.am
$MAKE all
# Sanity checks.
-$FGREP 'this is bar' sub1/Makefile.in sub1/Makefile && Exit 1
+$FGREP 'this is bar' sub1/Makefile.in sub1/Makefile && exit 1
$FGREP 'this is sub1/Makefile.am' sub1/Makefile.in
$FGREP 'this is sub1/Makefile.am' sub1/Makefile
rm -f foo.am
$MAKE all
# Sanity checks.
-$FGREP 'this is foo' sub*/Makefile* Makefile* && Exit 1
+$FGREP 'this is foo' sub*/Makefile* Makefile* && exit 1
for d in . sub1 sub2; do
$FGREP "this is $d/Makefile.am" $d/Makefile.in
$FGREP "this is $d/Makefile.am" $d/Makefile
# Check that inclusion of '.am' fragments by automake does not suffer
# of the "deleted header problem". Basic checks are done here.
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_OUTPUT >> configure.ac
rm -f foo.am
$MAKE Makefile
# Sanity checks.
-$FGREP 'this is foo' Makefile.in Makefile && Exit 1
+$FGREP 'this is foo' Makefile.in Makefile && exit 1
$FGREP 'this is bar' Makefile.in
$FGREP 'this is bar' Makefile
$FGREP 'this is baz' Makefile.in
# Sanity checks.
$FGREP 'empty empty' Makefile.in
$FGREP 'empty empty' Makefile
-grep 'this is ba[rz]' Makefile Makefile.in && Exit 1
+grep 'this is ba[rz]' Makefile Makefile.in && exit 1
:
# header file" issue w.r.t. aclocal.m4 dependencies. See also related
# test 'acloca22.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
FOO_MACRO
# for more info).
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
AC_PROG_CC
# for more info).
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
AC_CONFIG_HEADERS([config.h])
# for more info).
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
AC_CONFIG_HEADERS([config.h])
# big deal in practice (in fact, this test *currently fails*). Still,
# keeping the limitation exposed is a good idea anyway.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
m4_include([foobar.m4])
# Test remake rules when m4 files get moved among different "include
# dirs" (i.e. those passed to aclocal with '-I' option).
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
MY_MACRO
# of the "deleted header problem". This test checks that we can rename
# an included .am file without confusing the remake rules.
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_OUTPUT >> configure.ac
mv -f foo.am bar.am
echo include bar.am > Makefile.am
$MAKE Makefile
-$FGREP 'foo.am' Makefile Makefile.in && Exit 1
+$FGREP 'foo.am' Makefile Makefile.in && exit 1
$sleep
rm -f has-run-1 bar.am
# Test remake rules when m4 files get renamed.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
MY_MACRO
# an m4 macro in it gets renamed. Kudos to Bruno Haible for thinking
# about this situation. See also related test 'acloca22.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
MY_MACRO
# Test remake rules when the name of an m4 macro change. Try both with
# and without indirection.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
MY_MACRO
# See also the other similar tests 'remake-subdir*.test', and the
# related test 'aclocal5.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
m4_include([subdirs.m4])
# related test 'aclocal5.test'
required=GNUmake
-. ./defs || Exit 1
+. ./defs || exit 1
magic1='::MagicString::One::'
magic2='__MagicString__Two__'
debug_info
$FGREP $magic2 sub/GNUmakefile
$FGREP $magic2 sub/GNUmakefile.in
-$FGREP $magic1 sub/GNUmakefile sub/GNUmakefile.in && Exit 1
-$FGREP $magic2 GNUmakefile GNUmakefile.in && Exit 1
+$FGREP $magic1 sub/GNUmakefile sub/GNUmakefile.in && exit 1
+$FGREP $magic2 GNUmakefile GNUmakefile.in && exit 1
:
# an explicit delay in the build process.
# Suggestion by Ralf Wildenhues.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# See also the other similar tests 'remake-subdir*.test', and the
# related test 'aclocal5.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
if using_gmake; then
remake=$MAKE
debug_info
$FGREP $magic2 sub/Makefile
$FGREP $magic2 sub/Makefile.in
-$FGREP $magic1 sub/Makefile sub/Makefile.in && Exit 1
-$FGREP $magic2 Makefile Makefile.in && Exit 1
+$FGREP $magic1 sub/Makefile sub/Makefile.in && exit 1
+$FGREP $magic2 Makefile Makefile.in && exit 1
:
# See also the other similar tests 'remake-subdir*.test', and the
# related test 'aclocal5.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
magic1='::MagicString::One::'
magic2='__MagicString__Two__'
debug_info
$FGREP $magic2 sub/build.mk
$FGREP $magic2 sub/build.in
-$FGREP $magic1 sub/build.in sub/build.mk && Exit 1
-$FGREP $magic2 build.in build.mk && Exit 1
+$FGREP $magic1 sub/build.in sub/build.mk && exit 1
+$FGREP $magic2 build.in build.mk && exit 1
:
# are correctly generated.
# See also sister functional test 'remake1a.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# configure.ac.
# Keep in sync with sister tests 'remake10b.test' and 'remake10c.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
magic1=::MagicStringOne::
magic2=__MagicStringTwo__
echo "m4_define([my_fingerprint], [$magic2])" > $top_srcdir/foo.m4
$remake
$FGREP FINGERPRINT Makefile # For debugging.
- $FGREP $magic1 Makefile && Exit 1
+ $FGREP $magic1 Makefile && exit 1
$FGREP $magic2 Makefile
$sleep
echo "m4_define([my_fingerprint], [$magic3])" > $top_srcdir/bar.m4
$remake
$FGREP FINGERPRINT Makefile # For debugging.
- $FGREP $magic1 Makefile && Exit 1
- $FGREP $magic2 Makefile && Exit 1
+ $FGREP $magic1 Makefile && exit 1
+ $FGREP $magic2 Makefile && exit 1
$FGREP $magic3 Makefile
$sleep
echo "m4_define([my_fingerprint], [$magic1])" > $top_srcdir/bar.m4
$remake
- $FGREP $magic2 Makefile && Exit 1
- $FGREP $magic3 Makefile && Exit 1
+ $FGREP $magic2 Makefile && exit 1
+ $FGREP $magic3 Makefile && exit 1
$FGREP $magic1 Makefile
$sleep
echo "m4_define([my_fingerprint], [DummyValue])" > $top_srcdir/foo.m4
using_gmake || $remake
$MAKE distcheck
- $FGREP $magic1 Makefile && Exit 1 # Sanity check.
- $FGREP $magic2 Makefile && Exit 1 # Likewise.
- $FGREP $magic3 Makefile && Exit 1 # Likewise.
+ $FGREP $magic1 Makefile && exit 1 # Sanity check.
+ $FGREP $magic2 Makefile && exit 1 # Likewise.
+ $FGREP $magic3 Makefile && exit 1 # Likewise.
$MAKE distclean
# Makefile.am.
# Keep in sync with sister tests 'remake10a.test' and 'remake10c.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
magic1=::MagicStringOne::
magic2=__MagicStringTwo__
echo "FINGERPRINT = $magic2" > $top_srcdir/foo.am
$remake
$FGREP FINGERPRINT Makefile # For debugging.
- $FGREP $magic1 Makefile && Exit 1
+ $FGREP $magic1 Makefile && exit 1
$FGREP $magic2 Makefile
$sleep
echo "FINGERPRINT = $magic3" > $top_srcdir/bar.am
$remake
$FGREP FINGERPRINT Makefile # For debugging.
- $FGREP $magic1 Makefile && Exit 1
- $FGREP $magic2 Makefile && Exit 1
+ $FGREP $magic1 Makefile && exit 1
+ $FGREP $magic2 Makefile && exit 1
$FGREP $magic3 Makefile
$sleep
echo "FINGERPRINT = $magic1" > $top_srcdir/bar.am
$remake
- $FGREP $magic2 Makefile && Exit 1
- $FGREP $magic3 Makefile && Exit 1
+ $FGREP $magic2 Makefile && exit 1
+ $FGREP $magic3 Makefile && exit 1
$FGREP $magic1 Makefile
$sleep
echo "FINGERPRINT = DummyValue" > $top_srcdir/foo.am
using_gmake || $remake
$MAKE distcheck
- $FGREP $magic1 Makefile && Exit 1 # Sanity check.
- $FGREP $magic2 Makefile && Exit 1 # Likewise.
- $FGREP $magic3 Makefile && Exit 1 # Likewise.
+ $FGREP $magic1 Makefile && exit 1 # Sanity check.
+ $FGREP $magic2 Makefile && exit 1 # Likewise.
+ $FGREP $magic3 Makefile && exit 1 # Likewise.
$MAKE distclean
# aclocal.m4.
# Keep in sync with sister tests 'remake10a.test' and 'remake10b.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
magic1=::MagicStringOne::
magic2=__MagicStringTwo__
echo "AC_DEFUN([my_fingerprint], [$magic2])" > $top_srcdir/m4/foo.m4
$remake
$FGREP FINGERPRINT Makefile # For debugging.
- $FGREP $magic1 Makefile && Exit 1
+ $FGREP $magic1 Makefile && exit 1
$FGREP $magic2 Makefile
$sleep
echo "AC_DEFUN([my_fingerprint], [$magic3])" > $top_srcdir/m4/bar.m4
$remake
$FGREP FINGERPRINT Makefile # For debugging.
- $FGREP $magic1 Makefile && Exit 1
- $FGREP $magic2 Makefile && Exit 1
+ $FGREP $magic1 Makefile && exit 1
+ $FGREP $magic2 Makefile && exit 1
$FGREP $magic3 Makefile
$sleep
echo "AC_DEFUN([my_fingerprint], [$magic1])" > $top_srcdir/m4/bar.m4
$remake
- $FGREP $magic2 Makefile && Exit 1
- $FGREP $magic3 Makefile && Exit 1
+ $FGREP $magic2 Makefile && exit 1
+ $FGREP $magic3 Makefile && exit 1
$FGREP $magic1 Makefile
$sleep
echo "AC_DEFUN([AM_UNUSED], [NoSuchMacro])" > $top_srcdir/m4/bar.m4
using_gmake || $remake
$MAKE distcheck
- $FGREP $magic1 Makefile && Exit 1 # Sanity check.
- $FGREP $magic2 Makefile && Exit 1 # Likewise.
- $FGREP $magic3 Makefile && Exit 1 # Likewise.
+ $FGREP $magic1 Makefile && exit 1 # Sanity check.
+ $FGREP $magic2 Makefile && exit 1 # Likewise.
+ $FGREP $magic3 Makefile && exit 1 # Likewise.
$MAKE distclean
# rules don't break in obvious ways in a slightly "heavier than usual"
# setup.
-. ./defs || Exit 1
+. ./defs || exit 1
ocwd=$(pwd) || fatal_ "getting current working directory"
for f in configure config.status $makefiles_list $bar_list; do
$FGREP "$magic2" $f
done
-$FGREP "$magic1" configure config.status $makefiles_list $bar_list && Exit 1
+$FGREP "$magic1" configure config.status $makefiles_list $bar_list && exit 1
$MAKE distcheck
# Test basic remake rules for Makefiles with non-default names
# and/or with multiple sources.
-. ./defs || Exit 1
+. ./defs || exit 1
magic1=::MagicStringOne::
magic2=__MagicStringTwo__
$MAKE zardoz
fi
$FGREP my-check zardoz # Sanity check.
-$FGREP $magic1 zardoz zardoz.in && Exit 1
+$FGREP $magic1 zardoz zardoz.in && exit 1
$FGREP $magic2 zardoz
$FGREP $magic2 zardoz.in
is_gmake || $MAKE zardoz
$MAKE test
$FGREP my-check zardoz # Sanity check.
-$FGREP $magic3 quux.in && Exit 1
+$FGREP $magic3 quux.in && exit 1
$FGREP $magic3 zardoz
-$FGREP $magic1 zardoz && Exit 1
-$FGREP $magic2 zardoz && Exit 1
+$FGREP $magic1 zardoz && exit 1
+$FGREP $magic2 zardoz && exit 1
# After the remake above, the files 'zardoz.am' and 'zardoz.in'
# should be no more needed.
echo 'endif' > zardoz.am # Put in a syntax error.
# Make sure remaking rules in subdir are correctly generated.
# See also sister "grepping" test 'remake.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
fingerprint='=/FiNgErPrInT/='
# are correct even when there is no upper-level Makefile.
# TODO: we should really add also functional tests for this!
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# in a subdirectory even when there is no Makefile for that subdirectory.
# See also sister functional test 'remake3a.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_CONFIG_FILES([sub/foo])
# there is no Makefile for that subdirectory.
# See also sister "grepping" test 'remake3.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_CONFIG_FILES([sub/foo])
#
# Report from Akim Demaille.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'EOF'
# Rebuild rule are ok until make dist, but not afterwards.
# but not all.
# Report from Ralf Corsepius.
-. ./defs || Exit 1
+. ./defs || exit 1
if using_gmake; then
remake="$MAKE"
: > rebuild_ok
./configure --no-create
$remake
-grep 'AUTOCONF.*=.*false' Makefile && Exit 1
+grep 'AUTOCONF.*=.*false' Makefile && exit 1
# Make sure rebuild rules do work if --enable-maintainer-mode is given.
./configure --enable-maintainer-mode
# Make sure remaking rules work when subdir Makefile.in has been removed.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_CONFIG_FILES([sub/Makefile])
do_check ()
{
- $MAKE >stdout || { cat stdout; Exit 1; }
+ $MAKE >stdout || { cat stdout; exit 1; }
cat stdout
test $(grep -c " --run " stdout) -eq 1
}
# Make sure remaking rules fail when they should.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_CONFIG_FILES([sub/Makefile])
# Fail for broken input files.
echo "if FOO" > sub/Makefile.am
-$MAKE && Exit 1
+$MAKE && exit 1
: >sub/Makefile.am
$MAKE
mv Makefile.am backup
echo "if FOO" > Makefile.am
-$MAKE && Exit 1
+$MAKE && exit 1
# Fail for missing input files, with or without missing
# Makefile.in files.
cp backup Makefile.am
mv sub/Makefile.am sub/backup
-$MAKE && Exit 1
+$MAKE && exit 1
rm -f sub/Makefile.in
-$MAKE && Exit 1
+$MAKE && exit 1
mv sub/backup sub/Makefile.am
rm -f Makefile.am
-$MAKE && Exit 1
+$MAKE && exit 1
rm -f Makefile.in
-$MAKE && Exit 1
+$MAKE && exit 1
:
# Keep this in sync with sister test 'remake8b.test', which performs the
# same checks for a VPATH build.
-. ./defs || Exit 1
+. ./defs || exit 1
mv -f configure.ac configure.stub
# Keep this in sync with sister test 'remake8a.test', which performs the
# same checks for a in-tree build.
-. ./defs || Exit 1
+. ./defs || exit 1
mv -f configure.ac configure.stub
# Test remake rules when configure.ac or its prerequisites change.
# Keep in sync with the other sister tests 'remake9*.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
magic1=::MagicStringOne::
magic2=__MagicStringTwo__
> $srcdir/tweak-configure-in
remake_
$FGREP FINGERPRINT Makefile # For debugging.
- $FGREP $magic1 Makefile && Exit 1
+ $FGREP $magic1 Makefile && exit 1
$FGREP $magic2 Makefile
test x"$(./foo.sh)" = x"$magic2"
mv -f t $srcdir/configure.ac
using_gmake || remake_
$MAKE distcheck
- $FGREP $magic1 Makefile && Exit 1 # Sanity check.
- $FGREP $magic2 Makefile && Exit 1 # Likewise.
+ $FGREP $magic1 Makefile && exit 1 # Sanity check.
+ $FGREP $magic2 Makefile && exit 1 # Likewise.
$MAKE distclean
# Test remake rules when Makefile.am or its prerequisites change.
# Keep in sync with the other sister tests 'remake9*.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
if using_gmake; then
remake_() { $MAKE nil; }
> $srcdir/tweak-makefile-am
remake_
$FGREP FINGERPRINT Makefile # For debugging.
- $FGREP $magic1 Makefile && Exit 1
+ $FGREP $magic1 Makefile && exit 1
$FGREP $magic2 Makefile
test x"$(./foo.sh)" = x"$magic2"
mv -f t $srcdir/Makefile.am
using_gmake || remake_
$MAKE distcheck
- $FGREP $magic1 Makefile && Exit 1 # Sanity check.
- $FGREP $magic2 Makefile && Exit 1 # Likewise.
+ $FGREP $magic1 Makefile && exit 1 # Sanity check.
+ $FGREP $magic2 Makefile && exit 1 # Likewise.
$MAKE distclean
# Test remake rules when acinclude.m4 or its prerequisites change.
# Keep in sync with the other sister tests 'remake9*.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
magic1=::MagicStringOne::
magic2=__MagicStringTwo__
> $srcdir/tweak-acinclude-m4
remake_
$FGREP FINGERPRINT Makefile # For debugging.
- $FGREP $magic1 Makefile && Exit 1
+ $FGREP $magic1 Makefile && exit 1
$FGREP $magic2 Makefile
test x"$(./foo.sh)" = x"$magic2"
echo "AC_DEFUN([my_fingerprint], [DummyValue])" > $srcdir/acinclude.m4
using_gmake || remake_
$MAKE distcheck
- $FGREP $magic1 Makefile && Exit 1 # Sanity check.
- $FGREP $magic2 Makefile && Exit 1 # Likewise.
+ $FGREP $magic1 Makefile && exit 1 # Sanity check.
+ $FGREP $magic2 Makefile && exit 1 # Likewise.
$MAKE distclean
# Test remake rules when aclocal.m4 or its prerequisites change.
# Keep in sync with the other sister tests 'remake9*.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
magic1=::MagicStringOne::
magic2=__MagicStringTwo__
> $srcdir/tweak-aclocal-m4
remake_
$FGREP FINGERPRINT Makefile # For debugging.
- $FGREP $magic1 Makefile && Exit 1
+ $FGREP $magic1 Makefile && exit 1
$FGREP $magic2 Makefile
test x"$(./foo.sh)" = x"$magic2"
echo 'AC_DEFUN([my_fingerprint], [DummyValue])' >> $srcdir/aclocal.m4
using_gmake || remake_
$MAKE distcheck
- $FGREP $magic1 Makefile && Exit 1 # Sanity check.
- $FGREP $magic2 Makefile && Exit 1 # Likewise.
+ $FGREP $magic1 Makefile && exit 1 # Sanity check.
+ $FGREP $magic2 Makefile && exit 1 # Likewise.
$MAKE distclean
# generate broken or incorrect makefiles.
required='cc bzip2'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >configure.ac <<END
AC_INIT([$me], [1.0])
cp "$am_scriptdir"/compile "$am_scriptdir"/test-driver .
$ACLOCAL
-$AUTOMAKE --foreign --foreign -Wall 2>stderr || { cat stderr >&2; Exit 1; }
-test -s stderr && { cat stderr >&2; Exit 1; }
+$AUTOMAKE --foreign --foreign -Wall 2>stderr || { cat stderr >&2; exit 1; }
+test -s stderr && { cat stderr >&2; exit 1; }
rm -f stderr
$AUTOCONF
# Test to make sure macro used in m4 file is included.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac <<EOF
AC_INIT
# Make sure Automake will install several copies of required files if needed.
# Reported by Marius Vollmer.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<EOF
AC_CONFIG_FILES([one/Makefile two/Makefile])
# to fix the Makefiles.)
required='libtoolize'
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << 'END'
AC_INIT([req2], [1.0])
# Test to make sure RULE_PATTERN catches strange targets.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
$(srcdir)/Makefile.am:
# Unsafe absolute directory names should be diagnosed.
-. ./defs || Exit 1
+. ./defs || exit 1
mkdir 'unsafe$'
cd 'unsafe$'
$ACLOCAL
$AUTOCONF
$AUTOMAKE
-./configure 2>stderr && { cat stderr >&2; Exit 1; }
+./configure 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
grep 'unsafe absolute working directory' stderr
cd ..
mkdir build
cd build
-../unsafe$/configure 2>stderr && { cat stderr >&2; Exit 1; }
+../unsafe$/configure 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
grep 'unsafe srcdir' stderr
# Test for bug reported by Jim Meyering.
# AC_PROG_INSTALL was required when only noinst_SCRIPTS was defined.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
noinst_SCRIPTS = foo
# Test to make sure C-but-not-CC error works.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
dnl AC_PROG_CC and AC_PROG_CXX missing on purpose
# Sanity check for the automake testsuite.
# Check creation/removal of temporary test working directory by './defs'.
-. ./defs || Exit 1
+. ./defs || exit 1
plan_ 43
command_ok_ "post-cleanup can deal with low-perms testdir" \
$AM_TEST_RUNNER_SHELL -c '
stderr_fileno_=2
- . ./defs || Exit 1
+ . ./defs || exit 1
set -e
mkdir dir dir/sub
cd dir
$AM_TEST_RUNNER_SHELL -c '
ocwd=$(pwd) || exit 1
stderr_fileno_=2
- . ./defs || Exit 1
+ . ./defs || exit 1
ln -s "$ocwd/dir" "$ocwd/file" .
' t/dummy.sh
ls -l # For debugging.
stderr_fileno_=2
. ./defs
: > foo
- Exit $st
+ exit $st
" t/dummy.sh
command_ok_ "testdir not removed if exiting with status $st" \
test -f t/dummy.dir/foo
# Sanity check on the function used by the automake testsuite to
# analyze output of "configure --help".
-. ./defs || Exit 1
+. ./defs || exit 1
# FIXME: this test is a good candidate for a conversion to TAP.
compare_extracted_help ()
{
- cat > exp || Exit 99
- extract_configure_help "$1" help > got || Exit 1
+ cat > exp || exit 99
+ extract_configure_help "$1" help > got || exit 1
cat exp
cat got
- diff exp got || Exit 1
+ diff exp got || exit 1
}
compare_extracted_help --disable-libcap <<'END'
# and the creation of such directory if we want.
am_create_testdir=no
-. ./defs || Exit 99
+. ./defs || exit 99
plan_ 5
|| framework_failure_ "cleaning up _self.dir"
command_ok_ "$1 [$2]" $AM_TEST_RUNNER_SHELL -c "
$2
- . ./defs || Exit 99
+ . ./defs || exit 99
# Don't fail if 'ls -l' fails; avoids possible racy spurious failures.
pwd; ls -l || : # For debugging.
$3
do_check 'testdir has the expected path' \
'unset am_create_testdir' \
- 'case $(pwd) in '"$cwd"'/t/_self.dir);; *) Exit 1;; esac'
+ 'case $(pwd) in '"$cwd"'/t/_self.dir);; *) exit 1;; esac'
do_check 'fully pre-populated testdir' \
'unset am_create_testdir' \
- 'test -f install-sh || Exit 1
- test -f configure.ac || Exit 1
- case $(pwd) in '"$cwd"'/t/_self.dir) : ;; *) Exit 1;; esac'
+ 'test -f install-sh || exit 1
+ test -f configure.ac || exit 1
+ case $(pwd) in '"$cwd"'/t/_self.dir) : ;; *) exit 1;; esac'
do_check 'testdir has the expected path' \
'am_create_testdir=empty' \
- 'case $(pwd) in '"$cwd"'/t/_self.dir) : ;; *) Exit 1;; esac'
+ 'case $(pwd) in '"$cwd"'/t/_self.dir) : ;; *) exit 1;; esac'
do_check 'do not pre-populate testdir' \
'am_create_testdir=empty' \
- 'ls -a | grep -v "^\\.\\{1,2\\}$" | grep . && Exit 1; :'
+ 'ls -a | grep -v "^\\.\\{1,2\\}$" | grep . && exit 1; :'
do_check 'do not create nor chdir in testdir' \
'am_create_testdir=no' \
- 'test ! -d t/_self.dir || Exit 1
- test ! -f t/_self.dir || Exit 1
- test ! -r t/_self.dir || Exit 1
- grep "self-check-dir\.tap" Makefile || Exit 1
- case $(pwd) in '"$cwd"') : ;; *) Exit 1;; esac'
+ 'test ! -d t/_self.dir || exit 1
+ test ! -f t/_self.dir || exit 1
+ test ! -r t/_self.dir || exit 1
+ grep "self-check-dir\.tap" Makefile || exit 1
+ case $(pwd) in '"$cwd"') : ;; *) exit 1;; esac'
:
# some testsuite-influential variables are set in the environment.
am_create_testdir=no
-. ./defs || Exit 1
+. ./defs || exit 1
set -x
exec 5>&1
# Also check that the 'errexit' shell flag is active.
am_create_testdir=no
-. ./defs || Exit 99
+. ./defs || exit 99
plan_ 34
# ./defs, i.e., when 'set -e' is not active yet, for the benefit of shells
# (like Bash 2.05 and Solaris 10 /bin/ksh) that returns a non-zero status
# when unsetting an already-unset variable.
-init='stderr_fileno_=2; unset am_explicit_skips; . ./defs'
+# Add an extra newline at the end so that the aliases defined by 'defs'
+# can take effect. Yes, this is truly required.
+init="stderr_fileno_=2; unset am_explicit_skips; . ./defs${nl}"
# Required so that the code in defs doesn't go crazy trying to creating a
# temporary directory in the absolute dir of $AM_TEST_RUNNER_SHELL.
dummy_test_script=t/$me.sh
for st in 1 2 3 4 5 77 99 126 127 128 129 130 255; do
- for exit_cmd in "Exit $st" "sh -c 'exit $st'"; do
- $AM_TEST_RUNNER_SHELL -c "$init; $exit_cmd; :" "$dummy_test_script"
+ for exit_cmd in "exit $st" "sh -c 'exit $st'"; do
+ $AM_TEST_RUNNER_SHELL -c "$init $exit_cmd; :" "$dummy_test_script"
command_ok_ "$exit_cmd" test $? -eq $st
done
done
# <http://lists.gnu.org/archive/html/bug-autoconf/2011-09/msg00004.html>
trap : 2
fi
- $AM_TEST_RUNNER_SHELL -c "$init; kill -$sig \$\$; :" "$dummy_test_script"
+ $AM_TEST_RUNNER_SHELL -c "$init kill -$sig \$\$; :" "$dummy_test_script"
rc=$?
if test $sig -eq 2; then
# Reset default SIGINT handler as portably as possible.
else
maybe_todo="" reason=""
fi
-$AM_TEST_RUNNER_SHELL -c "$init; non-existent-prog; :" "$dummy_test_script"
+$AM_TEST_RUNNER_SHELL -c "$init non-existent-prog; :" "$dummy_test_script"
command_ok_ "command not found" -D "$maybe_todo" -r "$reason" \
-- test $? -gt 0
: Non-executable command.
test -f Makefile && test ! -x Makefile || \
framowork_failure_ "no proper Makefile in the current directory"
-$AM_TEST_RUNNER_SHELL -c "$init; ./Makefile; :" "$dummy_test_script"
+$AM_TEST_RUNNER_SHELL -c "$init ./Makefile; :" "$dummy_test_script"
command_ok_ "permission denied" test $? -gt 0
: Syntax errors in the test code.
-$AM_TEST_RUNNER_SHELL -c "$init; if :; then" "$dummy_test_script"
+$AM_TEST_RUNNER_SHELL -c "$init if :; then" "$dummy_test_script"
command_ok_ "syntax error 1" test $? -gt 0
-$AM_TEST_RUNNER_SHELL -c "$init; true ( true )" "$dummy_test_script"
+$AM_TEST_RUNNER_SHELL -c "$init true ( true )" "$dummy_test_script"
command_ok_ "syntax error 2" test $? -gt 0
:
# an early exit due to some command exiting unexpectedly with status 77.
am_create_testdir=no
-. ./defs || Exit 1
+. ./defs || exit 1
set +e
# testsuite shell to ensure it supports "VAR=val shell_func" correctly.
run_dummy_test ()
{
- env $2 $AM_TEST_RUNNER_SHELL -c "am_create_testdir=no; . ./defs; $1" \
- dummy.sh
+ env $2 $AM_TEST_RUNNER_SHELL -c "
+ am_create_testdir=no
+ . ./defs
+ $1
+ " dummy.sh
}
run_dummy_test '(exit 77); exit 77'
-test $? -eq 77 || Exit 1
+test $? -eq 77 || exit 1
run_dummy_test 'sh -c "exit 77"' am_explicit_skips=no
-test $? -eq 77 || Exit 1
+test $? -eq 77 || exit 1
run_dummy_test '(exit 77); exit 77' am_explicit_skips=yes
-test $? -eq 78 || Exit 1
+test $? -eq 78 || exit 1
run_dummy_test 'sh -c "exit 77"' am_explicit_skips=y
-test $? -eq 78 || Exit 1
+test $? -eq 78 || exit 1
-run_dummy_test 'Exit 77' am_explicit_skips=yes
-test $? -eq 77 || Exit 1
+run_dummy_test 'exit 77' am_explicit_skips=yes
+test $? -eq 77 || exit 1
run_dummy_test 'skip_ "foo"' am_explicit_skips=y
-test $? -eq 77 || Exit 1
+test $? -eq 77 || exit 1
:
# shell function.
am_create_testdir=no
-. ./defs || Exit 99
+. ./defs || exit 99
plan_ 2
# Sanity check for the automake testsuite: the 'is_newest' subroutine.
-. ./defs || Exit 1
+. ./defs || exit 1
plan_ 21
# can be overridden by the test script.
am_create_testdir=no
-. ./defs || Exit 1
+. ./defs || exit 1
plan_ 14
# configure-time $AM_TEST_RUNNER_SHELL.
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
plan_ 32
unset stderr_fileno_ || :
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
set +e
exec 5>&1
-(warn_ foobar) 2>&1 1>&5 | grep '^foobar$' || Exit 1
-(fail_ foo); test $? -eq 1 || Exit 1
-(fail_ foo) 2>&1 1>&5 | grep "^$me: failed test: foo" || Exit 1
-(skip_ foo); test $? -eq 77 || Exit 1
-(skip_ foo) 2>&1 1>&5 | grep "^$me: skipped test: foo" || Exit 1
-(fatal_ foo); test $? -eq 99 || Exit 1
-(fatal_ foo) 2>&1 1>&5 | grep "^$me: hard error: foo" || Exit 1
-(framework_failure_ foo); test $? -eq 99 || Exit 1
+(warn_ foobar) 2>&1 1>&5 | grep '^foobar$' || exit 1
+(fail_ foo); test $? -eq 1 || exit 1
+(fail_ foo) 2>&1 1>&5 | grep "^$me: failed test: foo" || exit 1
+(skip_ foo); test $? -eq 77 || exit 1
+(skip_ foo) 2>&1 1>&5 | grep "^$me: skipped test: foo" || exit 1
+(fatal_ foo); test $? -eq 99 || exit 1
+(fatal_ foo) 2>&1 1>&5 | grep "^$me: hard error: foo" || exit 1
+(framework_failure_ foo); test $? -eq 99 || exit 1
(framework_failure_ foo) 2>&1 1>&5 \
- | grep "^$me: set-up failure: foo" || Exit 1
+ | grep "^$me: set-up failure: foo" || exit 1
stderr_fileno_=6
-(warn_ foobar) 6>&1 1>&5 | grep '^foobar$' || Exit 1
-(fail_ foo); test $? -eq 1 || Exit 1
-(fail_ foo) 6>&1 1>&5 | grep "^$me: failed test: foo" || Exit 1
-(skip_ foo); test $? -eq 77 || Exit 1
-(skip_ foo) 6>&1 1>&5 | grep "^$me: skipped test: foo" || Exit 1
-(fatal_ foo); test $? -eq 99 || Exit 1
-(fatal_ foo) 6>&1 1>&5 | grep "^$me: hard error: foo" || Exit 1
-(framework_failure_ foo); test $? -eq 99 || Exit 1
+(warn_ foobar) 6>&1 1>&5 | grep '^foobar$' || exit 1
+(fail_ foo); test $? -eq 1 || exit 1
+(fail_ foo) 6>&1 1>&5 | grep "^$me: failed test: foo" || exit 1
+(skip_ foo); test $? -eq 77 || exit 1
+(skip_ foo) 6>&1 1>&5 | grep "^$me: skipped test: foo" || exit 1
+(fatal_ foo); test $? -eq 99 || exit 1
+(fatal_ foo) 6>&1 1>&5 | grep "^$me: hard error: foo" || exit 1
+(framework_failure_ foo); test $? -eq 99 || exit 1
(framework_failure_ foo) 6>&1 1>&5 \
- | grep "^$me: set-up failure: foo" || Exit 1
+ | grep "^$me: set-up failure: foo" || exit 1
:
# Sanity check for the automake testsuite.
# Check the 'seq_' subroutine.
-. ./defs || Exit 1
+. ./defs || exit 1
plan_ 14
# Sanity check for the automake testsuite.
# Check the 'unindent' subroutine.
-. ./defs || Exit 1
+. ./defs || exit 1
plan_ 22
# Option 'serial-tests'.
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
hasnt_parallel_tests ()
{
- $EGREP 'TEST_SUITE_LOG|TEST_LOGS|\.log.*:' $1 && Exit 1
- grep 'recheck.*:' $1 && Exit 1
+ $EGREP 'TEST_SUITE_LOG|TEST_LOGS|\.log.*:' $1 && exit 1
+ grep 'recheck.*:' $1 && exit 1
grep '^check-TESTS: \$(TESTS)$' $1
}
# Check that automake complaints if the 'silent-rules' option is
# used in AUTOMAKE_OPTIONS.
-. ./defs || Exit 1
+. ./defs || exit 1
echo AUTOMAKE_OPTIONS = silent-rules > Makefile.am
# from config.site, and that this default can be overridden from
# either the ./configure or make command line.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'EOF'
AM_SILENT_RULES
# Check silent-rules mode for Lex.
required='cc lex'
-. ./defs || Exit 1
+. ./defs || exit 1
mkdir sub
$AUTOCONF
# Ensure per-target rules are used, to ensure their coverage below.
-$FGREP 'foo2-foo.c' Makefile.in || Exit 99
-$FGREP 'bar2-bar.c' sub/Makefile.in || Exit 99
+$FGREP 'foo2-foo.c' Makefile.in || exit 99
+$FGREP 'bar2-bar.c' sub/Makefile.in || exit 99
./configure --enable-silent-rules
-$MAKE >stdout || { cat stdout; Exit 1; }
+$MAKE >stdout || { cat stdout; exit 1; }
cat stdout
-$EGREP ' (-c|-o)' stdout && Exit 1
-$EGREP '(mv|ylwrap) ' stdout && Exit 1
+$EGREP ' (-c|-o)' stdout && exit 1
+$EGREP '(mv|ylwrap) ' stdout && exit 1
grep 'LEX .*foo\.' stdout
grep 'LEX .*bar\.' stdout
# different set of rules.
$MAKE clean
-$MAKE >stdout || { cat stdout; Exit 1; }
+$MAKE >stdout || { cat stdout; exit 1; }
cat stdout
-$EGREP ' (-c|-o)' stdout && Exit 1
-$EGREP '(mv|ylwrap) ' stdout && Exit 1
+$EGREP ' (-c|-o)' stdout && exit 1
+$EGREP '(mv|ylwrap) ' stdout && exit 1
# Don't look for LEX, as probably lex hasn't been re-run.
grep ' CC .*foo\.' stdout
$MAKE clean
rm -f *foo.c sub/*bar.c
-$MAKE V=1 >stdout || { cat stdout; Exit 1; }
+$MAKE V=1 >stdout || { cat stdout; exit 1; }
cat stdout
grep ' -c ' stdout
grep ' -o ' stdout
grep 'ylwrap ' stdout
-$EGREP '(LEX|CC|CCLD) ' stdout && Exit 1
+$EGREP '(LEX|CC|CCLD) ' stdout && exit 1
# Cleaning and then rebuilding with the same V flag (and without
# removing the generated sources in between) shouldn't trigger a
# different set of rules.
$MAKE clean
-$MAKE V=1 >stdout || { cat stdout; Exit 1; }
+$MAKE V=1 >stdout || { cat stdout; exit 1; }
cat stdout
# Don't look for ylwrap, as probably lex hasn't been re-run.
grep ' -c ' stdout
grep ' -o ' stdout
-$EGREP '(LEX|CC|CCLD) ' stdout && Exit 1
+$EGREP '(LEX|CC|CCLD) ' stdout && exit 1
:
# 'silent-many-generic.test', which should work with generic compilers.
required='gcc g++ gfortran lex yacc'
-. ./defs || Exit 1
+. ./defs || exit 1
# Avoids too much code duplication.
do_and_check_silent_build ()
*) rebuild=false;;
esac
- $MAKE >stdout || { cat stdout; Exit 1; }
+ $MAKE >stdout || { cat stdout; exit 1; }
cat stdout
# Avoid spurious failures with SunStudio Fortran compilers.
sed '/^NOTICE:/d' stdout > t
mv -f t stdout
cat stdout
- $EGREP ' (-c|-o)' stdout && Exit 1
- $EGREP '(mv|ylwrap) ' stdout && Exit 1
+ $EGREP ' (-c|-o)' stdout && exit 1
+ $EGREP '(mv|ylwrap) ' stdout && exit 1
grep 'CXX .*foo1\.' stdout
grep 'CXX .*baz1\.' stdout
*) rebuild=false;;
esac
- $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+ $MAKE V=1 >stdout || { cat stdout; exit 1; }
cat stdout
grep ' -c ' stdout
grep ' -o ' stdout
- $EGREP '(CC|CXX|FC|F77|LD) ' stdout && Exit 1
+ $EGREP '(CC|CXX|FC|F77|LD) ' stdout && exit 1
if ! $rebuild; then
grep 'ylwrap ' stdout
- $EGREP '(LEX|YACC) ' stdout && Exit 1
+ $EGREP '(LEX|YACC) ' stdout && exit 1
fi
unset rebuild
# and forces the use of gcc depmode.
required='cc c++ fortran fortran77 lex yacc'
-. ./defs || Exit 1
+. ./defs || exit 1
# Avoids too much code duplication.
do_and_check_silent_build ()
*) rebuild=false;;
esac
- $MAKE >stdout || { cat stdout; Exit 1; }
+ $MAKE >stdout || { cat stdout; exit 1; }
cat stdout
# Avoid spurious failures with SunStudio Fortran compilers.
sed '/^NOTICE:/d' stdout > t
mv -f t stdout
cat stdout
- $EGREP ' (-c|-o)' stdout && Exit 1
- $EGREP '(mv|ylwrap) ' stdout && Exit 1
+ $EGREP ' (-c|-o)' stdout && exit 1
+ $EGREP '(mv|ylwrap) ' stdout && exit 1
grep 'CXX .*foo1\.' stdout
grep 'CXX .*baz1\.' stdout
*) rebuild=false;;
esac
- $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+ $MAKE V=1 >stdout || { cat stdout; exit 1; }
cat stdout
grep ' -c ' stdout
grep ' -o ' stdout
- $EGREP '(CC|CXX|FC|F77|LD) ' stdout && Exit 1
+ $EGREP '(CC|CXX|FC|F77|LD) ' stdout && exit 1
if ! $rebuild; then
grep 'ylwrap ' stdout
- $EGREP '(LEX|YACC) ' stdout && Exit 1
+ $EGREP '(LEX|YACC) ' stdout && exit 1
fi
unset rebuild
# Check silent-rules mode, on 'make' implementations that do not
# support nested variables (Bug#9928, Bug#10237).
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'EOF'
AM_SILENT_RULES
all:
touch bar
END
-$MAKE && Exit 99
+$MAKE && exit 99
mv -f Makefile foo.mk
-$MAKE -f foo.mk && Exit 99
-cat foo.mk | $MAKE -f - && Exit 99
-test -f bar && Exit 99
+$MAKE -f foo.mk && exit 99
+cat foo.mk | $MAKE -f - && exit 99
+test -f bar && exit 99
sed '/a =/d' foo.mk > Makefile
-$MAKE && test -f bar || Exit 99
+$MAKE && test -f bar || exit 99
rm -f bar Makefile foo.mk
$ACLOCAL
$AUTOMAKE --add-missing
$AUTOCONF
-./configure --enable-silent-rules >stdout || { cat stdout; Exit 1; }
+./configure --enable-silent-rules >stdout || { cat stdout; exit 1; }
cat stdout
grep '^checking whether \./mymake supports nested variables\.\.\. no *$' \
stdout
$EGREP 'CC|AM_V|GEN' Makefile # For debugging.
grep '^AM_V_CC = *\$(am__v_CC_0) *$' Makefile
grep '^AM_V_GEN = *\$(am__v_GEN_0) *$' Makefile
-$MAKE >stdout || { cat stdout; Exit 1; }
+$MAKE >stdout || { cat stdout; exit 1; }
cat stdout
-$EGREP ' (-c|-o)' stdout && Exit 1
-grep 'mv ' stdout && Exit 1
-grep 'echo .*oop' stdout && Exit 1
+$EGREP ' (-c|-o)' stdout && exit 1
+grep 'mv ' stdout && exit 1
+grep 'echo .*oop' stdout && exit 1
grep 'CC .*foo\.' stdout
grep 'CC .*bar\.' stdout
grep 'CCLD .*foo' stdout
grep 'PKG-GEN .*oop' stdout
$MAKE distclean
-./configure --disable-silent-rules > stdout || { cat stdout; Exit 1; }
+./configure --disable-silent-rules > stdout || { cat stdout; exit 1; }
cat stdout
grep '^checking whether \./mymake supports nested variables\.\.\. no *$' \
stdout
grep '^AM_V_CC = *\$(am__v_CC_1) *$' Makefile
grep '^AM_V_GEN = *\$(am__v_GEN_1) *$' Makefile
-$MAKE >stdout || { cat stdout; Exit 1; }
+$MAKE >stdout || { cat stdout; exit 1; }
cat stdout
grep ' -c' stdout
grep ' -o foo' stdout
grep ' -o bar' stdout
grep 'echo .*>oop' stdout
-$EGREP '(CC|LD) ' stdout && Exit 1
+$EGREP '(CC|LD) ' stdout && exit 1
:
# make variable expansions. This should happen regardless of whether and
# where these warnings are requested.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# Some checks about silent-rules mode and warnings.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'EOF'
AM_SILENT_RULES
# involved (i.e., the '-d' option is in *YFLAGS).
required='cc yacc'
-. ./defs || Exit 1
+. ./defs || exit 1
mkdir sub
./configure --enable-silent-rules
-$MAKE >stdout || { cat stdout; Exit 1; }
+$MAKE >stdout || { cat stdout; exit 1; }
cat stdout
-$EGREP ' (-c|-d|-o)' stdout && Exit 1
-$EGREP '(mv|ylwrap) ' stdout && Exit 1
+$EGREP ' (-c|-d|-o)' stdout && exit 1
+$EGREP '(mv|ylwrap) ' stdout && exit 1
grep 'YACC *parse\.c' stdout
grep 'updating *parse\.h' stdout
# Check recovering from header removal.
rm -f parse.h bar-parse.h
-$MAKE parse.h bar-parse.h >stdout || { cat stdout; Exit 1; }
+$MAKE parse.h bar-parse.h >stdout || { cat stdout; exit 1; }
cat stdout
-$EGREP ' (-c|-d|-o)' stdout && Exit 1
-$EGREP '(mv|ylwrap) ' stdout && Exit 1
+$EGREP ' (-c|-d|-o)' stdout && exit 1
+$EGREP '(mv|ylwrap) ' stdout && exit 1
grep 'YACC *parse\.c' stdout
grep 'updating *parse\.h' stdout
# different set of rules.
$MAKE clean
-$MAKE >stdout || { cat stdout; Exit 1; }
+$MAKE >stdout || { cat stdout; exit 1; }
cat stdout
-$EGREP ' (-c|-d|-o)' stdout && Exit 1
-$EGREP '(mv|ylwrap) ' stdout && Exit 1
+$EGREP ' (-c|-d|-o)' stdout && exit 1
+$EGREP '(mv|ylwrap) ' stdout && exit 1
# Don't look for "YACC *.c" and "updating *.h", as yacc shouldn't
# have been re-run.
# Check recovering from header removal.
rm -f parse.h bar-parse.h
-$MAKE parse.h bar-parse.h >stdout || { cat stdout; Exit 1; }
+$MAKE parse.h bar-parse.h >stdout || { cat stdout; exit 1; }
cat stdout
-$EGREP ' (-c|-d|-o)' stdout && Exit 1
-$EGREP '(mv|ylwrap) ' stdout && Exit 1
+$EGREP ' (-c|-d|-o)' stdout && exit 1
+$EGREP '(mv|ylwrap) ' stdout && exit 1
grep 'YACC *parse\.c' stdout
grep 'updating *parse\.h' stdout
./configure --enable-silent-rules
-$MAKE V=1 >stdout || { cat stdout; Exit 1; }
+$MAKE V=1 >stdout || { cat stdout; exit 1; }
cat stdout
grep ' -c ' stdout
grep ' -d ' stdout
grep 'ylwrap ' stdout
-$EGREP '(YACC|CC|CCLD) ' stdout && Exit 1
+$EGREP '(YACC|CC|CCLD) ' stdout && exit 1
# Check recovering from header removal.
rm -f parse.h bar-parse.h
-$MAKE V=1 parse.h bar-parse.h >stdout || { cat stdout; Exit 1; }
+$MAKE V=1 parse.h bar-parse.h >stdout || { cat stdout; exit 1; }
cat stdout
grep ' -d ' stdout
grep 'ylwrap ' stdout
-grep 'YACC' stdout && Exit 1
+grep 'YACC' stdout && exit 1
# Cleaning and then rebuilding with the same V flag (and without
# removing the generated sources in between) shouldn't trigger a
# different set of rules.
$MAKE clean
-$MAKE V=1 >stdout || { cat stdout; Exit 1; }
+$MAKE V=1 >stdout || { cat stdout; exit 1; }
cat stdout
# Don't look for ylwrap, as probably lex hasn't been re-run.
grep ' -c ' stdout
grep ' -o ' stdout
-$EGREP '(YACC|CC|CCLD) ' stdout && Exit 1
+$EGREP '(YACC|CC|CCLD) ' stdout && exit 1
# Check recovering from header removal.
rm -f parse.h bar-parse.h
-$MAKE V=1 parse.h bar-parse.h >stdout || { cat stdout; Exit 1; }
+$MAKE V=1 parse.h bar-parse.h >stdout || { cat stdout; exit 1; }
cat stdout
grep ' -d ' stdout
grep 'ylwrap ' stdout
-grep 'YACC' stdout && Exit 1
+grep 'YACC' stdout && exit 1
:
# Keep this in sync with sister test 'silent-yacc-gcc.test'.
required='cc yacc'
-. ./defs || Exit 1
+. ./defs || exit 1
mkdir sub
$AUTOCONF
# Ensure per-target rules are used, to ensure their coverage below.
-$FGREP 'foo2-foo.c' Makefile.in || Exit 99
-$FGREP 'bar2-bar.c' sub/Makefile.in || Exit 99
+$FGREP 'foo2-foo.c' Makefile.in || exit 99
+$FGREP 'bar2-bar.c' sub/Makefile.in || exit 99
./configure --enable-silent-rules
-$MAKE >stdout || { cat stdout; Exit 1; }
+$MAKE >stdout || { cat stdout; exit 1; }
cat stdout
-$EGREP ' (-c|-o)' stdout && Exit 1
-$EGREP '(mv|ylwrap) ' stdout && Exit 1
+$EGREP ' (-c|-o)' stdout && exit 1
+$EGREP '(mv|ylwrap) ' stdout && exit 1
grep 'YACC .*foo\.' stdout
grep 'YACC .*bar\.' stdout
# different set of rules.
$MAKE clean
-$MAKE >stdout || { cat stdout; Exit 1; }
+$MAKE >stdout || { cat stdout; exit 1; }
cat stdout
-$EGREP ' (-c|-o)' stdout && Exit 1
-$EGREP '(mv|ylwrap) ' stdout && Exit 1
+$EGREP ' (-c|-o)' stdout && exit 1
+$EGREP '(mv|ylwrap) ' stdout && exit 1
# Don't look for YACC, as probably yacc hasn't been re-run.
grep ' CC .*foo\.' stdout
$MAKE clean
rm -f *foo.[ch] sub/*bar.[ch]
-$MAKE V=1 >stdout || { cat stdout; Exit 1; }
+$MAKE V=1 >stdout || { cat stdout; exit 1; }
cat stdout
grep ' -c ' stdout
grep ' -o ' stdout
grep 'ylwrap ' stdout
-$EGREP '(YACC|CC|CCLD) ' stdout && Exit 1
+$EGREP '(YACC|CC|CCLD) ' stdout && exit 1
# Cleaning and then rebuilding with the same V flag (and without
# removing the generated sources in between) shouldn't trigger a
# different set of rules.
$MAKE clean
-$MAKE V=1 >stdout || { cat stdout; Exit 1; }
+$MAKE V=1 >stdout || { cat stdout; exit 1; }
cat stdout
# Don't look for ylwrap, as probably lex hasn't been re-run.
grep ' -c ' stdout
grep ' -o ' stdout
-$EGREP '(YACC|CC|CCLD) ' stdout && Exit 1
+$EGREP '(YACC|CC|CCLD) ' stdout && exit 1
:
# Please keep this file in sync with silent2.test.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
mkdir sub
$AUTOCONF
./configure --enable-silent-rules
-$MAKE >stdout || { cat stdout; Exit 1; }
+$MAKE >stdout || { cat stdout; exit 1; }
cat stdout
-$EGREP ' (-c|-o)' stdout && Exit 1
-grep 'mv ' stdout && Exit 1
+$EGREP ' (-c|-o)' stdout && exit 1
+grep 'mv ' stdout && exit 1
grep 'CC .*foo\.' stdout
grep 'CC .*bar\.' stdout
grep 'CC .*baz\.' stdout
grep 'CCLD .*bla' stdout
$MAKE clean
-$MAKE V=1 >stdout || { cat stdout; Exit 1; }
+$MAKE V=1 >stdout || { cat stdout; exit 1; }
cat stdout
grep ' -c' stdout
grep ' -o foo' stdout
-$EGREP '(CC|LD) ' stdout && Exit 1
+$EGREP '(CC|LD) ' stdout && exit 1
:
# Please keep this file in sync with silent.test.
required=gcc
-. ./defs || Exit 1
+. ./defs || exit 1
mkdir sub
$AUTOCONF
./configure am_cv_CC_dependencies_compiler_type=gcc --enable-silent-rules
-$MAKE >stdout || { cat stdout; Exit 1; }
+$MAKE >stdout || { cat stdout; exit 1; }
cat stdout
-$EGREP ' (-c|-o)' stdout && Exit 1
-grep 'mv ' stdout && Exit 1
+$EGREP ' (-c|-o)' stdout && exit 1
+grep 'mv ' stdout && exit 1
grep 'CC .*foo\.' stdout
grep 'CC .*bar\.' stdout
grep 'CC .*baz\.' stdout
grep 'CCLD .*bla' stdout
$MAKE clean
-$MAKE V=1 >stdout || { cat stdout; Exit 1; }
+$MAKE V=1 >stdout || { cat stdout; exit 1; }
cat stdout
grep ' -c' stdout
grep ' -o foo' stdout
-$EGREP '(CC|LD) ' stdout && Exit 1
+$EGREP '(CC|LD) ' stdout && exit 1
:
# Please keep this file in sync with silent4.test and silent9.test.
required='cc libtoolize'
-. ./defs || Exit 1
+. ./defs || exit 1
mkdir sub
$AUTOCONF
./configure --enable-silent-rules
-$MAKE >stdout || { cat stdout; Exit 1; }
+$MAKE >stdout || { cat stdout; exit 1; }
cat stdout
-$EGREP ' (-c|-o)' stdout && Exit 1
-grep 'mv ' stdout && Exit 1
+$EGREP ' (-c|-o)' stdout && exit 1
+grep 'mv ' stdout && exit 1
grep ' CC .*foo\.' stdout
grep ' CC .*bar\.' stdout
grep ' CC .*baz\.' stdout
grep ' CCLD .*bla' stdout
$MAKE clean
-$MAKE V=1 >stdout || { cat stdout; Exit 1; }
+$MAKE V=1 >stdout || { cat stdout; exit 1; }
cat stdout
grep ' -c' stdout
grep ' -o libfoo' stdout
# The libtool command line can contain e.g. a '--tag=CC' option.
-sed 's/--tag=[^ ]*/--tag=x/g' stdout | $EGREP '(CC|LD) ' && Exit 1
+sed 's/--tag=[^ ]*/--tag=x/g' stdout | $EGREP '(CC|LD) ' && exit 1
:
# Please keep this file in sync with silent3.test and silent9.test.
required="libtoolize gcc"
-. ./defs || Exit 1
+. ./defs || exit 1
mkdir sub
$AUTOCONF
./configure am_cv_CC_dependencies_compiler_type=gcc --enable-silent-rules
-$MAKE >stdout || { cat stdout; Exit 1; }
+$MAKE >stdout || { cat stdout; exit 1; }
cat stdout
-$EGREP ' (-c|-o)' stdout && Exit 1
-grep 'mv ' stdout && Exit 1
+$EGREP ' (-c|-o)' stdout && exit 1
+grep 'mv ' stdout && exit 1
grep ' CC .*foo\.' stdout
grep ' CC .*bar\.' stdout
grep ' CC .*baz\.' stdout
grep ' CCLD .*bla' stdout
$MAKE clean
-$MAKE V=1 >stdout || { cat stdout; Exit 1; }
+$MAKE V=1 >stdout || { cat stdout; exit 1; }
cat stdout
grep ' -c' stdout
grep ' -o libfoo' stdout
# The libtool command line can contain e.g. a '--tag=CC' option.
-sed 's/--tag=[^ ]*/--tag=x/g' stdout | $EGREP '(CC|LD) ' && Exit 1
+sed 's/--tag=[^ ]*/--tag=x/g' stdout | $EGREP '(CC|LD) ' && exit 1
:
# Check user extensibility of silent-rules mode.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'EOF'
AM_SILENT_RULES
esac
shift
$MAKE clean
- $MAKE ${1+"$@"} >output 2>&1 || { cat output; Exit 1; }
+ $MAKE ${1+"$@"} >output 2>&1 || { cat output; exit 1; }
sed 's/^/ /' output
if $silent; then
- $FGREP 'cp ' output && Exit 1
- $FGREP 'generate-header' output && Exit 1
- $FGREP 'rm -f' output && Exit 1
- grep '[012]\.h' output && Exit 1
+ $FGREP 'cp ' output && exit 1
+ $FGREP 'generate-header' output && exit 1
+ $FGREP 'rm -f' output && exit 1
+ grep '[012]\.h' output && exit 1
grep '^ XGEN foo$' output
grep '^ GEN \[headers\]$' output
else
- $FGREP 'GEN ' output && Exit 1
+ $FGREP 'GEN ' output && exit 1
$FGREP 'cp ./foo.in foo' output
$FGREP "rm -f sub/0.h sub/1.h sub/2.h" output
$FGREP "generate-header --flags sub/0.h sub/1.h sub/2.h" output
# Check user extensibility of silent-rules mode.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'EOF'
AM_SILENT_RULES
$AUTOCONF
./configure --disable-silent-rules
-$MAKE >stdout || { cat stdout; Exit 1; }
+$MAKE >stdout || { cat stdout; exit 1; }
cat stdout
-grep 'GEN ' stdout && Exit 1
+grep 'GEN ' stdout && exit 1
grep 'cp ' stdout
grep 'echo ' stdout
$MAKE clean
-$MAKE V=1 >stdout || { cat stdout; Exit 1; }
+$MAKE V=1 >stdout || { cat stdout; exit 1; }
cat stdout
-grep 'GEN ' stdout && Exit 1
+grep 'GEN ' stdout && exit 1
grep 'cp ' stdout
grep 'echo ' stdout
$MAKE clean
-$MAKE V=0 >stdout || { cat stdout; Exit 1; }
+$MAKE V=0 >stdout || { cat stdout; exit 1; }
cat stdout
grep 'GEN .*foo' stdout
-grep 'cp ' stdout && Exit 1
-grep 'echo ' stdout && Exit 1
+grep 'cp ' stdout && exit 1
+grep 'echo ' stdout && exit 1
$MAKE distclean
./configure --enable-silent-rules
-$MAKE >stdout || { cat stdout; Exit 1; }
+$MAKE >stdout || { cat stdout; exit 1; }
cat stdout
grep 'GEN .*foo' stdout
-grep 'cp ' stdout && Exit 1
-grep 'echo ' stdout && Exit 1
+grep 'cp ' stdout && exit 1
+grep 'echo ' stdout && exit 1
$MAKE clean
-$MAKE V=0 >stdout || { cat stdout; Exit 1; }
+$MAKE V=0 >stdout || { cat stdout; exit 1; }
cat stdout
grep 'GEN .*foo' stdout
-grep 'cp ' stdout && Exit 1
-grep 'echo ' stdout && Exit 1
+grep 'cp ' stdout && exit 1
+grep 'echo ' stdout && exit 1
$MAKE clean
-$MAKE V=1 >stdout || { cat stdout; Exit 1; }
+$MAKE V=1 >stdout || { cat stdout; exit 1; }
cat stdout
-grep 'GEN ' stdout && Exit 1
+grep 'GEN ' stdout && exit 1
grep 'cp ' stdout
grep 'echo ' stdout
# Check texinfo rules in silent-rules mode.
required='makeinfo-html tex texi2dvi-o dvips'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'EOF'
AM_SILENT_RULES
./configure --disable-silent-rules
# Make sure that all labels work in silent-mode.
-$MAKE V=0 dvi html info ps pdf >stdout || { cat stdout; Exit 1; }
+$MAKE V=0 dvi html info ps pdf >stdout || { cat stdout; exit 1; }
cat stdout
-grep 'DVIPS foo.ps' stdout || Exit 1
-grep 'MAKEINFO foo.html' stdout || Exit 1
+grep 'DVIPS foo.ps' stdout || exit 1
+grep 'MAKEINFO foo.html' stdout || exit 1
# NetBSD make will print './foo.info' instead of 'foo.info'.
-grep 'MAKEINFO.*foo.info' stdout || Exit 1
-grep 'TEXI2DVI foo.dvi' stdout || Exit 1
-grep 'TEXI2PDF foo.pdf' stdout || Exit 1
+grep 'MAKEINFO.*foo.info' stdout || exit 1
+grep 'TEXI2DVI foo.dvi' stdout || exit 1
+grep 'TEXI2PDF foo.pdf' stdout || exit 1
# Now make sure the labels don't appear in verbose mode.
-$MAKE clean || Exit 1
-$MAKE V=1 dvi html info ps pdf >stdout || { cat stdout; Exit 1; }
+$MAKE clean || exit 1
+$MAKE V=1 dvi html info ps pdf >stdout || { cat stdout; exit 1; }
cat stdout
-grep 'DVIPS foo.ps' stdout && Exit 1
-grep 'MAKEINFO foo.html' stdout && Exit 1
-grep 'MAKEINFO.*foo.info' stdout && Exit 1
-grep 'TEXI2DVI foo.dvi' stdout && Exit 1
-grep 'TEXI2PDF foo.pdf' stdout && Exit 1
+grep 'DVIPS foo.ps' stdout && exit 1
+grep 'MAKEINFO foo.html' stdout && exit 1
+grep 'MAKEINFO.*foo.info' stdout && exit 1
+grep 'TEXI2DVI foo.dvi' stdout && exit 1
+grep 'TEXI2PDF foo.pdf' stdout && exit 1
:
# Please keep this file in sync with silent3.test and silent4.test.
required='cc libtoolize'
-. ./defs || Exit 1
+. ./defs || exit 1
mkdir sub
$AUTOCONF
./configure --disable-dependency-tracking --enable-silent-rules
-$MAKE >stdout || { cat stdout; Exit 1; }
+$MAKE >stdout || { cat stdout; exit 1; }
cat stdout
-$EGREP ' (-c|-o)' stdout && Exit 1
-grep 'mv ' stdout && Exit 1
+$EGREP ' (-c|-o)' stdout && exit 1
+grep 'mv ' stdout && exit 1
grep ' CC .*foo\.' stdout
grep ' CC .*bar\.' stdout
grep ' CC .*baz\.' stdout
grep ' CCLD .*bla' stdout
$MAKE clean
-$MAKE V=1 >stdout || { cat stdout; Exit 1; }
+$MAKE V=1 >stdout || { cat stdout; exit 1; }
cat stdout
grep ' -c' stdout
grep ' -o libfoo' stdout
# The libtool command line can contain e.g. a '--tag=CC' option.
-sed 's/--tag=[^ ]*/--tag=x/g' stdout | $EGREP '(CC|LD) ' && Exit 1
+sed 's/--tag=[^ ]*/--tag=x/g' stdout | $EGREP '(CC|LD) ' && exit 1
:
# test 'silentcxx.test', which should work with generic compilers.
required=g++
-. ./defs || Exit 1
+. ./defs || exit 1
mkdir sub
am_cv_CXX_dependencies_compiler_type=gcc
do
./configure $config_args --enable-silent-rules
- $MAKE >stdout || { cat stdout; Exit 1; }
+ $MAKE >stdout || { cat stdout; exit 1; }
cat stdout
- $EGREP ' (-c|-o)' stdout && Exit 1
- grep 'mv ' stdout && Exit 1
+ $EGREP ' (-c|-o)' stdout && exit 1
+ grep 'mv ' stdout && exit 1
grep 'CXX .*foo\.' stdout
grep 'CXX .*baz\.' stdout
# Ensure a clean rebuild.
$MAKE clean
- $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+ $MAKE V=1 >stdout || { cat stdout; exit 1; }
cat stdout
grep ' -c ' stdout
grep ' -o ' stdout
- $EGREP '(CC|CXX|LD) ' stdout && Exit 1
+ $EGREP '(CC|CXX|LD) ' stdout && exit 1
# Ensure a clean reconfiguration/rebuild.
$MAKE clean
# and forces the use of gcc depmode.
required=c++
-. ./defs || Exit 1
+. ./defs || exit 1
mkdir sub
--enable-dependency-tracking --disable-dependency-tracking
do
./configure $config_args --enable-silent-rules
- $MAKE >stdout || { cat stdout; Exit 1; }
+ $MAKE >stdout || { cat stdout; exit 1; }
cat stdout
- $EGREP ' (-c|-o)' stdout && Exit 1
- grep 'mv ' stdout && Exit 1
+ $EGREP ' (-c|-o)' stdout && exit 1
+ grep 'mv ' stdout && exit 1
grep 'CXX .*foo\.' stdout
grep 'CXX .*baz\.' stdout
# Ensure a clean rebuild.
$MAKE clean
- $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+ $MAKE V=1 >stdout || { cat stdout; exit 1; }
cat stdout
grep ' -c ' stdout
grep ' -o ' stdout
- $EGREP '(CXX|LD) ' stdout && Exit 1
+ $EGREP '(CXX|LD) ' stdout && exit 1
# Ensure a clean reconfiguration/rebuild.
$MAKE clean
# Keep this ins sync with the sister test silentf90.test.
required=fortran77
-. ./defs || Exit 1
+. ./defs || exit 1
mkdir sub
$AUTOCONF
./configure --enable-silent-rules
-$MAKE >stdout || { cat stdout; Exit 1; }
+$MAKE >stdout || { cat stdout; exit 1; }
cat stdout
# Avoid spurious failures with SunStudio Fortran compilers.
sed '/^NOTICE:/d' stdout > t
mv -f t stdout
cat stdout
-$EGREP ' (-c|-o)' stdout && Exit 1
-grep 'mv ' stdout && Exit 1
+$EGREP ' (-c|-o)' stdout && exit 1
+grep 'mv ' stdout && exit 1
grep 'F77 .*foo\.' stdout
grep 'F77 .*bar\.' stdout
grep 'F77LD .*foo2' stdout
grep 'F77LD .*bar2' stdout
-$EGREP '(FC|FCLD) ' stdout && Exit 1
+$EGREP '(FC|FCLD) ' stdout && exit 1
# Ensure a clean rebuild.
$MAKE clean
-$MAKE V=1 >stdout || { cat stdout; Exit 1; }
+$MAKE V=1 >stdout || { cat stdout; exit 1; }
cat stdout
grep ' -c ' stdout
grep ' -o ' stdout
-$EGREP '(F77|FC|LD) ' stdout && Exit 1
+$EGREP '(F77|FC|LD) ' stdout && exit 1
:
# Keep this ins sync with the sister test silentf77.test.
required=fortran
-. ./defs || Exit 1
+. ./defs || exit 1
mkdir sub
$AUTOCONF
./configure --enable-silent-rules
-$MAKE >stdout || { cat stdout; Exit 1; }
+$MAKE >stdout || { cat stdout; exit 1; }
cat stdout
# Avoid spurious failures with SunStudio Fortran compilers.
sed '/^NOTICE:/d' stdout > t
mv -f t stdout
cat stdout
-$EGREP ' (-c|-o)' stdout && Exit 1
-grep 'mv ' stdout && Exit 1
+$EGREP ' (-c|-o)' stdout && exit 1
+grep 'mv ' stdout && exit 1
grep 'FC .*foo\.' stdout
grep 'FC .*bar\.' stdout
grep 'FCLD .*foo2' stdout
grep 'FCLD .*bar2' stdout
-$EGREP '(F77|F77LD) ' stdout && Exit 1
+$EGREP '(F77|F77LD) ' stdout && exit 1
# Ensure a clean rebuild.
$MAKE clean
-$MAKE V=1 >stdout || { cat stdout; Exit 1; }
+$MAKE V=1 >stdout || { cat stdout; exit 1; }
cat stdout
grep ' -c ' stdout
grep ' -o ' stdout
-$EGREP '(F77|FC|LD) ' stdout && Exit 1
+$EGREP '(F77|FC|LD) ' stdout && exit 1
:
# Test to make sure subdir source file generates explicit dependency.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
bin_PROGRAMS = zardoz widdershins
# Test leading space on macro assignment.
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_PROG_CC >> configure.ac
# even if AM_CFLAGS is undefined. Similarly for other *FLAGS variables
# (CXXFLAGS, YFLAGS, LDFLAGS, ...)
-. ./defs || Exit 1
+. ./defs || exit 1
# Disable shell globbing if possible.
(set +f) >/dev/null 2>&1 && set +f
# Test of flags specific to executable.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
$AUTOMAKE
# Look for $(COMPILE) -c in .c.o rule.
-grep 'COMPILE. [^-]' Makefile.in && Exit 1
+grep 'COMPILE. [^-]' Makefile.in && exit 1
# Look for foo-foo.o.
-grep '[^-]foo\.o' Makefile.in && Exit 1
+grep '[^-]foo\.o' Makefile.in && exit 1
# Regression test for missing space.
-$FGREP ')-c' Makefile.in && Exit 1
+$FGREP ')-c' Makefile.in && exit 1
-Exit 0
+exit 0
# AM_DEFAULT_SOURCE_EXT
required='cc c++'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Test library-specific flags.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
$AUTOMAKE
# Look for $(COMPILE) -c in .c.o rule.
-grep 'COMPILE. [^-]' Makefile.in && Exit 1
+grep 'COMPILE. [^-]' Makefile.in && exit 1
# Look for libfoo_a-foo.o.
grep foo Makefile.in
-grep '[^-]foo\.o' Makefile.in && Exit 1
+grep '[^-]foo\.o' Makefile.in && exit 1
# Look for libfoo_a-bar.o.
grep bar Makefile.in
-grep '[^-]bar\.o' Makefile.in && Exit 1
+grep '[^-]bar\.o' Makefile.in && exit 1
-Exit 0
+exit 0
# Test exe-specific flags with dependency tracking.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
$AUTOMAKE
$FGREP ' -o foo-foo' Makefile.in
-$FGREP 'foo.o.o' Makefile.in && Exit 1
-$FGREP 'foo.$(OBJEXT).$(OBJEXT)' Makefile.in && Exit 1
+$FGREP 'foo.o.o' Makefile.in && exit 1
+$FGREP 'foo.$(OBJEXT).$(OBJEXT)' Makefile.in && exit 1
$FGREP '$(foo_CFLAGS)' Makefile.in
:
# conditionals are present.
# From Richard Boulton.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# The true/false example from the manual, plus a check for _SHORTNAME.
required='cc native'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# use of _CPPFLAGS (PR/337).
required='cc native'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
$MAKE
./true
-./false && Exit 1
+./false && exit 1
objext=$(sed -n -e 's/^OBJEXT = //p' < Makefile)
test -f ./true-true.$objext
# Another check for per-target flag substitutions.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
$FGREP '$(AM_CFLAGS)' Makefile.in
-$FGREP '$(zzfoo_CFLAGS)' Makefile.in && Exit 1
-$FGREP '$(zzfoo_CPPFLAGS)' Makefile.in && Exit 1
+$FGREP '$(zzfoo_CFLAGS)' Makefile.in && exit 1
+$FGREP '$(zzfoo_CPPFLAGS)' Makefile.in && exit 1
-$FGREP '$(zzbar_CFLAGS)' Makefile.in && Exit 1
+$FGREP '$(zzbar_CFLAGS)' Makefile.in && exit 1
$FGREP '$(zzbar_CPPFLAGS)' Makefile.in
:
# Test to make sure misspellings in _SOURCES variables cause failure.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
bin_PROGRAMS = zardoz foo
# Test to make sure misspellings in _SOURCES variables cause failure.
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_PROG_CC >> configure.ac
# Test to make sure some internal _DEPENDENCIES variables don't cause
# errors.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
TAGS_DEPENDENCIES = joe
# Test to make sure that misspelled prefixes actually cause error.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'EOF'
bni_PROGRAMS = zot
# <http://austingroupbugs.net/view.php?id=542>
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
plan_ 10
# So it seems only non-overlapping ::-rule may be portable. This is
# what we check now.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >Makefile <<\EOF
a :: b
# Test to make sure config substitution in _SOURCES fails.
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_PROG_CC >> configure.ac
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Make sure stamp-h* files are created where we expect
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << END
AM_CONFIG_HEADER([1.h
# Report by Kent Boortz.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Test "not a standard library" error.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Check for AM_LDFLAGS = -module
# Report from Kevin P. Fleming.
required=libtool
-. ./defs || Exit 1
+. ./defs || exit 1
: > README
: > NEWS
# been in place for quite a long time); see also Automake bug #7673.
# Update this test if the semantics are changed.
-. ./defs || Exit 1
+. ./defs || exit 1
# We want complete control over automake options.
AUTOMAKE=$am_original_AUTOMAKE
# strictness specified later should take precedence over strictness
# specified earlier.
-. ./defs || Exit 1
+. ./defs || exit 1
# We want complete control over automake options.
AUTOMAKE=$am_original_AUTOMAKE
# Test for install-strip.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
$AUTOCONF
$AUTOMAKE -a
-prefix=$(cd install && pwd) || Exit 99
+prefix=$(cd install && pwd) || exit 99
./configure --prefix="$prefix"
$MAKE
$MAKE install-strip
# This test needs GNU binutils strip. See sister test 'strip3.sh'.
required='cc strip'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# test 'strip2.sh'.
required='cc libtoolize strip'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# SUBDIRS + AC_SUBST setup from the manual.
# Lots of lines here are duplicated in subcond-am-cond.test.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'END'
if test "$want_opt" = yes; then
# 'subdir8.test' do it from a subdirectory.
# PR automake/46
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
# when make is run from the top-level directory.
# PR automake/46
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
m4_include([confiles.m4])
# SUBDIRS + AM_CONDITIONAL setup from the manual.
# Lots of lines here are duplicated in subdir-ac-subst.test.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'END'
AM_CONDITIONAL([COND_OPT], [test "$want_opt" = yes])
# Check SUBDIRS set based on conditionals.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_CONDITIONAL([TEST], [true])
# It is ok to have a conditional SUBDIRS when using gettext.
required=gettext
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_GNU_GETTEXT
# Check that "./configure && make && make distclean" is actually a
# no-op, even when conditional SUBDIRS are involved.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_CONFIG_FILES([sub1/Makefile sub2/Makefile sub1/subsub/Makefile])
# The $(SUDBIRS) entries are processed in the order they are specified.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_CONFIG_FILES([
test -f sub3/a/run
test -f sub3/b/run
$MAKE clean
- find . | grep 'run$' && Exit 1
+ find . | grep 'run$' && exit 1
: # For shells with busted 'set -e'
done
# Test to make sure sub-sub-dirs work correctly.
-. ./defs || Exit 1
+. ./defs || exit 1
mkdir one
mkdir one/two
# Test SUDBIRS with '/' in them.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_CONFIG_FILES([src/subdir/Makefile src/subdir2/Makefile])
# Test to make sure install-sh and mkinstalldirs correctly found in
# subdirs.
-. ./defs || Exit 1
+. ./defs || exit 1
mkdir zot
# SUDBIRS with $fail set in the environment.
-. ./defs || Exit 1
+. ./defs || exit 1
mkdir sub
# all-recursive-am which depended on BUILT_SOURCES.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
mkdir lib
# 'subobj-clean-pr10697.sh', which deals with the non-libtool case.
required='cc libtoolize'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_PROG_AR
test ! -f sub$i/$j.o
test ! -f sub$i/$j.obj
test ! -f sub$i/$j.lo
- test -f sub$i/$j.c || Exit 99 # Sanity check
+ test -f sub$i/$j.c || exit 99 # Sanity check
done
done
# 'subobj-clean-lt-pr10697.sh', which deals with the libtool case.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
for j in a b c d e f; do
test ! -f sub$i/$j.o
test ! -f sub$i/$j.obj
- test -f sub$i/$j.c || Exit 99 # Sanity check
+ test -f sub$i/$j.c || exit 99 # Sanity check
done
done
# Test of subdir objects with C.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
END
$ACLOCAL
-$AUTOMAKE --add-missing 2>stderr || { cat stderr >&2; Exit 1; }
+$AUTOMAKE --add-missing 2>stderr || { cat stderr >&2; exit 1; }
cat stderr >&2
# Make sure compile is installed, and that Automake says so.
grep 'install.*compile' stderr
test -f compile
grep '^generic/a\.\$(OBJEXT):' Makefile.in
-grep '[^/]a\.\$(OBJEXT)' Makefile.in && Exit 1
+grep '[^/]a\.\$(OBJEXT)' Makefile.in && exit 1
# Opportunistically test for a different bug.
grep '^generic/b\.\$(OBJEXT):.*dirstamp' Makefile.in
# PR 492: Test asm subdir-objects.
required=gcc
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << END
AC_INIT([$me], [1.0])
# 'subobj11c.test'.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
depdir=src/$depdir
else
echo "$me: cannot extract value of DEPDIR from Makefile" >&2
- Exit 1
+ exit 1
fi
ls -l "$depdir"
# See also "semantic" sister test 'subobj11a.test', and related test
# 'subobj11c.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Be lax in the regexp, to account for automake conditionals, the
# use of @am__include@, and similar stuff.
-grep 'include.*//.*foobar' Makefile.in && Exit 1
+grep 'include.*//.*foobar' Makefile.in && exit 1
# These checks depend on automake internals, but presently this is
# the only way to test the code path we are interested in.
# included makefile fragments (containing dependency info).
# See also related tests 'subobj11a.test' and 'subobj11b.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Test of subdir objects with C++.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CXX
$AUTOMAKE
$FGREP 'generic/a.$(OBJEXT)' Makefile.in
-grep '[^/]a\.\$(OBJEXT)' Makefile.in && Exit 1
+grep '[^/]a\.\$(OBJEXT)' Makefile.in && exit 1
grep '.*-c -o' Makefile.in
:
# Make sure '../foo/foo.cpp' generates a rule.
# Report from Dave Brolley.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# From Robert Collins.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_CONFIG_FILES([generic/Makefile])
# From Robert Collins.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_PROG_CC_C_O
# Test to make sure AM_CFLAGS appears in subdir compilation rule.
# Report from Steve M. Robbins.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
$ACLOCAL
$AUTOMAKE --add-missing
-grep wish_CFLAGS Makefile.in && Exit 1
+grep wish_CFLAGS Makefile.in && exit 1
:
# Make sure 'compile' is included when subdir-objects is used in a subdir.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << END
AC_INIT([$me], [1.0])
# forgets '.../<file>.o'.
required='c++ libtoolize'
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << END
AC_INIT([$me], [1.0])
# Opportunistically check that --tag=CXX is used when supported.
if ./libtool --help | grep tag=TAG; then
- $MAKE print >stdout || { cat stdout; Exit 1; }
+ $MAKE print >stdout || { cat stdout; exit 1; }
cat stdout
grep 'BEG1: .*--tag=CXX.*--mode=compile.* :1END' stdout
grep 'BEG2: .*--tag=CXX.*--mode=link.* :2END' stdout
fi
$MAKE
-$MAKE distcheck >output 2>&1 || { cat output; Exit 1; }
+$MAKE distcheck >output 2>&1 || { cat output; exit 1; }
cat output
# GNU Make used to complain that the Makefile contained two rules
# for 'src/.dirstamp' and './/src/.dirstamp'.
-grep 'overriding commands' output && Exit 1
+grep 'overriding commands' output && exit 1
:
# combinational explosion. (This test is named after the &subobjname
# sub in Automake).
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# properly, when a subpackage is involved.
required='cc yacc'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'END'
AC_PROG_CC
# Check subpackage handling.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
mkdir m4
# Try a DIST_SUBDIRS subpackage with no SUBDIRS.
# Report from Gary V. Vaughan.
-. ./defs || Exit 1
+. ./defs || exit 1
mkdir m4
# Make sure different subpackages may share files and directories.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >Makefile.am <<'END'
SUBDIRS = subpkg
# Test to ensure 'distdir' fixes the mode of files and directories
# copied into '$(distdir)', even with sub-packages.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >Makefile.am <<'END'
SUBDIRS = subpkg
# These checks have been introduced in commit 'Release-1-9-254-g9d0eaef'
# into the former test 'subst2.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
# These are deliberately quite long, so that the xxx_PROGRAMS definition
# in Makefile.am below will be split on multiple lines, with the last
sed -n '/^am__EXEEXT.*=/,/[^\\]$/p' Makefile
} >t-programs
cat t-programs
-grep '^ *$' t-programs && Exit 1
+grep '^ *$' t-programs && exit 1
-$MAKE print-programs >stdout || { cat stdout; Exit 1; }
+$MAKE print-programs >stdout || { cat stdout; exit 1; }
cat stdout
grep '^BEG1: x :END1$' stdout
grep '^BEG2: :END2$' stdout
grep '^BEG3: zardoz x :END3$' stdout
-am__empty=X $MAKE -e print-programs >stdout || { cat stdout; Exit 1; }
+am__empty=X $MAKE -e print-programs >stdout || { cat stdout; exit 1; }
cat stdout
grep '^BEG1: x X :END1$' stdout
grep '^BEG2: X :END2$' stdout
# Test that AC_SUBST($1) does something sensible. From Ulrich
# Drepper.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
dnl This test used to have the following lines, which cannot have
$ACLOCAL
$AUTOMAKE
-grep '^\$1' Makefile.in && Exit 1
+grep '^\$1' Makefile.in && exit 1
:
# Test installation with substitutions. This test is based on nobase.test.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'EOF'
AC_PROG_CC
# Test AM_SUBST_NOTMAKE.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'EOF'
myrule="\
# Thus, we allow substitutions in bin_PROGRAMS, but then EXTRA_PROGRAMS
# needs to list possible values of that substitution, literally.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'END'
AC_PROG_CC
$ACLOCAL
AUTOMAKE_fails
-grep 'bin_PROGRAMS.*contains configure substitution' stderr && Exit 1
+grep 'bin_PROGRAMS.*contains configure substitution' stderr && exit 1
grep 'EXTRA_PROGRAMS.*contains configure substitution' stderr
-Exit 0
+exit 0
# Test for bug in variable substitution references, where
# undefined variables break later substitutions.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_SUBST([CC], [whocares])
# pattern is null.
# Report from Richard Boulton.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_SUBST([CC], [whocares])
# This is unrelated to the rest of this test. But while we are
# at it, make sure we don't use am__helldl_SOURCES_DIST here, since
# it's not needed. DIST_SOURCES should contain $(helldl_SOURCES).
-grep am__helldl_SOURCES_DIST Makefile && Exit 1
+grep am__helldl_SOURCES_DIST Makefile && exit 1
grep 'DIST_SOURCES.*\$(helldl_SOURCES)' Makefile
:
# Test that substitutions in variables work.
# From Lars J. Aas.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_CONFIG_SOURCE([fakelib.c])
# See automake bug#7824 and bug#7670.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
plan_ 8
# only once.
# See also related test 'suffix2.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# (related to PR/37)
required='cc libtoolize yacc'
-. ./defs || Exit 1
+. ./defs || exit 1
plan_ 7
# We also check for suffixes containing '-'.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
plan_ 10
# Reported by John Ratliff.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<EOF
AC_PROG_CC
# Reported by Florian Briegel.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<EOF
AC_PROG_CC
# See also related test 'suffix.test'.
required=libtoolize
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Test to make sure that suffix rules chain.
required=c++
-. ./defs || Exit 1
+. ./defs || exit 1
plan_ 10
# Also make sure that .SUFFIXES is automatically adjusted with
# extensions from implicit rules.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
.k.o:
# Based on a report from Arkadiusz Miskiewicz <misiek@pld.ORG.PL>.
required='cc libtool'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_SUBST([LINK], [:])
# '.$(OBJEXT)'. See also related "semantic" tests suffix6b.test
# and suffix6c.test.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
SUFFIXES = a b .$(OBJEXT) c .o .obj
# extensions. Se also related "grepping" test suffix6.test.
required=GNUmake # Other makes might not grok dot-less suffix rules.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
# $(LINK) is not defined automatically by Automake, since the *_SOURCES
# Test to make sure that '.o' and '.obj' are handled like '.$(OBJEXT)'.
# See also related "grepping" test suffix6.test.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
# $(LINK) is not defined automatically by Automake, since the *_SOURCES
# Test to make sure Automake supports implicit rules "confusing"
# extensions. Inspired by a mail from Alex Hornby.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
SUFFIXES = .idl S.cpp C.h
# Make sure Automake has NOT recognized .cpp and .idlC as two new
# extensions.
-grep 'SUFFIXES.* \.cpp' Makefile.in && Exit 1
-grep 'SUFFIXES.* \.idlC' Makefile.in && Exit 1
+grep 'SUFFIXES.* \.cpp' Makefile.in && exit 1
+grep 'SUFFIXES.* \.idlC' Makefile.in && exit 1
:
# From PR/37.
required='cc libtoolize'
-. ./defs || Exit 1
+. ./defs || exit 1
plan_ 10
# Make sure that Automake choose the shorter route between suffixes
# (related to PR/37)
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac << 'END'
AC_PROG_CC
# Reported by Joerg-Martin Schwarz.
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
: > Makefile.am
# Test to make sure that 'automake -a' redirects dangling symlinks.
-. ./defs || Exit 1
+. ./defs || exit 1
rm -f install-sh
ln -s Zardoz install-sh || skip_ "cannot create broken symlinks"
# Test for error for bad syntax.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
foo = q \
# Test for bug reported by Harlan Stenn: the tags target doesn't work
# when there are only headers in a directory.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
noinst_HEADERS = iguana.h
# TAGS_DEPENDENCIES only make sense if other tag-worthy things (such as
# sources) exist.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
END
AUTOMAKE_run
-grep 'define.*TAGS_DEPENDENCIES.*without' stderr && Exit 1
+grep 'define.*TAGS_DEPENDENCIES.*without' stderr && exit 1
:
# François Pinard, and later by Akim Demaille.
required=etags
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_CONFIG_FILES([sub/Makefile])
# - handling of "ambiguous" TODO and SKIP directives
# See also related test 'tap-todo-skip-together.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
not ok 6 # TODO TODO
END
-$MAKE check >stdout && { cat stdout; Exit 1; }
+$MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=6 pass=2 fail=2 xpass=0 xfail=1 skip=1 error=0
# - test results without number get automatically numbered in the
# console progress output
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
ok
END
-TESTS=all.test $MAKE -e check >stdout && { cat stdout; Exit 1; }
+TESTS=all.test $MAKE -e check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=14 pass=6 fail=5 xpass=1 xfail=1 skip=1 error=0
# - missing, unreadable, or not-executable test scripts cause proper
# error reports
-. ./defs || Exit 1
+. ./defs || exit 1
fetch_tap_driver
for s in '"missing plan" message' 'results'; do
skip_ -r "IPC::Open3 not good enough" "no spurious $s"
done
- Exit 0
+ exit 0
fi
fi
# - even after a "Bail out!" directive, all input is still copied in
# the log file
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
ok 1 - TAP result after bailout
END
-$MAKE check && { cat all.log; Exit 1; }
+$MAKE check && { cat all.log; exit 1; }
cat all.log
for rx in \
# "more modern" behaviour in our awk TAP driver.
am_tap_implementation=shell
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
END
TESTS='a.test b.test c.test' $MAKE -e check >stdout \
- && { cat stdout; Exit 1; }
+ && { cat stdout; exit 1; }
cat stdout
count_test_results total=5 pass=1 fail=0 xpass=0 xfail=0 skip=1 error=3
# - A "Bail out!" directive causes the driver to ignore the exit
# status of the test script.
-. ./defs || Exit 1
+. ./defs || exit 1
tests='exit.test exit127.test sighup.test sigterm.test'
chmod a+x $tests
-$MAKE check >stdout && { cat stdout; Exit 1; }
+$MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=4 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=4
for tst in $tests; do grep "^ERROR: $tst - Bail out!" stdout; done
-$EGREP "ERROR: .*(exit.*status|terminat.*signal)" stdout && Exit 1
+$EGREP "ERROR: .*(exit.*status|terminat.*signal)" stdout && exit 1
:
# - A "Bail out!" directive causes the driver to ignore any TAP
# diagnostic message in the rest of the following TAP stream.
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
# Doing the sums above, we have:
-$MAKE check >stdout && { cat stdout; Exit 1; }
+$MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=2 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=1
grep '# all.test: sanity check' stdout
-grep 'not seen' stdout && Exit 1
+grep 'not seen' stdout && exit 1
:
# - A "Bail out!" directive causes the driver to ignore any TAP
# result or error in the rest of the following TAP stream.
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
END
TESTS='foo.test bar.test baz.test' $MAKE -e check >stdout \
- && { cat stdout; Exit 1; }
+ && { cat stdout; exit 1; }
cat stdout
count_test_results total=5 pass=1 fail=0 xpass=0 xfail=0 skip=1 error=3
grep '^ERROR: baz\.test - Bail out!$' stdout
grep '^PASS: baz\.test 1$' stdout
-$FGREP 'Not seen' stdout && Exit 1
+$FGREP 'Not seen' stdout && exit 1
test $($FGREP -c ': foo.test' stdout) -eq 1
test $($FGREP -c ': bar.test' stdout) -eq 2
# Basic TAP test protocol support:
# - "Bail out!" magic
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
test_counts='total=12 pass=3 fail=1 xpass=1 xfail=1 skip=1 error=5'
TESTS='a.test b.test c.test d.test e.test' $MAKE -e check >stdout \
- && { cat stdout; Exit 1; }
+ && { cat stdout; exit 1; }
cat stdout
count_test_results $test_counts
# Note that some of the features checked here are checked in other
# test cases too, usually in a more thorough and detailed way.
-. ./defs || Exit 1
+. ./defs || exit 1
fetch_tap_driver
# Basilar usage and testsuite progress output.
-$MAKE check >stdout && { cat stdout; Exit 1; }
+$MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=20 pass=4 fail=4 xpass=4 xfail=4 skip=4 error=0
ok 1
END
-TESTS=bail.test $MAKE -e check >stdout && { cat stdout; Exit 1; }
+TESTS=bail.test $MAKE -e check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=1 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=1
test -f test-suite.log
grep '^ERROR: bail\.test - Bail out!' stdout
-grep '^PASS:' stdout && Exit 1
+grep '^PASS:' stdout && exit 1
test $($FGREP -c ': bail.test' stdout) -eq 1
-$FGREP 'success.test' stdout && Exit 1
+$FGREP 'success.test' stdout && exit 1
# Override TEST_LOGS from the command line, making it point to a test
# (ok.test) that has to be generated at make time.
rm -f *.log *.test
-TEST_LOGS=ok.log $MAKE -e check >stdout || { cat stdout; Exit 1; }
+TEST_LOGS=ok.log $MAKE -e check >stdout || { cat stdout; exit 1; }
cat stdout
count_test_results total=3 pass=1 fail=0 xpass=0 xfail=1 skip=1 error=0
test ! -f bail.log
test -f test-suite.log
-$EGREP '(bail|success)\.test' stdout && Exit 1
+$EGREP '(bail|success)\.test' stdout && exit 1
cat > exp << 'END'
PASS: ok.test 1
# - colorization of TAP results and diagnostic messages
required='grep-nonprint'
-. ./defs || Exit 1
+. ./defs || exit 1
# Escape '[' for grep, below.
red="$esc\[0;31m"
cat stdout | grep '===='
cat stdout | grep '[Ss]ee .*test-suite\.log'
cat stdout | grep '[Tt]estsuite summary'
- ) | grep "$esc" && Exit 1
+ ) | grep "$esc" && exit 1
: For shells with broken 'set -e'
else
- cat stdout | grep "$esc" && Exit 1
+ cat stdout | grep "$esc" && exit 1
: For shells with broken 'set -e'
fi
}
# Forced colorization should take place also with non-ANSI terminals;
# hence the "TERM=dumb" definition.
TERM=dumb AM_COLOR_TESTS=always $MAKE check >stdout \
- && { cat stdout; Exit 1; }
+ && { cat stdout; exit 1; }
cat stdout
test_color
TERM=ansi $MAKE -e check >stdout \
- && { cat stdout; Exit 1; }
+ && { cat stdout; exit 1; }
cat stdout
test_no_color
# Auxiliary test to set up common data used by many tests on TAP support.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << END
AC_OUTPUT
# Basic TAP test protocol support:
# - dependencies between test scripts
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
# The tests are *deliberately* listed in inversed order here.
chmod a+x *.test
-$MAKE check >stdout || { cat stdout; Exit 1; }
+$MAKE check >stdout || { cat stdout; exit 1; }
cat stdout
count_test_results total=5 pass=5 fail=0 xpass=0 xfail=0 skip=0 error=0
# - option '--diagnostic-string' to customize the string introducing
# TAP diagnostics
-. ./defs || Exit 1
+. ./defs || exit 1
fetch_tap_driver
./configure
-$MAKE check >stdout || { cat stdout; Exit 1; }
+$MAKE check >stdout || { cat stdout; exit 1; }
cat stdout
count_test_results total=$i pass=$i fail=0 xpass=0 xfail=0 skip=0 error=0
cat later.mk >> Makefile
-$MAKE check >stdout || { cat stdout; Exit 1; }
+$MAKE check >stdout || { cat stdout; exit 1; }
cat stdout
-$FGREP 'blah blah' stdout && Exit 1
+$FGREP 'blah blah' stdout && exit 1
:
# - diagnostic messages (TAP lines with leading "#")
# - flags '--comments' and '--no-comments' of the TAP test driver
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
# all.test: Shell metacharacters here: $metacharacters
END
-$MAKE check >stdout || { cat stdout; Exit 1; }
+$MAKE check >stdout || { cat stdout; exit 1; }
cat stdout
-$EGREP -i "#.*all\\.test|a comment|(Tests|Shell) " stdout && Exit 1
+$EGREP -i "#.*all\\.test|a comment|(Tests|Shell) " stdout && exit 1
count_test_results total=4 pass=2 fail=0 xpass=0 xfail=1 skip=1 error=0
echo 'AM_TEST_LOG_DRIVER_FLAGS = --comments' >> Makefile
-$MAKE check >stdout || { cat stdout; Exit 1; }
+$MAKE check >stdout || { cat stdout; exit 1; }
cat stdout
$FGREP ' all.test' stdout > got
cat exp
count_test_results total=4 pass=2 fail=0 xpass=0 xfail=1 skip=1 error=0
TEST_LOG_DRIVER_FLAGS="--no-comments" $MAKE -e check >stdout \
- || { cat stdout; Exit 1; }
+ || { cat stdout; exit 1; }
cat stdout
-$EGREP -i "#.*all\\.test|a comment|(Tests|Shell) " stdout && Exit 1
+$EGREP -i "#.*all\\.test|a comment|(Tests|Shell) " stdout && exit 1
count_test_results total=4 pass=2 fail=0 xpass=0 xfail=1 skip=1 error=0
# The "#"-prepended lines here shouldn't be parsed as test results.
#TODO
END
-$MAKE check >stdout || { cat stdout; Exit 1; }
+$MAKE check >stdout || { cat stdout; exit 1; }
cat stdout
count_test_results total=1 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=0
# ${tab} ${tab}${tab}foo bar${tab}baz ${tab}
END
-$MAKE check >stdout || { cat stdout; Exit 1; }
+$MAKE check >stdout || { cat stdout; exit 1; }
cat stdout
count_test_results total=1 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=0
# Check that an example given in the documentation really works.
# See section "Simple Tests" subsection "Script-based Testsuites".
-. ./defs || Exit 1
+. ./defs || exit 1
fetch_tap_driver
./configure
-$MAKE check >stdout || { cat stdout; Exit 1; }
+$MAKE check >stdout || { cat stdout; exit 1; }
cat stdout
cat > exp <<'END'
# with the Automake test harness".
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am <<'END'
TEST_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
cp "$am_scriptdir"/tap-driver.sh build-aux \
|| framework_failure_ "fetching the perl TAP driver"
-(export AUTOMAKE ACLOCAL AUTOCONF && $AUTORECONF -vi) || Exit 1
+(export AUTOMAKE ACLOCAL AUTOCONF && $AUTORECONF -vi) || exit 1
./configure --help # Sanity check.
./configure || skip_ "configure failed"
# Prevent Sun Distributed Make from trying to run in parallel.
DMAKE_MODE=serial; export DMAKE_MODE
-$MAKE check >stdout && { cat stdout; Exit 1; }
+$MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
cat > exp <<'END'
env \
TESTS='foo.test baz.test' \
TEST_LOG_DRIVER_FLAGS='--comments --ignore-exit' \
- $MAKE -e check >stdout || { cat stdout; Exit 1; }
+ $MAKE -e check >stdout || { cat stdout; exit 1; }
cat > exp <<'END'
PASS: foo.test 1 - Swallows fly
required=non-root
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
fetch_tap_driver
cat $tst.trs || :
test $st -eq 0
- $FGREP 'Hello, World!' stderr stdout && Exit 1
+ $FGREP 'Hello, World!' stderr stdout && exit 1
$FGREP $tst.$suf stderr
done
# TAP support:
# - empty diagnostic messages are discarder
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
# ${tab} $tab${tab}$
END
-$MAKE check >stdout || { cat stdout; Exit 1; }
+$MAKE check >stdout || { cat stdout; exit 1; }
cat stdout
grep '^PASS:.*all\.test' stdout # Sanity check.
-grep '#.*all\.test' stdout && Exit 1
-grep "all\.test[ $tab]*:[ $tab]*$" stdout && Exit 1
+grep '#.*all\.test' stdout && exit 1
+grep "all\.test[ $tab]*:[ $tab]*$" stdout && exit 1
:
# - empty TAP input
# - blank TAP input
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
for input in empty blank white white2; do
cp $input.test all.test
- $MAKE check >stdout && { cat stdout; Exit 1; }
+ $MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=1 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=1
grep '^ERROR: all\.test - missing test plan$' stdout
# TAP support:
# - "escape" TODO and SKIP directives (by escaping the "#" character)
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
ok \\\\\\\\\\# SKIP
END
-$MAKE check >stdout || { cat stdout; Exit 1; }
+$MAKE check >stdout || { cat stdout; exit 1; }
cat stdout
count_test_results total=8 pass=2 fail=0 xpass=0 xfail=3 skip=3 error=0
# TAP support:
# - "escape" TODO and SKIP directives (by escaping the "#" character)
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
ok \# SKIP
END
-$MAKE check >stdout || { cat stdout; Exit 1; }
+$MAKE check >stdout || { cat stdout; exit 1; }
cat stdout
count_test_results total=2 pass=2 fail=0 xpass=0 xfail=0 skip=0 error=0
# - the '--ignore-exit' option causes the TAP test driver to ignore
# exit statuses of the test scripts.
-. ./defs || Exit 1
+. ./defs || exit 1
echo TESTS = > Makefile.am
for st in 1 2 77 99; do
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
-$MAKE check >stdout && { cat stdout; Exit 1; }
+$MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=8 pass=4 fail=0 xpass=0 xfail=0 skip=0 error=4
grep '^ERROR: exit99\.test - exited with status 99$' stdout
echo TEST_LOG_DRIVER_FLAGS = --ignore-exit >> Makefile
-$MAKE check >stdout || { cat stdout; Exit 1; }
+$MAKE check >stdout || { cat stdout; exit 1; }
cat stdout
count_test_results total=4 pass=4 fail=0 xpass=0 xfail=0 skip=0 error=0
# TAP support: some unusual forms for valid TAP input.
# See also related test 'tap-fancy2.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
ok~#TODO
END
-$MAKE check >stdout && { cat stdout; Exit 1; }
+$MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=21 pass=6 fail=6 xfail=4 xpass=1 skip=4 error=0
Bail out! $weirdchars
END
-$MAKE check >stdout && { cat stdout; Exit 1; }
+$MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=6 pass=1 fail=1 xfail=1 xpass=1 skip=1 error=1
Bail out! $bs
END
-$MAKE check >stdout && { cat stdout; Exit 1; }
+$MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=6 pass=1 fail=1 xfail=1 xpass=1 skip=1 error=1
# TAP support: more unusual forms for valid TAP input.
# See also related test 'tap-fancy.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
# And add the test plan!
echo 1..$total >> all.test
-$MAKE check >stdout && { cat stdout; Exit 1; }
+$MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
-$EGREP '^(PASS|FAIL|SKIP).*#.*TODO' stdout && Exit 1
-$EGREP '^X?(PASS|FAIL).*#.*SKIP' stdout && Exit 1
+$EGREP '^(PASS|FAIL|SKIP).*#.*TODO' stdout && exit 1
+$EGREP '^X?(PASS|FAIL).*#.*SKIP' stdout && exit 1
count_test_results total=$total pass=$pass fail=$fail skip=$skip \
xpass=$xpass xfail=$xfail error=$error
# TAP support:
# - which log files get copied in the global log?
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
TESTS="$(echo *.test)" $MAKE -e check || :
cat test-suite.log
-grep ':.*ok|not seen' test-suite.log && Exit 1
+grep ':.*ok|not seen' test-suite.log && exit 1
for s in skip todo fail xpass bail error; do
$FGREP "::$s::" test-suite.log
hodgepodge_contents=$(cat hodgepodge)
case $test_suite_contents in
*"$hodgepodge_contents"*) ;;
- *) Exit 1;;
+ *) exit 1;;
esac
:
# - which global test result derives from different test results
# mixed in a single script?
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
tests=$(echo *.test) # Also required later.
-TESTS="$tests" $MAKE -e check >stdout && { cat stdout; Exit 1; }
+TESTS="$tests" $MAKE -e check >stdout && { cat stdout; exit 1; }
cat stdout
# Dirty trick required here.
done
rm -f test-suite.log
-TESTS="$tests" $MAKE -e test-suite.log && Exit 1
+TESTS="$tests" $MAKE -e test-suite.log && exit 1
cat test-suite.log
have_rst_section ()
# - VERBOSE environment variable support
# Keep in sync with 'test-log.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
TESTS = pass.test skip.test xfail.test fail.test xpass.test error.test
chmod a+x *.test
-TEST_SUITE_LOG=my.log $MAKE -e check && Exit 1
+TEST_SUITE_LOG=my.log $MAKE -e check && exit 1
ls -l # For debugging.
test ! -f test-suite.log
test ! -f global.log
$FGREP "$pmarker $result $pmarker" $result.log || st=1
$FGREP "$cmarker $result $cmarker" $result.log || st=1
done
-test $st -eq 0 || Exit 1
+test $st -eq 0 || exit 1
cat my.log # For debugging.
for result in xfail fail xpass skip error; do
cat $result.log # For debugging.
test $($FGREP -c "$cmarker" my.log) -eq 5
# Passed test scripts shouldn't be mentioned in the global log.
-$EGREP '(^pass|[^x]pass)\.test' my.log && Exit 1
+$EGREP '(^pass|[^x]pass)\.test' my.log && exit 1
# But failing (expectedly or not) and skipped ones should.
$FGREP 'xfail.test' my.log
$FGREP 'skip.test' my.log
rm -f *.log
-VERBOSE=yes $MAKE check >stdout && { cat stdout; Exit 1; }
+VERBOSE=yes $MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
cat global.log
test ! -f my.log
# emitted on stdout.
out=$(cat stdout)
log=$(cat global.log)
-case $out in *"$log"*) ;; *) Exit 1;; esac
+case $out in *"$log"*) ;; *) exit 1;; esac
touch error2.log test-suite.log my.log
$MAKE clean
# - The Automake TAP driver has an option that instruct it to read TAP
# input also from the stderr of the test command, not only its stdout.
-. ./defs || Exit 1
+. ./defs || exit 1
fetch_tap_driver
END
chmod a+x all.test
-$MAKE check >stdout || { cat stdout; Exit 1; }
+$MAKE check >stdout || { cat stdout; exit 1; }
cat stdout
count_test_results total=4 pass=2 fail=0 xpass=0 xfail=1 skip=1 error=0
echo 'Bail out!' >&2
END
-$MAKE check >stdout && { cat stdout; Exit 1; }
+$MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=2 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=1
# See that the option '--no-merge' can override the effect of '--merge'.
TEST_LOG_DRIVER_FLAGS=--no-merge $MAKE -e check >stdout \
- || { cat stdout; Exit 1; }
+ || { cat stdout; exit 1; }
cat stdout
count_test_results total=1 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=0
# plan, then the driver reports both "missing plan" and "exited with
# non-zero status" errors.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > foo.test <<END
#!/bin/sh
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
-$MAKE check >stdout && { cat stdout; Exit 1; }
+$MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=2 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=2
# correct test script(s)
# - "make distcheck" works
-. ./defs || Exit 1
+. ./defs || exit 1
fetch_tap_driver
# since Solaris 10 /bin/sh would try to optimize a ':' away after the
# first iteration, even if it is redirected.
echo " " >stdout
- $run_make check >>stdout || { cat stdout; Exit 1; }
+ $run_make check >>stdout || { cat stdout; exit 1; }
cat stdout
count_test_results total=6 pass=4 fail=0 xpass=0 xfail=1 skip=1 error=0
grep '^PASS: 1\.test 1 - mu$' stdout
# since Solaris 10 /bin/sh would try to optimize a ':' away after the
# first iteration, even if it is redirected.
echo " " >stdout
- $run_make check >>stdout && { cat stdout; Exit 1; }
+ $run_make check >>stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=7 pass=4 fail=1 xpass=0 xfail=1 skip=0 error=1
grep '^PASS: 1\.test 1 - mu$' stdout
# - interactions with 'check_*' variables
required='cc native'
-. ./defs || Exit 1
+. ./defs || exit 1
fetch_tap_driver
./configure
for target in check distcheck; do
- $MAKE $target >stdout || { cat stdout; Exit 1; }
+ $MAKE $target >stdout || { cat stdout; exit 1; }
cat stdout
count_test_results total=3 pass=1 fail=0 xpass=0 xfail=1 skip=1 error=0
done
# of a "plan with skip" TAP plan
# generally true!
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
echo 'Bail out! 0' > a.test
echo 'Bail out! 0.0' > b.test
-TESTS='a.test b.test' $MAKE -e check >stdout && { cat stdout; Exit 1; }
+TESTS='a.test b.test' $MAKE -e check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=2 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=2
# TAP support:
# - literal string "0" as a TODO or SKIP message
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
ok 3 # SKIP 0
END
-$MAKE check >stdout && { cat stdout; Exit 1; }
+$MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=3 pass=0 fail=0 xpass=1 xfail=1 skip=1 error=0
# - literal "0" and "0.0" in a test description and a TODO/SKIP message
# at the same time
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
END
-$MAKE check >stdout && { cat stdout; Exit 1; }
+$MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=14 pass=2 fail=0 xpass=4 xfail=4 skip=4 error=0
# - literal strings "0" and "0.0" as the reason of the skip in a "TAP
# plan with skip" (i.e., "1..0 # SKIP ...").
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
echo '1..0 # SKIP 0' > a.test
echo '1..0 # SKIP 0.0' > b.test
-TESTS='a.test b.test' $MAKE -e check >stdout || { cat stdout; Exit 1; }
+TESTS='a.test b.test' $MAKE -e check >stdout || { cat stdout; exit 1; }
cat stdout
count_test_results total=2 pass=0 fail=0 xpass=0 xfail=0 skip=2 error=0
# TAP support:
# - the string "0" as a test description
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
ok - 0 # SKIP
END
-$MAKE check >stdout && { cat stdout; Exit 1; }
+$MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=10 pass=2 fail=2 xpass=2 xfail=2 skip=2 error=0
# - don't spuriously recognize negative TAP result numbers, but correctly
# interpret them as test descriptions instead
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
not ok -50000
END
-$MAKE check >stdout && { cat stdout; Exit 1; }
+$MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=7 pass=2 fail=2 xpass=1 xfail=1 skip=1 error=0
# - "Bail out!" magic and TAP parse errors are not disabled nor turned
# into simple failures by the definition DISABLE_HARD_ERRORS.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
DISABLE_HARD_ERRORS = yes
# nothing here
END
-$MAKE check >stdout && { cat stdout; Exit 1; }
+$MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=3 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=3
# - By default, TAP input is only from the stdout (and not the stderr)
# of the test command.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
TEST_LOG_DRIVER_FLAGS = --comments
chmod a+x all.test
-$MAKE check >stdout || { cat stdout; Exit 1; }
+$MAKE check >stdout || { cat stdout; exit 1; }
cat stdout
count_test_results total=2 pass=1 fail=0 xpass=0 xfail=0 skip=1 error=0
$FGREP 'foo foo foo' stdout
-$FGREP 'bar bar bar' stdout && Exit 1
+$FGREP 'bar bar bar' stdout && exit 1
:
# - we shouldn't spuriously recognize as TAP result numbers what it
# not, even if it seems pretty close
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
# - ':test-results:' directives in test scripts' output doesn't
# originate spurious results in the testsuite summary
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
ok 1
END
-$MAKE check >stdout || { cat stdout; Exit 1; }
+$MAKE check >stdout || { cat stdout; exit 1; }
cat stdout
count_test_results total=1 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=0
# - don't spuriously recognize lines that are "almost" TAP lines as
# real TAP lines
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
&& test $(grep -c '^not ok1$' all.test) -eq 1 \
|| framework_failure_ "creating all.test"
-$MAKE check >stdout || { cat stdout; Exit 1; }
+$MAKE check >stdout || { cat stdout; exit 1; }
cat stdout
count_test_results total=5 pass=5 fail=0 xpass=0 xfail=0 skip=0 error=0
# - a "not ok # SKIP" line should count as a failure, for consistency
# with the prove(1) utility.
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
not ok 4 - bar # SKIP
END
-$MAKE check >stdout && { cat stdout; Exit 1; }
+$MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=4 pass=0 fail=4 skip=0 xpass=0 xfail=0 error=0
# - TAP result numbers terminated by a non-whitespace "word boundary"
# character are recognized
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
ok 5"`!! foo5 # TODO
END
-$MAKE check >stdout && { cat stdout; Exit 1; }
+$MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=5 pass=1 fail=1 skip=1 xpass=1 xfail=1 error=0
ok 476$ # SKIP
END
-$MAKE check >stdout && { cat stdout; Exit 1; }
+$MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=3 pass=0 fail=0 skip=0 xpass=0 xfail=0 error=3
# Sanity check.
grep "^ok 1'$" all.test || framework_failure_ "creating all.test"
-$MAKE check >stdout || { cat stdout; Exit 1; }
+$MAKE check >stdout || { cat stdout; exit 1; }
cat stdout
count_test_results total=$planned pass=$planned \
# TAP support:
# - how does TAP result numbers with leading zero fares?
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
do_checks ()
{
- $MAKE check >stdout && { cat stdout; Exit 1; }
+ $MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results "$@"
# Allow some normalization of leading zeros, without forcing it.
# TAP result lines whose description is a number.
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
XPASS: all.test 10 - ${x10} # TODO
END
-$MAKE check >stdout && { cat stdout; Exit 1; }
+$MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=10 pass=2 fail=2 xpass=2 xfail=2 skip=2 error=0
# TAP support:
# - out-of-order test results
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
END
TESTS='a.test b.test c.test d.test' $MAKE -e check >stdout \
- && { cat stdout; Exit 1; }
+ && { cat stdout; exit 1; }
cat stdout
count_test_results total=17 pass=8 fail=0 xpass=0 xfail=1 skip=0 error=8
# log file
# See also related test 'tap-passthrough.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
TEST_LOG_COMPILER = $(SHELL)
$MAKE check || st=$?
for e in $exit_statuses; do cat exit-$e.log; done
cat test-suite.log
-test $st -gt 0 || Exit 1
+test $st -gt 0 || exit 1
for e in $exit_statuses; do
for log in exit-$e.log test-suite.log; do
done
env TEST_LOG_DRIVER_FLAGS='--ignore-exit' $MAKE -e check
-$FGREP ".test - exited with status" *.log && Exit 1
+$FGREP ".test - exited with status" *.log && exit 1
:
# - TAP errors are reported in the log file too
# See also related test 'tap-passthrough-exit.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
weirdchars=\''"\$@!&()[]<>#;,:.^?*/'
$weirdchars
END
-TESTS=ok.test $MAKE -e check || { cat ok.log; Exit 1; }
+TESTS=ok.test $MAKE -e check || { cat ok.log; exit 1; }
cat ok.log
for rx in \
cat bail.log
cat skip.log
cat err.log
-test $st -gt 0 || Exit 1
+test $st -gt 0 || exit 1
grep '^1\.\.1$' tiny.log
grep '^ok$' tiny.log
# TAP support:
# - some corner cases for TAP plan
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
for pos in leading trailing; do
TESTS="$pos-repeated.test" $MAKE -e check >stdout \
- && { cat stdout; Exit 1; }
+ && { cat stdout; exit 1; }
cat stdout
count_test_results total=2 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=1
grep "^ERROR: $pos-repeated\\.test - multiple test plans$" stdout
END
env TESTS="leading-repeated.test trailing-repeated.test" \
- $MAKE -e check >stdout && { cat stdout; Exit 1; }
+ $MAKE -e check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=6 pass=3 fail=0 xpass=0 xfail=0 skip=0 error=3
grep "^ERROR: leading-repeated\\.test - multiple test plans$" stdout
grep "^ERROR: trailing-repeated\\.test - multiple test plans$" stdout
grep "^ERROR: trailing-repeated\\.test 2 # AFTER LATE PLAN$" stdout
-grep "leading .*AFTER LATE PLAN" stdout && Exit 1
+grep "leading .*AFTER LATE PLAN" stdout && exit 1
# -------------------------------------------------------------------------
END
env TESTS="1.test 2.test 3.test 4.test" \
- $MAKE -e check >stdout && { cat stdout; Exit 1; }
+ $MAKE -e check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=8 pass=0 fail=0 xpass=0 xfail=0 skip=4 error=4
for i in 1 2 3 4; do
ok 5
END
-$MAKE -e check >stdout && { cat stdout; Exit 1; }
+$MAKE -e check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=8 pass=5 fail=0 xpass=0 xfail=0 skip=0 error=3
ok 3
END
-$MAKE -e check >stdout && { cat stdout; Exit 1; }
+$MAKE -e check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=5 pass=2 fail=0 xpass=0 xfail=0 skip=0 error=3
ok 5
END
-$MAKE -e check >stdout && { cat stdout; Exit 1; }
+$MAKE -e check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=7 pass=3 fail=0 xpass=0 xfail=0 skip=0 error=4
# and 'tap-skip-whole-badcount.test'. More checks about corner-cases
# in TAP plans are performed in 'tap-plan-corner.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
cat > all.test
test -n "$err" || fatal_ "\$err not set before calling my_check"
cat all.test # For debugging.
- $MAKE check >stdout && { cat stdout; Exit 1; }
+ $MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results "$@"
grep "^ERROR: all\\.test $err$" stdout
# - TAP "SKIP" plans with multiple zeroes, as in "1..00 # SKIP"
# This is consistent with the behaviour of the 'prove' utility.
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
echo '1..000 # SKIP' > f.test
env TESTS='a.test b.test c.test d.test e.test f.test' \
- $MAKE -e check >stdout || { cat stdout; Exit 1; }
+ $MAKE -e check >stdout || { cat stdout; exit 1; }
cat stdout
count_test_results total=115 pass=113 xfail=0 skip=2 fail=0 xpass=0 error=0
# TAP support: a malformed TAP plan is not recognized. The checks in
# here should be consistent with the behaviour of the 'prove' utility.
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
tests_list=$(echo *.test)
-TESTS="$tests_list" $MAKE -e check >stdout && { cat stdout; Exit 1; }
+TESTS="$tests_list" $MAKE -e check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=9 pass=2 fail=0 xpass=0 xfail=2 skip=0 error=5
# TAP support:
# - test plan preceding and/or following non-result TAP lines
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
for tap_flags in "" "--comments"; do
env TEST_LOG_DRIVER_FLAGS="$tap_flags" TESTS="$tests" \
- $MAKE -e check >stdout || { cat stdout; Exit 1; }
+ $MAKE -e check >stdout || { cat stdout; exit 1; }
cat stdout
count_test_results total=12 pass=7 xfail=2 skip=3 fail=0 xpass=0 error=0
done
# TAP support:
# - plan line with trailing whitespace is recognized and handled correctly
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
ok 1
END
-TESTS='foo.test bar.test' $MAKE -e check >stdout || { cat stdout; Exit 1; }
+TESTS='foo.test bar.test' $MAKE -e check >stdout || { cat stdout; exit 1; }
cat stdout
count_test_results total=3 pass=3 fail=0 error=0 xpass=0 xfail=0 skip=0
# - test scripts with the test plan at the beginning
# - test scripts with the test plan at the end
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
for tap_flags in "" "--comments"; do
env TEST_LOG_DRIVER_FLAGS="$tap_flags" TESTS='top.test bot.test' \
- $MAKE -e check >stdout || { cat stdout; Exit 1; }
+ $MAKE -e check >stdout || { cat stdout; exit 1; }
cat stdout
count_test_results total=7 pass=5 xfail=1 skip=1 fail=0 xpass=0 error=0
done
# - interactions between "TAP plan with SKIP" and logging of earlier or
# later TAP or non-TAP text
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
END
TESTS='foo.test foo2.test bar.test' $MAKE -e check >stdout \
- || { cat stdout; Exit 1; }
+ || { cat stdout; exit 1; }
cat stdout
count_test_results total=3 pass=0 fail=0 xpass=0 xfail=0 skip=3 error=0
# - an exit status != 0 of a test script causes an hard error, even if
# the last line of output is a "SKIP plan" (e.g., "1..0 # SKIP").
-. ./defs || Exit 1
+. ./defs || exit 1
echo TESTS = one.test two.test > Makefile.am
chmod a+x one.test two.test
-$MAKE check >stdout && { cat stdout; Exit 1; }
+$MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
# The 'prove' utility reports both the skip and the non-zero exit status,
# - a "Bail out!" directive causes an hard error, even if coming after
# a "SKIP plan" (e.g., "1..0 # SKIP").
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
Bail out!
END
-$MAKE check >stdout && { cat stdout; Exit 1; }
+$MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=2 pass=0 fail=0 xpass=0 xfail=0 skip=1 error=1
grep '^ERROR: all\.test - Bail out!' stdout
# TAP support:
# - "SKIP" keyword in a TAP plan is case-insensitive
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
echo "1..0 # $c1$c2$c3$c4 foobar" > $j.test
done; done; done; done
-TESTS="$(echo *.test)" $MAKE -e check >stdout || { cat stdout; Exit 1; }
+TESTS="$(echo *.test)" $MAKE -e check >stdout || { cat stdout; exit 1; }
cat stdout
count_test_results total=16 pass=0 fail=0 xpass=0 xfail=0 skip=16 error=0
# - the special "plan with SKIP" can also be used "late" in the TAP
# stream, i.e., preceded by non-TAP output or TAP diagnostic.
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
1..0
END
-TESTS='foo.test bar.test' $MAKE -e check >stdout || { cat stdout; Exit 1; }
+TESTS='foo.test bar.test' $MAKE -e check >stdout || { cat stdout; exit 1; }
cat stdout
grep '^SKIP: foo\.test .* from the last line$' stdout
# TAP support:
# - TAP errors following a "TAP plan with SKIP" are still diagnosed.
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
1..1
END
-$MAKE check >stdout && { cat stdout; Exit 1; }
+$MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=4 pass=0 fail=0 xpass=0 xfail=0 skip=1 error=3
# - test results seen in a TAP stream that has a "plan with SKIP" are
# flagged as errors, even if all of them are "SKIP" results.
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
1..0 # SKIP
END
-TESTS='foo.test bar.test' $MAKE -e check >stdout && { cat stdout; Exit 1; }
+TESTS='foo.test bar.test' $MAKE -e check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=5 pass=0 fail=0 xpass=0 xfail=0 skip=2 error=3
# been seen is an error
# - any test result following a "plan with skip" is an error.
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
ok 1
1..0 # SKIP too late
END
-$MAKE check >stdout && { cat stdout; Exit 1; }
+$MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=2 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=1
grep '^ERROR: all\.test - too many tests run (expected 0, got 1)$' stdout
not ok 3 # TODO
1..0 # SKIP too late
END
-$MAKE check >stdout && { cat stdout; Exit 1; }
+$MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=4 pass=1 fail=0 xpass=0 xfail=1 skip=1 error=1
grep '^ERROR: all\.test - too many tests run (expected 0, got 3)$' stdout
1..0 # SKIP falsified later
ok 1
END
-$MAKE check >stdout && { cat stdout; Exit 1; }
+$MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=3 pass=0 fail=0 xpass=0 xfail=0 skip=1 error=2
grep '^ERROR: all\.test 1 # UNPLANNED$' stdout
not ok 3
not ok 4 # TODO
END
-$MAKE check >stdout && { cat stdout; Exit 1; }
+$MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=6 pass=0 fail=0 xpass=0 xfail=0 skip=1 error=5
grep '^ERROR: all\.test 1 # UNPLANNED$' stdout
# - normalization of whitespace in console testsuite progress associated
# with a SKIP directive in the TAP plan
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
END
TESTS='foo.test bar.test baz.test' $MAKE -e check > stdout \
- || { cat stdout; Exit 1; }
+ || { cat stdout; exit 1; }
cat stdout
count_test_results total=3 pass=0 fail=0 error=0 xpass=0 xfail=0 skip=3
# Basic TAP test protocol support:
# - special plan format to skip all the tests in a script
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
END
env TESTS='foo.test bar.test baz.test wget.test curl.test mu.test' \
- $MAKE -e check >stdout || { cat stdout; Exit 1; }
+ $MAKE -e check >stdout || { cat stdout; exit 1; }
cat stdout
count_test_results total=6 pass=0 fail=0 xpass=0 xfail=0 skip=6 error=0
# Look for a regression where the "1..0" wasn't being stripped from the
# SKIP message.
-$FGREP '1..0' stdout && Exit 1
+$FGREP '1..0' stdout && exit 1
grep '^SKIP: foo\.test$' stdout
grep '^SKIP: bar\.test$' stdout
# children, and is pretty hacky and complex; is there a better way to
# accomplish the checks done here?
-. ./defs || Exit 1
+. ./defs || exit 1
cat >expect-check <<'END'
eval spawn $env(SHELL) -c ":"
END
expect -f expect-check || {
echo "$me: failed to find a working expect program" >&2
- Exit 77
+ exit 77
}
rm -f expect-check
# TAP support:
# - RECHECK_LOGS
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
TEST_LOG_COMPILER = cat
grep '^# ERROR: *1$' stdout
}
-$MAKE -e check && Exit 1
+$MAKE -e check && exit 1
test -f foo.log
test -f bar.log
test -f baz.log
rm -f foo.log bar.log
-env RECHECK_LOGS= $MAKE -e check > stdout && { cat stdout; Exit 1; }
+env RECHECK_LOGS= $MAKE -e check > stdout && { cat stdout; exit 1; }
cat stdout
test -f foo.log
test -f bar.log
grep '^PASS: foo\.test 1$' stdout
grep '^PASS: foo\.test 2$' stdout
grep '^FAIL: bar\.test 1$' stdout
-grep 'baz\.test' stdout && Exit 1
+grep 'baz\.test' stdout && exit 1
grep_summary
$sleep
# We re-run only a successful test, but the tests that failed in the
# previous run should still be taken into account, and cause an overall
# failure.
-env RECHECK_LOGS= $MAKE -e check > stdout && { cat stdout; Exit 1; }
+env RECHECK_LOGS= $MAKE -e check > stdout && { cat stdout; exit 1; }
cat stdout
grep '^PASS: foo\.test 1$' stdout
grep '^PASS: foo\.test 2$' stdout
-grep 'ba[rz]\.test' stdout && Exit 1
+grep 'ba[rz]\.test' stdout && exit 1
is_newest foo.log foo.test
grep_summary
$sleep
touch zardoz
-env RECHECK_LOGS= $MAKE -e check > stdout && { cat stdout; Exit 1; }
+env RECHECK_LOGS= $MAKE -e check > stdout && { cat stdout; exit 1; }
cat stdout
grep '^ERROR: baz\.test' stdout
-$EGREP '(foo|bar)\.test' stdout && Exit 1
+$EGREP '(foo|bar)\.test' stdout && exit 1
is_newest baz.log zardoz
grep_summary
# Now, explicitly retry with all test logs already updated, and ensure
# that the summary is still displayed.
-env RECHECK_LOGS= $MAKE -e check > stdout && { cat stdout; Exit 1; }
+env RECHECK_LOGS= $MAKE -e check > stdout && { cat stdout; exit 1; }
cat stdout
-$EGREP '(foo|bar|baz)\.test' stdout && Exit 1
+$EGREP '(foo|bar|baz)\.test' stdout && exit 1
grep_summary
# The following should re-run foo.test (and only foo.test), even if its
# log file is up-to-date.
: > older
-env RECHECK_LOGS=foo.log $MAKE -e check > stdout && { cat stdout; Exit 1; }
+env RECHECK_LOGS=foo.log $MAKE -e check > stdout && { cat stdout; exit 1; }
cat stdout
grep '^PASS: foo\.test 1$' stdout
grep '^PASS: foo\.test 2$' stdout
-grep 'ba[rz]\.test' stdout && Exit 1
+grep 'ba[rz]\.test' stdout && exit 1
is_newest foo.log older
grep_summary
# Test the 'recheck' target for TAP test protocol.
# Keep in sync with 'test-driver-custom-multitest-recheck.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
fetch_tap_driver
*) fatal_ "invalid usage of function 'do_recheck'";;
esac
rm -f *.run
- eval "\$MAKE recheck >stdout $on_bad_rc { cat stdout; ls -l; Exit 1; }; :"
+ eval "\$MAKE recheck >stdout $on_bad_rc { cat stdout; ls -l; exit 1; }; :"
cat stdout; ls -l
}
count_test_results total=0 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=0
: Run the tests for the first time.
- $MAKE check >stdout && { cat stdout; Exit 1; }
+ $MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
ls -l
# All the test scripts should have run.
# TAP support:
# - non-directive comments in TAP results are kept verbatim
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
ok 5 # ${tab}${tab}TOOD${tab}${sp}${sp}
END
-$MAKE check >stdout && { cat stdout; Exit 1; }
+$MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=5 pass=3 fail=2 xpass=0 xfail=0 skip=0 error=0
# TAP support:
# - a test script terminated by a signal causes an hard error
-. ./defs || Exit 1
+. ./defs || exit 1
fetch_tap_driver
# - a test result numbered as 0 is to be considered out-of-order
# This is consistent with the behaviour of the 'prove' utility.
-. ./defs || Exit 1
+. ./defs || exit 1
if test $am_tap_implementation = perl; then
$PERL -MTAP::Parser -e 1 \
END
TESTS='a.test b.test c.test d.test e.test' $MAKE -e check >stdout \
- && { cat stdout; Exit 1; }
+ && { cat stdout; exit 1; }
cat stdout
count_test_results total=5 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=5
# - TODO and SKIP directives on the same line: the first one wins
# See also related test 'tap-ambiguous-directive.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
not ok 2 # TODO SKIP
END
-$MAKE check >stdout || { cat stdout; Exit 1; }
+$MAKE check >stdout || { cat stdout; exit 1; }
cat stdout
count_test_results total=2 pass=0 fail=0 xpass=0 xfail=1 skip=1 error=0
# - normalization of whitespace in console testsuite progress associated
# with TODO and SKIP directives
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
# - the reasons for TODO and SKIP, if present, are nicely printed in
# the testsuite progress output
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
cat all.test # For debugging.
-$MAKE check >stdout || { cat stdout; Exit 1; }
+$MAKE check >stdout || { cat stdout; exit 1; }
cat stdout
count_test_results total=256 pass=0 fail=0 xpass=0 xfail=128 skip=128 error=0
ok 9
END
-$MAKE check >stdout || { cat stdout; Exit 1; }
+$MAKE check >stdout || { cat stdout; exit 1; }
cat stdout
count_test_results total=9 pass=9 fail=0 xpass=0 xfail=0 skip=0 error=0
# TAP support:
# - unplanned tests are properly reported as errors
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
ok 1
ok 2
END
-$MAKE check >stdout && { cat stdout; Exit 1; }
+$MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=3 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=2
grep '^ERROR: all\.test - too many tests run (expected 1, got 2)$' stdout
ok 2
ok 3
END
-$MAKE check >stdout && { cat stdout; Exit 1; }
+$MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=4 pass=2 fail=0 xpass=0 xfail=0 skip=0 error=2
grep '^ERROR: all\.test - too many tests run (expected 2, got 3)$' stdout
not ok 4
ok 5 # SKIP
END
-XFAIL_TESTS=all.test $MAKE -e check >stdout && { cat stdout; Exit 1; }
+XFAIL_TESTS=all.test $MAKE -e check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=6 pass=0 fail=0 xpass=0 xfail=1 skip=1 error=4
grep '^ERROR: all\.test - too many tests run (expected 2, got 5)$' stdout
END
-$MAKE check >stdout && { cat stdout; Exit 1; }
+$MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=22 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=21
$x
1..2
END
- $MAKE check >stdout && { cat stdout; Exit 1; }
+ $MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
test $($FGREP -c ': all.test' stdout) -eq 4
$EGREP '^PASS: all\.test 1($| )' stdout
# force us to tweak dozens of other tests (hopefully).
# See also related test 'tap-todo-skip-whitespace.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
TEST_LOG_COMPILER = cat
# - tests without explicit number get automatically numbered in the
# testsuite progress output on console
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
ok zardoz
END
-$MAKE check >stdout || { cat stdout; Exit 1; }
+$MAKE check >stdout || { cat stdout; exit 1; }
cat stdout
count_test_results total=7 pass=4 fail=0 xpass=0 xfail=2 skip=1 error=0
# TAP and $(XFAIL_TESTS): test results without directives are turned from
# PASS to XPASS and from FAIL to XFAIL; other results are unchanged.
-. ./defs || Exit 1
+. ./defs || exit 1
. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
Bail out!
END
-$MAKE check >stdout && { cat stdout; Exit 1; }
+$MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=7 pass=0 fail=0 xpass=2 xfail=3 skip=1 error=1
not ok 3 # TODO
END
-$MAKE check >stdout || { cat stdout; Exit 1; }
+$MAKE check >stdout || { cat stdout; exit 1; }
cat stdout
count_test_results total=3 pass=0 fail=0 xpass=0 xfail=2 skip=1 error=0
# FIXME: currently this works only when the tar format used is 'v7'
# FIXME: (which is the default one).
-. ./defs || Exit 1
+. ./defs || exit 1
cwd=$(pwd) || fatal_ "getting current working directory"
$MAKE dist
test -f $me-1.0.tar.gz
-ls | grep has-run && Exit 1
+ls | grep has-run && exit 1
rm -f *.tar.* *has-run*
# Check the tar-ustar option.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << 'END'
AC_INIT([tar], [1.0])
# Check the tar-pax option.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << 'END'
AC_INIT([tar2], [1.0])
# Check the tar options diagnostics.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << 'END'
AC_INIT([tar2], [1.0])
# Assar Westerlund <assar@sics.se>
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Check that target clashes are diagnosed.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# parallel-tests:
# - LOG_DRIVER variables can be AC_SUBST'd
-. ./defs || Exit 1
+. ./defs || exit 1
mkdir test-drivers
cat > foo <<'END'
#!/bin/sh
echo "PASS: from $0"
-exit 1 # Exit status should be ignored by the trivial-test-driver.
+exit 1 # exit status should be ignored by the trivial-test-driver.
END
cat > bar.test <<'END'
cat foo.log
cat bar.log
cat baz.log
-test $st -eq 0 || Exit 1
+test $st -eq 0 || exit 1
count_test_results total=3 pass=1 fail=0 skip=1 xfail=1 xpass=0 error=0
:
# - Automake can correctly handle conditionals contents for the
# LOG_DRIVER variables.
-. ./defs || Exit 1
+. ./defs || exit 1
cp "$am_testauxdir"/trivial-test-driver . \
|| fatal_ "failed to fetch auxiliary script trivial-test-driver"
#!/bin/sh
echo "PASS: from $0"
echo "SKIP: from $0"
-exit 1 # Exit status should be ignored by the trivial-test-driver.
+exit 1 # exit status should be ignored by the trivial-test-driver.
END
cat > bar.test <<'END'
$AUTOMAKE -a
test -f test-driver
-grep DRIVER Makefile.in || Exit 99 # For debugging.
+grep DRIVER Makefile.in || exit 99 # For debugging.
grep '^my_LOG_DRIVER *=' Makefile.in \
&& fatal_ 'unexpected $(my_LOG_DRIVER) in Makefile.in'
cat foo.log
cat bar.log
cat baz.log
-test $st -eq 0 || Exit 1
+test $st -eq 0 || exit 1
do_count
-$MAKE distcheck >stdout || { cat stdout; Exit 1; }
+$MAKE distcheck >stdout || { cat stdout; exit 1; }
cat stdout
do_count
# e.g., 'sub/foo.log'), the Automake test harness must ensure that
# directory exists before calling any custom test driver.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
# and 'parallel-tests-recheck-override.test'.
# Keep in sync with 'tap-recheck.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
cp "$am_testauxdir"/trivial-test-driver . \
|| fatal_ "failed to fetch auxiliary script trivial-test-driver"
*) fatal_ "invalid usage of function 'do_recheck'";;
esac
rm -f *.run
- eval "\$MAKE recheck >stdout $on_bad_rc { cat stdout; ls -l; Exit 1; }; :"
+ eval "\$MAKE recheck >stdout $on_bad_rc { cat stdout; ls -l; exit 1; }; :"
cat stdout; ls -l
}
count_test_results total=0 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=0
: Run the tests for the first time.
- $MAKE check >stdout && { cat stdout; Exit 1; }
+ $MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
ls -l
# All the test scripts should have run.
# See also related tests 'test-driver-custom-multitest-recheck.test' and
# 'parallel-tests-recheck-override.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
cp "$am_testauxdir"/trivial-test-driver . \
|| fatal_ "failed to fetch auxiliary script trivial-test-driver"
$srcdir/configure
: Run the tests for the first time.
- $MAKE check >stdout && { cat stdout; Exit 1; }
+ $MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
# All the test scripts should have run.
test -f a.run
: An empty '$(TESTS)' or '$(TEST_LOGS)' means that no test should be run.
for var in TESTS TEST_LOGS; do
- env "$var=" $MAKE -e recheck >stdout || { cat stdout; Exit 1; }
+ env "$var=" $MAKE -e recheck >stdout || { cat stdout; exit 1; }
cat stdout
count_test_results total=0 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=0
test ! -r a.run
: a.test was successful the first time, no need to re-run it.
env TESTS=a.test $MAKE -e recheck >stdout \
- || { cat stdout; Exit 1; }
+ || { cat stdout; exit 1; }
cat stdout
count_test_results total=0 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=0
test ! -r a.run
: b.test failed, it should be re-run. And make it pass this time.
echo OK > b.ok
TEST_LOGS=b.log $MAKE -e recheck >stdout \
- || { cat stdout; Exit 1; }
+ || { cat stdout; exit 1; }
cat stdout
test ! -r a.run
test -f b.run
: No need to re-run a.test or b.test anymore.
TEST_LOGS=b.log $MAKE -e recheck >stdout \
- || { cat stdout; Exit 1; }
+ || { cat stdout; exit 1; }
cat stdout
count_test_results total=0 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=0
test ! -r a.run
test ! -r b.run
test ! -r c.run
TESTS='a.test b.test' $MAKE -e recheck >stdout \
- || { cat stdout; Exit 1; }
+ || { cat stdout; exit 1; }
cat stdout
count_test_results total=0 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=0
test ! -r a.run
# a ':' away after the first iteration, even if it is redirected.
echo dummy > c.err
env TEST_LOGS='a.log c.log' $MAKE -e recheck >stdout \
- && { cat stdout; Exit 1; }
+ && { cat stdout; exit 1; }
cat stdout
count_test_results total=1 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=1
test ! -r a.run
# Use 'echo', not ':'; see comments above for why.
echo dummy > c.ok
env TESTS='c.test a.test' $MAKE -e recheck >stdout \
- || { cat stdout; Exit 1; }
+ || { cat stdout; exit 1; }
cat stdout
count_test_results total=1 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=0
test ! -r a.run
: Nothing should be rerun anymore, as all tests have been eventually
: successful.
- $MAKE recheck >stdout || { cat stdout; Exit 1; }
+ $MAKE recheck >stdout || { cat stdout; exit 1; }
cat stdout
count_test_results total=0 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=0
test ! -r a.run
# only checks implementation details in Automake's custom test drivers
# support, but also serves as a "usability test" for our APIs.
-. ./defs || Exit 1
+. ./defs || exit 1
cp "$am_testauxdir"/trivial-test-driver . \
|| fatal_ "failed to fetch auxiliary script trivial-test-driver"
$srcdir/configure
- $MAKE check >stdout && { cat stdout; cat test-suite.log; Exit 1; }
+ $MAKE check >stdout && { cat stdout; cat test-suite.log; exit 1; }
cat stdout
cat test-suite.log
# Couple of sanity checks. These might need to be updated if the
# 'trivial-test-driver' script is changed.
- $FGREP INVALID.NAME stdout test-suite.log && Exit 1
- test -f BAD.LOG && Exit 1
- test -f BAD.TRS && Exit 1
+ $FGREP INVALID.NAME stdout test-suite.log && exit 1
+ test -f BAD.LOG && exit 1
+ test -f BAD.TRS && exit 1
# These log files must all have been created by the testsuite.
cat pass.log
cat fail.log
test $(grep -c '%% ' test-suite.log) -eq 4
TESTS='pass.t pass3-skip2-xfail.t' $MAKE -e check >stdout \
- || { cat stdout; cat test-suite.log; Exit 1; }
+ || { cat stdout; cat test-suite.log; exit 1; }
cat test-suite.log
cat stdout
count_test_results total=7 pass=4 fail=0 skip=2 xfail=1 xpass=0 error=0
# installed or referenced if it's not used, i.e., if the user has
# defined his own '*LOG_DRIVER' variables.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
AC_PROG_CC
for opts in '' '--add-missing' '-a -c'; do
$AUTOMAKE $opts
- $FGREP test-driver Makefile.in sub[12]/Makefile.in && Exit 1
- find . | $FGREP test-driver && Exit 1
+ $FGREP test-driver Makefile.in sub[12]/Makefile.in && exit 1
+ find . | $FGREP test-driver && exit 1
: For shells with busted 'set -e'.
done
# Custom test drivers: "abstract" XFAIL_TESTS support.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
AC_SUBST([nihil], [])
./configure
-$MAKE check >stdout || { cat stdout; Exit 1; }
+$MAKE check >stdout || { cat stdout; exit 1; }
cat stdout
test $(grep -c '^PASS:' stdout) -eq 3
test $(grep -c '^XFAIL:' stdout) -eq 13
cd $dir
cp pass.test x1.test
cp x2.test pass.test
- $MAKE check >stdout && { cat stdout; Exit 1; }
+ $MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
test "$(cat pass.trs)" = ":test-result: FAIL"
test "$(cat x1.trs)" = ":test-result: XPASS"
# Custom test drivers: per-extension test drivers.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
diff $x.exp $x.log || st=1
done
-Exit $st
+exit $st
# (like our dummy one in this test) might leave around a test log even
# in case of internal failures.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
AC_OUTPUT
./configure
# The testsuite driver does not exist.
-$MAKE check && Exit 1
+$MAKE check && exit 1
test ! -f test-suite.log
# The testsuite driver exists and create the test log files, but fails.
END
chmod a+x oops
-$MAKE check && Exit 1
+$MAKE check && exit 1
test ! -f test-suite.log
:
# defined in a subdir Makefile
am_create_testdir=empty
-. ./defs || Exit 1
+. ./defs || exit 1
ocwd=$(pwd) || fatal_ "getting current working directory"
# Custom test drivers: check that the test name passed to the test
# driver has any VPATH prefix stripped.
-. ./defs || Exit 1
+. ./defs || exit 1
ocwd=$(pwd) || fatal_ "cannot get current working directory"
# - .test if $(TEST_EXTENSIONS) is not defined
# - stuff in $(TEST_EXTENSIONS) otherwise
-. ./defs || Exit 1
+. ./defs || exit 1
: > Makefile.am
# Expose bug in conditional definition of TEST_EXTENSIONS.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_CONDITIONAL([COND], [:])
AUTOMAKE_fails $i
lineno=$(sed -n 's/^## lineno //p' $i.am) \
&& test 0 -lt "$lineno" \
- || Exit 99
+ || exit 99
grep "^$i\\.am:$lineno:.*TEST_EXTENSIONS.*conditional content" stderr
done
# and do not diagnose valid (albeit more unusual) ones.
# See automake bug#9400.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
AC_OUTPUT
# Verify that we accept valid suffixes, even if intermixed with
# invalid ones.
-$EGREP '\.(sh|test|t33)' stderr && Exit 1
+$EGREP '\.(sh|test|t33)' stderr && exit 1
# Verify that we don't try to handle invalid suffixes.
-$EGREP '(LOG_COMPILER|non-POSIX var|bad character)' stderr && Exit 1
+$EGREP '(LOG_COMPILER|non-POSIX var|bad character)' stderr && exit 1
:
# Check that our concurrent test harness is not subject to spurious VPATH
# rewrites.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
test -f baz.log
test -f baz.trs
# We don't want VPATH rewrites, really.
-$MAKE check -n | $EGREP '\.\./(foo|bar|baz)( |$)' && Exit 1
+$MAKE check -n | $EGREP '\.\./(foo|bar|baz)( |$)' && exit 1
$MAKE distcheck
:
# - VERBOSE environment variable support
# Keep in sync with 'tap-log.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<END
AC_OUTPUT
./configure
-TEST_SUITE_LOG=my.log $MAKE -e check && Exit 1
+TEST_SUITE_LOG=my.log $MAKE -e check && exit 1
ls -l # For debugging.
test ! -f test-suite.log
test ! -f global.log
$FGREP "$pmarker $result $pmarker" $result.log || st=1
$FGREP "$cmarker $result $cmarker" $result.log || st=1
done
-test $st -eq 0 || Exit 1
+test $st -eq 0 || exit 1
cat my.log # For debugging.
for result in xfail fail xpass skip error; do
cat $result.log # For debugging.
}
# Passed test scripts shouldn't be mentioned in the global log.
-$EGREP ':.*[^x]pass' my.log && Exit 1
+$EGREP ':.*[^x]pass' my.log && exit 1
# But failing (expectedly or not) and skipped ones should.
have_rst_section 'SKIP: skip' my.log
have_rst_section 'FAIL: fail' my.log
rm -f *.log
-VERBOSE=yes $MAKE check >stdout && { cat stdout; Exit 1; }
+VERBOSE=yes $MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
cat global.log
test ! -f my.log
# emitted on stdout.
out=$(cat stdout)
log=$(cat global.log)
-case $out in *"$log"*) ;; *) Exit 1;; esac
+case $out in *"$log"*) ;; *) exit 1;; esac
touch error2.log test-suite.log my.log
$MAKE clean
# different test scripts don't end up sharing the same log file.
# (Automake itself is such a project, BTW ;-)
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<END
AC_OUTPUT
# with the use of the reStructuredText field ':copy-in-global-log:' in
# the associated '.trs' files.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
grep '^seen corn 2$' test-suite.log
grep '^seen corn 31$' test-suite.log
grep '^seen corn 32$' test-suite.log
-$FGREP 'not seen' test-suite.log && Exit 1
+$FGREP 'not seen' test-suite.log && exit 1
:
# "global test result" in '*.trs' files, as documented in the automake
# manual.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
:test-result: XFAIL
END
-$MAKE check && Exit 1
+$MAKE check && exit 1
cat test-suite.log
have_result <<END
END
: > zar-doz.x
-$MAKE check && Exit 1
+$MAKE check && exit 1
cat test-suite.log
have_result <<END
# Test the "make recheck" semantics for custom test drivers, as documented
# in the Automake manual.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
# The ':test-result:' fields should be ignored by "make recheck",
# but should cause the testsuite report to detect errors.
-$MAKE check && Exit 1
+$MAKE check && exit 1
ls -l
for t in $tests; do test -f $t.run; done
rm -f *.run
$MAKE recheck
ls -l
for t in $rechecked; do test -f $t.run; done
- find . -name 'n-*.run' | grep . && Exit 1
+ find . -name 'n-*.run' | grep . && exit 1
: For shells with busted 'set -e'.
done
# Parallel testsuite harness: check APIs for the registering of test
# results in '*.trs' files, as documented in the automake manual.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
$MAKE check >stdout || st=$?
cat stdout
# Our dummy driver make no testsuite progress report.
- grep ': .*\.test' stdout && Exit 1
+ grep ': .*\.test' stdout && exit 1
# Nor it writes to the log files.
- test -s foo.log && Exit 1
- test -s bar.log && Exit 1
+ test -s foo.log && exit 1
+ test -s bar.log && exit 1
return $st
}
grep "^# FAIL: *$fail$" stdout || rc=1
grep "^# XPASS: *$xpass$" stdout || rc=1
grep "^# ERROR: *$error$" stdout || rc=1
- test $st -eq 0 || Exit 1
+ test $st -eq 0 || exit 1
}
$ACLOCAL
:test-result: SKIP
:test-global-result: ERROR
END
-mk_check && Exit 1
+mk_check && exit 1
count_test_results total=2 pass=0 fail=1 xpass=0 xfail=0 skip=1 error=0
cat > foo.test <<END
cat > bar.test <<END
:test-global-result: PASS
END
-mk_check && Exit 1
+mk_check && exit 1
count_test_results total=1 pass=0 fail=1 xpass=0 xfail=0 skip=0 error=0
cat > foo.test <<END
:test-result: ERROR
END
: > bar.test
-mk_check && Exit 1
+mk_check && exit 1
count_test_results total=6 pass=1 fail=1 xpass=1 xfail=1 skip=1 error=1
cp foo.test bar.test
-mk_check && Exit 1
+mk_check && exit 1
count_test_results total=12 pass=2 fail=2 xpass=2 xfail=2 skip=2 error=2
# Check that we are liberal w.r.t. whitespace use.
done
cat foo.test # For debugging.
cat bar.test # Likewise.
-mk_check && Exit 1
+mk_check && exit 1
count_test_results total=30 pass=5 fail=5 xpass=5 xfail=5 skip=5 error=5
:
# - non-existent scripts listed in TESTS get diagnosed
# See also related test 'test-missing2.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
./configure
-$MAKE check >output 2>&1 && { cat output; Exit 1; }
+$MAKE check >output 2>&1 && { cat output; exit 1; }
cat output
test -f ok.log
grep '^PASS: ok\.test' output
test ! -f test-suite.log
TESTS='zardoz2.test' $MAKE -e check >output 2>&1 \
- && { cat output; Exit 1; }
+ && { cat output; exit 1; }
cat output
$FGREP 'zardoz2.log' output
test ! -f test-suite.log
TEST_LOGS='zardoz3.log' $MAKE -e check >output 2>&1 \
- && { cat output; Exit 1; }
+ && { cat output; exit 1; }
cat output
$FGREP 'zardoz3.log' output
test ! -f test-suite.log
$MAKE check
rm -f zardoz.test
-$MAKE check >output 2>&1 && { cat output; Exit 1; }
+$MAKE check >output 2>&1 && { cat output; exit 1; }
cat output
$FGREP 'zardoz.log' output
test ! -f test-suite.log
# all the $(TEST_LOGS) have a dummy dependency.
# See also related test 'test-missing.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
./configure
-$MAKE foobar1.log foobar2.log || Exit 99
-test ! -f foobar1.log || Exit 99
-test ! -f foobar1.trs || Exit 99
-test ! -f foobar2.log || Exit 99
-test ! -f foobar2.trs || Exit 99
+$MAKE foobar1.log foobar2.log || exit 99
+test ! -f foobar1.log || exit 99
+test ! -f foobar1.trs || exit 99
+test ! -f foobar2.log || exit 99
+test ! -f foobar2.trs || exit 99
-$MAKE check >output 2>&1 && { cat output; Exit 1; }
+$MAKE check >output 2>&1 && { cat output; exit 1; }
cat output
grep 'test-suite\.log.*foobar1\.log' output
grep 'test-suite\.log.*foobar1\.trs' output
# - creation and removal of '.trs' auxiliary files
# - check some internals regarding the use of '.trs' files.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<END
AC_OUTPUT
test -f sub/foo.trs
# The files should be properly created in case of testsuite failure too.
-FOO_STATUS=1 $MAKE check && Exit 1
+FOO_STATUS=1 $MAKE check && exit 1
test -f foo.trs
test -f bar.trs
test -f sub/zardoz.trs
# This test is complex and tricky, but that's acceptable since we are
# testing semantics that are potentially complex and tricky.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<END
AC_OUTPUT
: Recreate by hand, with a failing test.
rm -f foo.trs bar.trs
-TEST_STATUS=1 $MAKE bar.trs baz.trs >stdout || { cat stdout; Exit 1; }
+TEST_STATUS=1 $MAKE bar.trs baz.trs >stdout || { cat stdout; exit 1; }
cat stdout
test ! -f foo.trs
test -f bar.trs
test -f baz.trs
grep '^FAIL: bar\.test' stdout
-$EGREP '^(baz|foo)\.test' stdout && Exit 1
+$EGREP '^(baz|foo)\.test' stdout && exit 1
: Recreate with a sweeping "make check", and ensure that also up-to-date
: '.trs' files are remade.
: ensure that also up-to-date '.trs' files are remade -- this time we
: grep the "make check" output verify that.
rm -f foo.trs bar.trs
-TEST_STATUS=1 $MAKE check >stdout && { cat stdout; Exit 1; }
+TEST_STATUS=1 $MAKE check >stdout && { cat stdout; exit 1; }
test -f foo.trs
test -f bar.trs
grep '^FAIL: foo\.test' stdout
: Interactions with "make recheck" are OK.
rm -f foo.trs bar.trs baz.log baz.trs
-$MAKE recheck >stdout || { cat stdout; Exit 1; }
+$MAKE recheck >stdout || { cat stdout; exit 1; }
cat stdout
test -f foo.trs
test -f bar.trs
test ! -f baz.log
grep '^PASS: foo\.test' stdout
grep '^PASS: bar\.test' stdout
-grep 'baz\.test' stdout && Exit 1
+grep 'baz\.test' stdout && exit 1
count_test_results total=2 pass=2 fail=0 xpass=0 xfail=0 skip=0 error=0
: Setup for the next check.
: '.trs' files are *not* remade.
update_stamp
rm -f foo.trs bar.trs test-suite.log
-$MAKE test-suite.log >stdout || { cat stdout; Exit 1; }
+$MAKE test-suite.log >stdout || { cat stdout; exit 1; }
cat stdout
grep '^PASS: foo\.test' stdout
grep '^PASS: bar\.test' stdout
-grep 'baz\.test' stdout && Exit 1
+grep 'baz\.test' stdout && exit 1
stat *.trs *.log stamp || : # For debugging.
# Check that make has updated what it needed to, but no more.
test -f foo.trs
rm -f foo.trs
update_stamp
touch bar.test
-RECHECK_LOGS= $MAKE -e check >stdout || { cat stdout; Exit 1; }
+RECHECK_LOGS= $MAKE -e check >stdout || { cat stdout; exit 1; }
cat stdout
# Check that make has updated what it needed to, but no more.
test -f foo.trs
is_newest stamp baz.trs
grep '^PASS: foo\.test' stdout
grep '^PASS: bar\.test' stdout
-grep 'baz\.test' stdout && Exit 1
+grep 'baz\.test' stdout && exit 1
:
# Check parallel harness features:
# - recovery from unreadable '.trs' files, in various scenarios
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<END
AC_OUTPUT
: > t
chmod a-r t
-test ! -r t || Exit 77
+test ! -r t || exit 77
rm -f t
: Create the required log files.
: Again, but using "make recheck" this time.
rm -f foo.trs
chmod a-r bar.trs
-$MAKE recheck >stdout || { cat stdout; Exit 1; }
+$MAKE recheck >stdout || { cat stdout; exit 1; }
cat stdout
test -f foo.trs
test -r foo.trs
: Recreate by remaking the global test log.
chmod a-r foo.trs
rm -f test-suite.log
-$MAKE test-suite.log >stdout || { cat stdout; Exit 1; }
+$MAKE test-suite.log >stdout || { cat stdout; exit 1; }
cat stdout
test -f foo.trs
test -r foo.trs
grep '^PASS: foo\.test' stdout
-grep 'bar\.test' stdout && Exit 1
+grep 'bar\.test' stdout && exit 1
# Also test that have only run before should be counted in the final
# testsuite summary.
grep '^# TOTAL: *2$' stdout
: Setup for the next check.
: > baz.test
sed 's/^TESTS =.*/& baz.test/' Makefile > t
-diff t Makefile && Exit 99
+diff t Makefile && exit 99
mv -f t Makefile
$MAKE check
test -f foo.trs
touch stamp
$sleep
touch bar.test
-RECHECK_LOGS= $MAKE -e check >stdout || { cat stdout; Exit 1; }
+RECHECK_LOGS= $MAKE -e check >stdout || { cat stdout; exit 1; }
cat stdout
test -r foo.trs
is_newest bar.trs bar.test
grep '^PASS: foo\.test' stdout
grep '^PASS: bar\.test' stdout
-grep 'baz\.test' stdout && Exit 1
+grep 'baz\.test' stdout && exit 1
# Also test that have only run before should be counted in the final
# testsuite summary.
grep '^# TOTAL: *3$' stdout
# by TESTS_ENVIRONMENT and AM_TESTS_ENVIRONMENT in LOG_COMPILER and
# LOG_FLAGS (for tests both with and without registered extensions).
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
# for this). The behaviour tested here is also documented in the manual.
am_serial_tests=yes
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<END
AC_SUBST([PERL], ['$PERL'])
# and the following CC:ed thread on bug-autoconf list:
# <http://lists.gnu.org/archive/html/bug-autoconf/2011-06/msg00002.html>
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
END
$AUTOMAKE -a
CONFIG_SHELL="$sh" $sh ./configure CONFIG_SHELL="$sh"
- VERBOSE=y $MAKE check >stdout || { cat stdout; Exit 1; }
+ VERBOSE=y $MAKE check >stdout || { cat stdout; exit 1; }
cat stdout
grep '[ /]foo\.test: foofoofoo$' stdout
grep '[ /]foo\.test: barbarbar$' stdout
grep '[ /]bar\.test: 8888$' stdout
grep '[ /]bar\.test: 9999$' stdout
- $EGREP '(foofoofoo|barbarbar|8888|9999)' foo.log && Exit 1
+ $EGREP '(foofoofoo|barbarbar|8888|9999)' foo.log && exit 1
: # For shells with buggy 'set -e'.
done
done
# "Simple Tests" testsuite driver: check TESTS_ENVIRONMENT support.
am_serial_tests=yes
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
./configure
FOO=bad TESTS_ENVIRONMENT='FOO=ok' $MAKE check
-FOO=ok TESTS_ENVIRONMENT='FOO=bad' $MAKE check && Exit 1
+FOO=ok TESTS_ENVIRONMENT='FOO=bad' $MAKE check && exit 1
:
# Check coloring of the testsuite summary.
-. ./defs-static || Exit 1
+. ./defs-static || exit 1
use_colors=yes
use_vpath=no
-. "$am_testauxdir"/testsuite-summary-checks.sh || Exit 99
+. "$am_testauxdir"/testsuite-summary-checks.sh || exit 99
./configure
# Incidentally, this test also checks that the testsuite summary doesn't
# give any bug-report address if it's not defined.
-. ./defs || Exit 1
+. ./defs || exit 1
for s in trivial-test-driver extract-testsuite-summary.pl; do
cp "$am_testauxdir/$s" . || fatal_ "failed to fetch auxiliary script $s"
$PERL extract-testsuite-summary.pl stdout > summary.got
cat summary.exp
cat summary.got
-diff summary.exp summary.got || Exit 1
+diff summary.exp summary.got || exit 1
:
# Check test counts in the testsuite summary.
-. ./defs-static || Exit 1
+. ./defs-static || exit 1
use_colors=no
use_vpath=no
-. "$am_testauxdir"/testsuite-summary-checks.sh || Exit 99
+. "$am_testauxdir"/testsuite-summary-checks.sh || exit 99
./configure
# Check that the global testsuite log file referenced in the testsuite
# summary and in the global testsuite log itself is correct.
-. ./defs || Exit 1
+. ./defs || exit 1
mv configure.ac configure.stub
../configure
-$MAKE check >stdout && { cat stdout; Exit 1; }
+$MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
grep '^See \./my_test_suite\.log$' stdout
mkdir bar
-TEST_SUITE_LOG=bar/bar.log $MAKE -e check >stdout && { cat stdout; Exit 1; }
+TEST_SUITE_LOG=bar/bar.log $MAKE -e check >stdout && { cat stdout; exit 1; }
cat stdout
grep '^See \./bar/bar\.log$' stdout
$AUTOMAKE
./configure
-$MAKE check >stdout && { cat stdout; Exit 1; }
+$MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
grep '^See sub/test-suite\.log$' stdout
cd sub
-$MAKE check >stdout && { cat stdout; Exit 1; }
+$MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
grep '^See sub/test-suite\.log$' stdout
cd ..
-TEST_SUITE_LOG=foo.log $MAKE -e check >stdout && { cat stdout; Exit 1; }
+TEST_SUITE_LOG=foo.log $MAKE -e check >stdout && { cat stdout; exit 1; }
cat stdout
grep '^See sub/foo\.log$' stdout
# Make sure that --program-transform works.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'END'
AC_PROG_CC
# collapsed.
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'END'
AC_PROG_CC
# stuff (in particular, pgklibdir, pkgdatadir and pkglibexecdir).
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac <<'END'
AC_INIT([foo], [1.0])
# Related to automake bug#11146.
required='makeinfo tex texi2dvi-o dvips'
-. ./defs || Exit 1
+. ./defs || exit 1
mkdir sub
$MAKE $fmt
ls -l . sub # For debugging.
ls -d foo* baz* sub/bar* > lst
- $EGREP -v '^(foo|sub/bar|baz)\.(texi|dvi|ps|pdf|html|info)$' lst && Exit 1
+ $EGREP -v '^(foo|sub/bar|baz)\.(texi|dvi|ps|pdf|html|info)$' lst && exit 1
$MAKE clean
done
# Test that automake complains properly when the files with unrecognized
# extensions are passed to the TEXINFOS primary.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
info_TEXINFOS = foobar.foo bazquux.tex zardoz.c
# Jim Meyering.
required=makeinfo
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
AC_OUTPUT
# Make sure dvi target recurses into subdir.
# Reported by Pavel Roskin.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
SUBDIRS = sub
# from Vincent Lefevre).
required='makeinfo tex texi2dvi-o'
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_OUTPUT >> configure.ac
# not in $(builddir).
required='makeinfo tex texi2dvi'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
# Make sure Automake uses the _first_ @setfilname it sees.
# Report from Karl Berry.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
info_TEXINFOS = texinfo.texi
$ACLOCAL
$AUTOMAKE --add-missing
-grep 'example' Makefile.in && Exit 1
+grep 'example' Makefile.in && exit 1
grep 'texinfo:' Makefile.in
# Test support for DJGPP's .iNN info files.
required=makeinfo
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_OUTPUT >> configure.ac
# Test to ensure that a ".info~" file doesn't end up in the
# distribution. Bug report from Greg McGary.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
# Make sure info files survive makeinfo errors.
required=makeinfo
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_OUTPUT >> configure.ac
END
# makeinfo will bail out, but we should conserve the old info files.
-$MAKE && Exit 1
+$MAKE && exit 1
test -f main
test -f main-1
# Restore main.texi, and break sub/main.texi.
cp main.texi sub/main.texi
mv main.old main.texi
-$MAKE && Exit 1
+$MAKE && exit 1
test -f main
test ! -f main-1
test -f sub/main
# install-DOC flavors.
required='makeinfo-html tex texi2dvi'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<\EOF
AC_CONFIG_FILES([rec/Makefile])
# Report from Tom Tromey.
required='makeinfo tex texi2dvi'
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << END
AC_INIT([$me], [1.0])
# (See also txinfo24.test and txinfo25.test).
required='makeinfo tex texi2dvi-o'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
# (See also txinfo23.test and txinfo25.test).
required='makeinfo tex texi2dvi-o'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
# (See also txinfo23.test and txinfo24.test).
required='makeinfo tex texi2dvi-o'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
# PR/408
required='makeinfo'
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_OUTPUT >> configure.ac
# Make sure install-info works even if no-installinfo is given.
required='makeinfo'
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_OUTPUT >> configure.ac
# Report from Ralf Corsepius.
required='makeinfo tex texi2dvi-o'
-. ./defs || Exit 1
+. ./defs || exit 1
# This setting, when honored by GNU ls, used to cause an infinite loop
# in mdate-sh.
# Make sure that INFO_DEPS can be overridden.
# Report from Bruce Korb.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
INFO_DEPS = foo.info
# Test to make sure .info-less @setfilename works.
required='makeinfo tex texi2dvi'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
# We should not use single suffix inference rules (with separate
# dependencies), this confuses Solaris make.
-grep '^\.texi:$' Makefile.in && Exit 1
+grep '^\.texi:$' Makefile.in && exit 1
grep 'textutils: *textutils\.texi' Makefile.in
./configure
# Make sure 'missing texinfo' does not create empty files.
# Report from Bob Proulx.
-. ./defs || Exit 1
+. ./defs || exit 1
echo info_TEXINFOS = bar.texi >Makefile.am
echo grepme >bar.info
# We should not create a missing bar.info.
rm -f bar.info
-$MAKE && Exit 1
+$MAKE && exit 1
test ! -f bar.info
:
# Make sure file extensions are matched correctly.
# Report from Eric Dorland.
-. ./defs || Exit 1
+. ./defs || exit 1
echo info_TEXINFOS = bar.texi >Makefile.am
cat >bar.texi <<EOF
# Make sure the documentation targets work as required with BSD make,
# even in the presence of subdirs (requires presence of default *-am rules).
-. ./defs || Exit 1
+. ./defs || exit 1
mkdir sub
cat >>configure.ac <<'END'
# Similar to txinfo25.test.
required='makeinfo tex texi2dvi-o dvips'
-. ./defs || Exit 1
+. ./defs || exit 1
mkdir sub
$MAKE mostlyclean
-ls *.aux && Exit 1
-ls sub/*.aux && Exit 1
+ls *.aux && exit 1
+ls sub/*.aux && exit 1
test -f main.dvi
test -f main.ps
# Make sure non-empty, non-info suffixes are diagnosed.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
info_TEXINFOS = textutils.texi
# See also sister test txinfo5b.test.
# Report from Ian Taylor.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_MAINTAINER_MODE
# See also sister test txinfo5.test.
# Report from Ian Taylor.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_MAINTAINER_MODE
# Test to make sure '.txi' extension works.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
info_TEXINFOS = foo.txi
# Test to make sure texinfo.tex correctly installed by -a. Bug report
# by Per Cederqvist.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
info_TEXINFOS = textutils.texi
# -a when we're using AC_CONFIG_AUX_DIR. Bug report by by Per
# Cederqvist.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << END
AC_INIT([$me], [1.0])
# Make sure we only create texinfo-related targets once.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
info_TEXINFOS = maude.texi liver.txi heart.texinfo
# tests for other primaries too? E.g., SCRIPTS, PROGRAMS, LISP, PYTHON,
# etc...
-. ./defs || Exit 1
+. ./defs || exit 1
mkdir d
: > d/f
: > $inst/share/foobar.txt
chmod a-w $inst/share
-$MAKE uninstall >output 2>&1 && { cat output; Exit 1; }
+$MAKE uninstall >output 2>&1 && { cat output; exit 1; }
cat output
if test $rm_f_is_silent_on_error = yes; then
: "rm -f" is silent on errors, skip the grepping of make output
chmod a-rwx $inst/share
(cd $inst/share) && skip_ "cannot make directories fully unreadable"
-$MAKE uninstall >output 2>&1 && { cat output; Exit 1; }
+$MAKE uninstall >output 2>&1 && { cat output; exit 1; }
cat output
#
# Some shells, like Solaris 10 /bin/sh and /bin/ksh, do not report
# need sister tests for other primaries too? E.g., PROGRAMS, LISP,
# PYTHON, etc...
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
rm -rf inst
$MAKE install-exec
-test -f inst/bin/foo || Exit 99 # Sanity check.
+test -f inst/bin/foo || exit 99 # Sanity check.
$MAKE uninstall
test ! -f inst/bin/foo
$MAKE install-data
-test -f inst/share/bar || Exit 99 # Sanity check.
+test -f inst/share/bar || exit 99 # Sanity check.
$MAKE uninstall
test ! -f inst/share/bar
rm -rf inst
$MAKE install-exec
-test -f inst/bin/foo || Exit 99 # Sanity check.
+test -f inst/bin/foo || exit 99 # Sanity check.
$MAKE uninstall
test ! -f inst/bin/foo
# Test for failing check for unused macros. From Johan Danielsson.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
MACRO_1
AC_DEFUN([MACRO_1_2_3], echo 123)
END
-$ACLOCAL 2>stderr || { cat stderr >&2; Exit 1; }
+$ACLOCAL 2>stderr || { cat stderr >&2; exit 1; }
cat stderr >&2
test ! -s stderr
# A simple Hello World for UPC.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AM_PROG_UPC
$AUTOMAKE
$AUTOCONF
-./configure || Exit $?
+./configure || exit $?
$MAKE distcheck
:
# Test that Automake suggests using AM_PROG_UPC if Unified Parallel C
# sources are used.
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_PROG_CC >>configure.ac
# Test that C and Unified Parallel C link safely.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
$AUTOMAKE
$AUTOCONF
-./configure || Exit $?
+./configure || exit $?
$MAKE distcheck
:
# Test to make sure compiling Vala code really works with recursive make.
required="pkg-config valac gcc GNUmake"
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# And use of vapi files to call C code from Vala.
required="valac cc pkg-config libtoolize GNUmake"
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Vala sources and C sources in the same program. Functional test.
required='valac cc GNUmake'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
AC_PROG_CC
# Remake rules are not uselessly triggered.
$MAKE -q
-$MAKE -n | $FGREP vala.stamp && Exit 1
+$MAKE -n | $FGREP vala.stamp && exit 1
# Check the distribution.
$MAKE distcheck
# behaviour w.r.t. intermediate C files is still unclear, and
# better left undefined for the moment).
$MAKE maintainer-clean
-ls *vala*.stamp | grep . && Exit 1
+ls *vala*.stamp | grep . && exit 1
:
# program. Functional test. See automake bug#10894.
required='valac cc c++ GNUmake'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
AC_PROG_CC
# Remake rules are not uselessly triggered.
$MAKE -q
-$MAKE -n | $FGREP vala.stamp && Exit 1
+$MAKE -n | $FGREP vala.stamp && exit 1
# But are triggered when they should.
for file in zardoz.vala foo.h bar.c baz.c zen.hh master.cxx; do
$sleep
echo '& choke me !' >> $file
- $MAKE && Exit 1
+ $MAKE && exit 1
$sleep
sed '$d' $file > t
mv -f t $file
# behaviour w.r.t. intermediate C files is still unclear, and
# better left undefined for the moment).
$MAKE maintainer-clean
-ls *vala*.stamp | grep . && Exit 1
+ls *vala*.stamp | grep . && exit 1
:
# Vala support with parallel make.
required='valac cc GNUmake'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
AC_PROG_CC
# Test and that vapi files are correctly handled by Vala support.
required='valac cc GNUmake'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
AC_PROG_CC
ls -l # For debugging.
cat zardoz.c # Likewise.
grep 'BARBAR' zardoz.c
-cross_compiling || $MAKE test1 || Exit 1
+cross_compiling || $MAKE test1 || exit 1
# Simple check on remake rules.
$sleep
echo '#define BAZBAZ "Quux!\n"' > foo.h
-sed 's/BARBAR/BAZBAZ/' zardoz.vala > t && mv -f t zardoz.vala || Exit 99
-$MAKE && Exit 1
-sed 's/BARBAR/BAZBAZ/' foo.vapi > t && mv -f t foo.vapi || Exit 99
+sed 's/BARBAR/BAZBAZ/' zardoz.vala > t && mv -f t zardoz.vala || exit 99
+$MAKE && exit 1
+sed 's/BARBAR/BAZBAZ/' foo.vapi > t && mv -f t foo.vapi || exit 99
$MAKE
cat zardoz.c # For debugging.
grep 'BAZBAZ' zardoz.c
-cross_compiling || $MAKE test2 || Exit 1
+cross_compiling || $MAKE test2 || exit 1
# Check the distribution.
$MAKE distcheck
# See automake bug#8753.
required="cc valac GNUmake"
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_CONFIG_SRCDIR([hello.vala])
# Rebuild rules are not uselessly triggered.
$MAKE -q
-$MAKE -n | grep '\.stamp' && Exit 1
+$MAKE -n | grep '\.stamp' && exit 1
# Cleanup rules work also in VPATH builds.
$MAKE clean
# Basic "grepping" test on vala support.
-. ./defs || Exit 1
+. ./defs || exit 1
# So that we won't require libtool macros.
cat > acinclude.m4 <<'END'
$FGREP 'zardoz-bar.c' Makefile.in
grep '\$(VALAC).* \$(AM_VALAFLAGS) \$(VALAFLAGS) ' sub/Makefile.in
-$FGREP 'foo_VALAFLAGS' sub/Makefile.in && Exit 1
+$FGREP 'foo_VALAFLAGS' sub/Makefile.in && exit 1
$FGREP 'am_foo_OBJECTS' sub/Makefile.in
$FGREP 'bar.c' sub/Makefile.in
$FGREP 'baz.c' sub/Makefile.in
# Check against regression for weird bug due to unescaped '@'
# characters used in a "..." perl string when writing the vala
# rules from automake.in.
-grep '\$[0-9][0-9]*t' Makefile.in sub/Makefile.in && Exit 1
+grep '\$[0-9][0-9]*t' Makefile.in sub/Makefile.in && exit 1
:
# Test to make sure compiling Vala code really works with recursive make.
required="pkg-config valac gcc GNUmake"
-. ./defs || Exit 1
+. ./defs || exit 1
mkdir src
$sleep
touch src/zardoz.vala
$MAKE
-grep 'am--error' src/zardoz.[ch] && Exit 1
+grep 'am--error' src/zardoz.[ch] && exit 1
# Check the distribution.
mv -f t ../src/zardoz.vala
$MAKE
grep 'FooBar!' ../src/zardoz.c
-grep 'Zardoz!' ../src/zardoz.c && Exit 1
+grep 'Zardoz!' ../src/zardoz.c && exit 1
:
# Test to make sure compiling Vala code really works with non-recursive make.
required="pkg-config valac gcc GNUmake"
-. ./defs || Exit 1
+. ./defs || exit 1
mkdir src
# Test AM_PROG_VALAC.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
$AUTOMAKE -a
$AUTOCONF
-# The "|| Exit 1" is required here even if 'set -e' is active,
-# because ./configure migt exit with status 77, and in that case
+# The "|| exit 1" is required here even if 'set -e' is active,
+# because ./configure might exit with status 77, and in that case
# we want to FAIL, not to SKIP.
-./configure "VALAC=$cwd/valac" || Exit 1
+./configure "VALAC=$cwd/valac" || exit 1
sed 's/AM_PROG_VALAC.*/AM_PROG_VALAC([9999.9])/' < configure.ac >t
mv -f t configure.ac
$AUTOCONF --force
st=0; ./configure "VALAC=$cwd/valac" || st=$?
-test $st -eq 77 || Exit 1
+test $st -eq 77 || exit 1
sed 's/AM_PROG_VALAC.*/AM_PROG_VALAC([1.2.3])/' < configure.ac >t
mv -f t configure.ac
$AUTOCONF --force
-# See comments above for why "|| Exit 1" is needed.
-./configure "VALAC=$cwd/valac" || Exit 1
+# See comments above for why "|| exit 1" is needed.
+./configure "VALAC=$cwd/valac" || exit 1
:
# Test per-target flags.
required="pkg-config valac gcc GNUmake"
-. ./defs || Exit 1
+. ./defs || exit 1
mkdir src
# Test various variable definitions that include an '=' sign.
# From Raja R Harinath.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
MY_FLAGS_1=-DABC=345
# Check that Automake warns about variables containing spaces
# and other non-POSIX characters.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >Makefile.am <<'EOF'
L01 = $(shell echo *)
$ACLOCAL
# Make sure this warning is print in the 'portability' category.
$AUTOMAKE --warnings=no-error,none,portability 2>stderr \
- || { cat stderr >&2; Exit 1; }
+ || { cat stderr >&2; exit 1; }
cat stderr >&2
# Lines number are printed in error message.
# Use them to make sure errors are diagnosed against the right lines.
# No error expected apart from those on these lines.
-grep -v '^Makefile\.am:[145789]:' stderr | grep . && Exit 1
+grep -v '^Makefile\.am:[145789]:' stderr | grep . && exit 1
# Now check some individual values.
grep ':1:.*shell echo' stderr
-grep 'nextvariableisbad' stderr && Exit 1
+grep 'nextvariableisbad' stderr && exit 1
grep ':4:.*addsuffix' stderr
grep ':5:.*bad boy' stderr
grep ':7:.*three errors' stderr
grep ':8:.*wildcard' stderr
grep ':9:.*another Error' stderr
-$EGREP 'ok|thisis|here' stderr && Exit 1
+$EGREP 'ok|thisis|here' stderr && exit 1
# None of these errors be diagnosed with '-Wno-portability'.
$AUTOMAKE -Wno-portability
# Targets and macros are two different name spaces.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
install = install
# Libtool variant.
required=libtoolize
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'END'
AM_PROG_AR
# Makefile.am:5: warning: variable 'libfoo_la_DEPENDENCIES' is defined but no program or
# Makefile.am:5: library has 'libfoo_la' as canonical name (possible typo)
-grep 'as canonical' stderr | grep -v ' .libfoo_la. ' && Exit 1
+grep 'as canonical' stderr | grep -v ' .libfoo_la. ' && exit 1
test $(grep -c 'variable.*is defined but' stderr) -eq 6
# If we add a global -Wnone, all warnings should disappear.
# Make sure we warn about possible variable typos when we should.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'END'
AC_PROG_RANLIB
# Makefile.am:13: library has 'libfoo_a' as canonical name (possible typo)
grep 'as canonical' stderr | grep -v ' .foo. ' | grep -v ' .libfoo_a. ' \
- && Exit 1
+ && exit 1
test $(grep -c 'variable.*is defined but' stderr) -eq 13
# If we add a global -Wnone, all warnings should disappear.
# Test to make sure [...] is ok in version number. Report from Jim
# Meyering.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << 'END'
AC_INIT
# Test to make sure 3rd arg to AM_INIT_AUTOMAKE not picked up in
# version. From Joel Weber.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > configure.ac << 'END'
AC_INIT
# Test to make sure version in AUTOMAKE_OPTIONS works.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = 9.9x
# Test to make sure we are compatible with the 1.4-p1 series.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = 1.4-p3
# Make sure the current version can be required.
-. ./defs || Exit 1
+. ./defs || exit 1
amver=$($AUTOMAKE --version | sed -e 's/.* //;1q')
# changes -- we don't support this feature on non-GNU Makes).
required='makeinfo tex texi2dvi'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >configure.ac <<END
m4_include([version.m4])
# Calling AM_AUTOMAKE_VERSION by hand is a bug.
-. ./defs || Exit 1
+. ./defs || exit 1
echo 'AM_AUTOMAKE_VERSION([1.9])' >>configure.ac
-$ACLOCAL 2>stderr && { cat stderr >&2; Exit 0; }
+$ACLOCAL 2>stderr && { cat stderr >&2; exit 0; }
cat stderr >&2
$FGREP 'AM_INIT_AUTOMAKE([1.9])' stderr
# Test to make sure VPATH can be overridden.
# Report from Anthony Green.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
VPATH = zardoz
grep VPATH Makefile.in # For debugging.
grep '^VPATH = zardoz$' Makefile.in
-grep 'VPATH.*@srcdir@' Makefile.in && Exit 1
+grep 'VPATH.*@srcdir@' Makefile.in && exit 1
:
# Basic checks and some regressions testing on 'version.texi'
# support for texinfo files.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
info_TEXINFOS = textutils.texi
# etc. once led to '\$\(srcdir\)/mdate-sh'.
# Filter out '$(srcdir)/mdate-sh'; there should be no occurrences
# of '.../mdate-sh' left then.
-sed 's,\$(srcdir)/mdate-sh,,g' Makefile.in | grep '/mdate-sh' && Exit 1
+sed 's,\$(srcdir)/mdate-sh,,g' Makefile.in | grep '/mdate-sh' && exit 1
:
# version.texi gets listed as a dependency for the .info file but
# not the .dvi file.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
info_TEXINFOS = zardoz.texi
# See also the related test 'vtexi4.test', which does similar checks, but
# for version.texi only, and requires makeinfo, tex and texi2dvi.
-. ./defs || Exit 1
+. ./defs || exit 1
# We are going to override package version in AC_INIT, so we need
# to redefine the name of the distdir as well.
# texi2dvi.
required='makeinfo tex texi2dvi-o grep-nonprint'
-. ./defs || Exit 1
+. ./defs || exit 1
test $(LC_ALL=C date '+%u') -gt 0 && test $(LC_ALL=C date '+%u') -lt 8 \
&& day=$(LC_ALL=C date '+%d') && test -n "$day" \
# levels are "catch-all warnings" (such as '-Wall' and '-Wnone').
# Since we are at it, also throw in *.am and *.m4 file inclusions.
-. ./defs || Exit 1
+. ./defs || exit 1
# We want complete control over automake options.
AUTOMAKE=$am_original_AUTOMAKE
# been in place for quite a long time); see also Automake bug #7673.
# Update this test if the semantics are changed.
-. ./defs || Exit 1
+. ./defs || exit 1
# We want (almost) complete control over automake options.
AUTOMAKE="$am_original_AUTOMAKE -Werror"
# warnings specified later should take precedence over those specified
# earlier.
-. ./defs || Exit 1
+. ./defs || exit 1
# We want (almost) complete control over automake options.
AUTOMAKE="$am_original_AUTOMAKE -Werror"
# in AUTOMAKE_OPTIONS take precedence over explicit warnings given in
# AM_INIT_AUTOMAKE.
-. ./defs || Exit 1
+. ./defs || exit 1
# We want (almost) complete control over automake options.
AUTOMAKE="$am_original_AUTOMAKE -Werror"
# Check that automake complains about unknown warnings.
-. ./defs || Exit 1
+. ./defs || exit 1
# We want (almost) complete control over automake options.
AUTOMAKE="$am_original_AUTOMAKE --foreign -Werror"
# Check that, on the command line, explicitly-defined warnings take
# precedence over implicit strictness-implied warnings.
-. ./defs || Exit 1
+. ./defs || exit 1
# We want complete control over automake options.
AUTOMAKE=$am_original_AUTOMAKE
# Make sure that we can enable or disable warnings on a per-file basis.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<END
AC_CONFIG_FILES([sub/Makefile])
# sub/Makefile.am:2: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS'
grep '^Makefile.am:.*foo_SOURCES' stderr
grep '^sub/Makefile.am:.*INCLUDES' stderr
-grep '^sub/Makefile.am:.*foo_SOURCES' stderr && Exit 1
-grep '^Makefile.am:.*INCLUDES' stderr && Exit 1
+grep '^sub/Makefile.am:.*foo_SOURCES' stderr && exit 1
+grep '^Makefile.am:.*INCLUDES' stderr && exit 1
# Only three lines of warnings.
test $(grep -v 'warnings are treated as errors' stderr | wc -l) -eq 3
# Test to make sure -Werror and --add-missing work together.
-. ./defs || Exit 1
+. ./defs || exit 1
: > Makefile.am
# succeed if make is run a second time immediately afterwards.
# Report from Harlan Stenn.
-. ./defs || Exit 1
+. ./defs || exit 1
echo AC_OUTPUT>>configure.ac
END
# This repetition is deliberate; see heading comments.
-$MAKE && Exit 1
-$MAKE && Exit 1
+$MAKE && exit 1
+$MAKE && exit 1
:
# Make sure a per-Makefile.am -Werror setting is not carried over
# to another Makefile.am.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<\END
AC_CONFIG_FILES([sub/Makefile])
# -Werror and local -Werror settings should be flagged for the user.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<\END
AC_CONFIG_FILES([sub/Makefile])
AUTOMAKE_run -Wno-error
grep 'VAR multiply defined' stderr
grep 'SUB multiply defined' stderr
-grep 'warnings are treated as errors' stderr && Exit 1
+grep 'warnings are treated as errors' stderr && exit 1
:
# from Johan Danielsson (and a very nice bug report, too, I might
# add).
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
WHO_AM_I=17
# Test to make sure multiple source files with the same object
# file causes error.
-. ./defs || Exit 1
+. ./defs || exit 1
cat > Makefile.am << 'END'
bin_PROGRAMS = zardoz
# Test to make sure ylwrap is put in right location.
# Report from Tim Van Holder.
-. ./defs || Exit 1
+. ./defs || exit 1
mkdir aux1 sub
# Keep in sync with sister test 'yacc-cxx.test'.
required='cc yacc'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
if ! cross_compiling; then
echo a | ./foo
- echo b | ./foo && Exit 1
+ echo b | ./foo && exit 1
echo a | ./bar
- echo b | ./bar && Exit 1
+ echo b | ./bar && exit 1
: For shells with busted 'set -e'.
fi
# For Automake bug#7648 and PR automake/491.
required='c++ bison'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CXX
# For Automake bug#7648 and PR automake/491.
required='cc bison'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# See also sister test 'yacc-clean.test'.
required='c++ yacc'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CXX
# See also sister test 'yacc-cxx-clean.test'.
required='cc yacc'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Keep in sync with sister test 'yacc-basic.test'.
required='c++ yacc'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CXX
if ! cross_compiling; then
for i in 1 2 3 4; do
echo a | ./foo$i
- echo b | ./foo$i && Exit 1
+ echo b | ./foo$i && exit 1
: For shells with busted 'set -e'.
done
fi
# Keep in sync with sister test 'yacc-d-cxx.test'.
required='cc yacc'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
$AUTOCONF
$AUTOMAKE -a
-$FGREP parse.h foo/Makefile.in bar/Makefile.in baz/Makefile.in && Exit 1
+$FGREP parse.h foo/Makefile.in bar/Makefile.in baz/Makefile.in && exit 1
cat >> foo/Makefile.am <<END
BUILT_SOURCES = parse.h
# Keep in sync with sister test 'yacc-d-basic.test'.
required='c++ yacc'
-. ./defs || Exit 1
+. ./defs || exit 1
write_parse ()
{
# Please keep this in sync with sister test 'yaccvpath.test'.
required='cc yacc'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Tests that we can recover from deleted headers generated by 'yacc -d'.
required='cc yacc'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Report from Paolo Bonzini.
required='cc yacc'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# with NetBSD make).
required='cc yacc'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Exposes automake bug#8485.
required='cc yacc'
-. ./defs || Exit 1
+. ./defs || exit 1
# This test is bounded to fail for any implementation that
# triggers automake bug#7884.
# extractors, to improve coverage.
../configure --enable-dependency-tracking YACC=false
$MAKE
-ls -l sub/*.[ch] && Exit 1
+ls -l sub/*.[ch] && exit 1
env DISTCHECK_CONFIGURE_FLAGS='YACC=false' $MAKE distcheck
# See automake bug#7884.
required='cc yacc'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
mkdir build2
cd build2
../$distdir/configure
-$MAKE >out 2>&1 && { cat out; Exit 1; }
+$MAKE >out 2>&1 && { cat out; exit 1; }
cat out
$FGREP parse.c out
# See also sister test 'lex-line.test'.
required='cc yacc'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_CONFIG_FILES([sub/Makefile])
$EGREP 'line|\.y' $c_outputs
# Adjusted "#line" should not contain reference to the builddir.
- grep '#.*line.*build.*\.y' $c_outputs && Exit 1
+ grep '#.*line.*build.*\.y' $c_outputs && exit 1
# Adjusted "#line" should not contain reference to the absolute
# srcdir.
- $EGREP '#.*line *"?/.*\.y' $c_outputs && Exit 1
+ $EGREP '#.*line *"?/.*\.y' $c_outputs && exit 1
# Adjusted "#line" should not contain reference to the default
# output file names, e.g., 'y.tab.c' and 'y.tab.h'.
- grep '#.*line.*y\.tab\.' $c_outputs && Exit 1
+ grep '#.*line.*y\.tab\.' $c_outputs && exit 1
# Look out for a silly regression.
- grep "#.*\.y.*\.y" $c_outputs && Exit 1
+ grep "#.*\.y.*\.y" $c_outputs && exit 1
if $vpath; then
grep '#.*line.*"\.\./zardoz\.y"' zardoz.c
grep '#.*line.*"\.\./dir/quux\.y"' bar-quux.c
# in the same directory.
required='cc c++ yacc'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
esac
else
echo "$me: invalid value of \$try '$try'" >&2
- Exit 99
+ exit 99
fi
$srcdir/configure
# for lex-generated .c files.
required='cc yacc'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# for lex-generated C files.
required='cc yacc'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'EOF'
AM_MAINTAINER_MODE
# Check that yacc sources with many dots in their name are handled
# correctly.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Test to make sure intermediate .c file is built from yacc source.
# Bug from Thomas Morgan.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# if (AM_)?YFLAGS do not contain -d. Requested by Jim Meyering.
# See also the related semantic test 'yacc-d-basic.test'.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
$AUTOMAKE -a
# If zardoz.h IS mentioned, fail.
-$FGREP 'zardoz.h' Makefile.in && Exit 1
+$FGREP 'zardoz.h' Makefile.in && exit 1
cp Makefile.src Makefile.am
echo 'AM_YFLAGS = -d' >> Makefile.am
echo 'AM_YFLAGS = ' >> Makefile.am
$AUTOMAKE
# If zardoz.h IS mentioned, fail.
-$FGREP 'zardoz.h' Makefile.in && Exit 1
+$FGREP 'zardoz.h' Makefile.in && exit 1
cp Makefile.src Makefile.am
echo 'YFLAGS = -d' >> Makefile.am
echo 'YFLAGS = ' >> Makefile.am
$AUTOMAKE -Wno-gnu
# If zardoz.h IS mentioned, fail.
-$FGREP 'zardoz.h' Makefile.in && Exit 1
+$FGREP 'zardoz.h' Makefile.in && exit 1
:
# Some simple tests of ylwrap functionality.
required='cc yacc'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
../configure
$MAKE
-grep '^#.*/sub/\.\./' bar.c && Exit 1
-grep '^#.*/sub/\.\./' parse.c && Exit 1
+grep '^#.*/sub/\.\./' bar.c && exit 1
+grep '^#.*/sub/\.\./' parse.c && exit 1
# Make distclean must not erase bar.c nor parse.c (by GNU standards) ...
$MAKE distclean
# Test of yacc functionality, derived from GNU binutils
# by Tim Van Holder.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# No rule needed, the default .y.c: inference rule is enough
# (but there may be an additional dependency on a dirstamp file).
-grep '^sub/maude\.c:.*maude\.y' Makefile.in && Exit 1
+grep '^sub/maude\.c:.*maude\.y' Makefile.in && exit 1
## Try again with per-exe flags.
$AUTOMAKE -a
# Rule should use maude_YFLAGS.
-grep 'AM_YFLAGS.*maude' Makefile.in && Exit 1
+grep 'AM_YFLAGS.*maude' Makefile.in && exit 1
# Silly regression.
-grep 'maudec' Makefile.in && Exit 1
+grep 'maudec' Makefile.in && exit 1
# Make sure the .o file is required.
grep '^am_maude_OBJECTS.*maude' Makefile.in
# PR/47.
required='cc yacc'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
test -f foo.h
# Make sure '#line ... y.tab.h' gets replaced.
-$FGREP 'y.tab.h' foo.h && Exit 1
+$FGREP 'y.tab.h' foo.h && exit 1
# Make distclean must not erase foo.c nor foo.h (by GNU standards) ...
$MAKE foo.c
required='cc yacc'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# Removal recovery rules for headers should not remove files with 'make -n'.
required='cc yacc'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# which does much more in-depth checks (but requires an actual
# Yacc program and a working C++ compiler).
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CXX
$EGREP '(\.[ch]|foo|bar|baz|qux)' Makefile.in # For debugging.
-$EGREP '(foo|bar|baz|qux)\.h' Makefile.in && Exit 1
+$EGREP '(foo|bar|baz|qux)\.h' Makefile.in && exit 1
sed -e 's/^/ /' -e 's/$/ /' Makefile.in >mk
$EGREP '(^| )bar\.hpp(:| .*:)' Makefile.in
$EGREP '(^| )baz\.hh(:| .*:)' Makefile.in
-grep ' foo\.h[ :]' mk && Exit 1
-grep ' bar\.h[ :]' mk && Exit 1
-grep ' baz\.h[ :]' mk && Exit 1
+grep ' foo\.h[ :]' mk && exit 1
+grep ' bar\.h[ :]' mk && exit 1
+grep ' baz\.h[ :]' mk && exit 1
$FGREP ' qux-qux.cxx ' mk
$EGREP '(^| )qux-qux\.cxx(:| .*:)' Makefile.in
-grep 'qux\.h.*:' Makefile.in && Exit 1
+grep 'qux\.h.*:' Makefile.in && exit 1
:
# Please keep this in sync with sister test 'yacc-d-vpath.test'.
required='cc yacc'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
# at configure time and/or at make time.
required='cc yacc'
-. ./defs || Exit 1
+. ./defs || exit 1
unset YFLAGS || :
# Check that automake complains about *_YFLAGS variables which have
# conditional content.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
AC_PROG_CC
AUTOMAKE_fails -Wno-gnu Makefile5
grep -v '^Makefile5\.am:.*zardoz_YFLAGS' stderr \
| grep -v ': warnings are treated as errors' \
- | grep . && Exit 1
+ | grep . && exit 1
# Disable 'gnu' warnings because we override the user variable 'YFLAGS'.
$AUTOMAKE -Wno-gnu Makefile6
# Check for false positives in automake recognition of '-d' in YFLAGS.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
AC_PROG_CC
END
$AUTOMAKE -a
-$EGREP '(foobar|zardoz)\.h.*:' Makefile.in && Exit 1
-$EGREP '(foobar|zardoz)\.h' Makefile.in | $FGREP -v '$(YLWRAP) ' && Exit 1
+$EGREP '(foobar|zardoz)\.h.*:' Makefile.in && exit 1
+$EGREP '(foobar|zardoz)\.h' Makefile.in | $FGREP -v '$(YLWRAP) ' && exit 1
:
# Check that the user can force automake to use *_YFLAGS variables
# which have conditional content.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
AC_SUBST([CC], [false])
$FGREP ' __am_cond_yes__ ' foo.c
$FGREP ' __bar_cond_yes__ ' bar-foo.c
-$FGREP 'cond_no' foo.c bar-foo.c && Exit 1
+$FGREP 'cond_no' foo.c bar-foo.c && exit 1
$MAKE maintainer-clean
ls -l
$FGREP ' __am_cond_no__ ' foo.c
$FGREP ' __bar_cond_no__ ' bar-foo.c
-$FGREP 'cond_yes' foo.c bar-foo.c && Exit 1
+$FGREP 'cond_yes' foo.c bar-foo.c && exit 1
:
# variable is user-reserved).
required='cc yacc'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
AC_PROG_CC
# foo_flags = -d
# AM_YFLAGS = $(foo_flags)
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac <<'END'
AC_PROG_CC
# Please keep this in sync with the sister tests yflags2.test, lflags.test
# and lflags2.test.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >fake-yacc <<'END'
#!/bin/sh
$ACLOCAL
$AUTOMAKE -a
-grep '\$(YFLAGS).*\$(bar_YFLAGS)' Makefile.in && Exit 1
-grep '\$(YFLAGS).*\$(AM_YFLAGS)' Makefile.in && Exit 1
+grep '\$(YFLAGS).*\$(bar_YFLAGS)' Makefile.in && exit 1
+grep '\$(YFLAGS).*\$(AM_YFLAGS)' Makefile.in && exit 1
: > foo.y
: > bar.y
# Please keep this in sync with the sister tests yflags.test, lflags.test
# and lflags2.test.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >fake-yacc <<'END'
#!/bin/sh
$ACLOCAL
$AUTOMAKE -a
-grep '\$(YFLAGS).*\$(bar_YFLAGS)' Makefile.in && Exit 1
-grep '\$(YFLAGS).*\$(AM_YFLAGS)' Makefile.in && Exit 1
+grep '\$(YFLAGS).*\$(bar_YFLAGS)' Makefile.in && exit 1
+grep '\$(YFLAGS).*\$(AM_YFLAGS)' Makefile.in && exit 1
: > foo.yy
: > bar.y++