exit 1; \
fi
-# Ensure tests are world-executable.
-# FIXME: this should be turned into a maintainer check...
-dist-hook:
- $(am__cd) $(distdir)/t && chmod a+rx *.sh *.tap
-
## --------------------------- ##
## Perl coverage statistics. ##
## ------------------------------------------ ##
check-TESTS:
- list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
- list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
+ @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
+ @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
## We always have to remove $(TEST_SUITE_LOG), to ensure its rule is run
## in any case even in lazy mode: otherwise, if no test needs rerunning,
## or a prior run plus reruns all happen within the same timestamp (can
sc_tests_overriding_macros_on_cmdline \
sc_tests_plain_sleep \
sc_tests_ls_t \
+sc_tests_executable \
sc_m4_am_plain_egrep_fgrep \
sc_tests_no_configure_in \
sc_tests_PATH_SEPARATOR \
exit 1; \
fi
+## Test scripts must be executable.
+sc_tests_executable:
+ @st=0; \
+ for f in $(xtests); do \
+ case $$f in \
+ t/ax/*|./t/ax/*|$(srcdir)/t/ax/*);; \
+ *) test -x $$f || { echo "$$f: not executable" >&2; st=1; }; \
+ esac; \
+ done; \
+ test $$st -eq 0 || echo '$@: some test scripts are not executable' >&2; \
+ exit $$st;
+
+
## Never use 'sleep 1' to create files with different timestamps.
## Use '$sleep' instead. Some filesystems (e.g., Windows) have only
## a 2sec resolution.
# failures for the test cases. See automake bug#11791.
required='cc native'
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
./configure
-$MAKE check >stdout && { cat stdout; Exit 1; }
+$MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=1 pass=0 fail=1 xpass=0 xfail=0 skip=0 error=0
-$MAKE -k recheck >stdout && { cat stdout; Exit 1; }
+$MAKE -k recheck >stdout && { cat stdout; exit 1; }
cat stdout
count_test_results total=1 pass=0 fail=1 xpass=0 xfail=0 skip=0 error=0
$sleep
echo choke me >> foo.c
-$MAKE recheck >stdout && { cat stdout; Exit 1; }
+$MAKE recheck >stdout && { cat stdout; exit 1; }
cat stdout
# We don't get a change to run the testsuite.
-$EGREP '(X?PASS|X?FAIL|SKIP|ERROR):' stdout && Exit 1
+$EGREP '(X?PASS|X?FAIL|SKIP|ERROR):' stdout && exit 1
# These shouldn't be removed, otherwise the next make recheck will do
# nothing.
test -f foo.log
st=0; $MAKE -k recheck >stdout || st=$?
cat stdout
# Don't trust the exit status of "make -k" for non-GNU makes.
-if using_gmake && test $st -eq 0; then Exit 1; fi
+if using_gmake && test $st -eq 0; then exit 1; fi
# We don't get a change to run the testsuite.
-$EGREP '(X?PASS|X?FAIL|SKIP|ERROR):' stdout && Exit 1
+$EGREP '(X?PASS|X?FAIL|SKIP|ERROR):' stdout && exit 1
test -f foo.log
test -f foo.trs
$sleep
echo 'int main (void) { return 0; }' > foo.c
-$MAKE recheck >stdout || { cat stdout; Exit 1; }
+$MAKE recheck >stdout || { cat stdout; exit 1; }
cat stdout
count_test_results total=1 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=0
test -f foo.log
test -f foo.trs
-$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 -f foo.log