Merge branch 'maint'
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 1 Jul 2012 08:14:23 +0000 (10:14 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 1 Jul 2012 08:14:23 +0000 (10:14 +0200)
* maint:
  parallel-tests: silence an overly verbose recipe
  tests: fix some uses of 'Exit', where 'exit' should now be used instead
  maintcheck: test scripts should be executable, check for that

Makefile.am
lib/am/check.am
syntax-checks.mk
t/parallel-tests-recheck-pr11791.sh

index 9e5512e..3ee0777 100644 (file)
@@ -607,11 +607,6 @@ ChangeLog: am--changelog-regen-hook
          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.  ##
index f091114..da71923 100644 (file)
@@ -397,8 +397,8 @@ RECHECK_LOGS = $(TEST_LOGS)
 ## ------------------------------------------ ##
 
 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
index 71d9ff2..052547c 100644 (file)
@@ -65,6 +65,7 @@ sc_tests_required_after_defs \
 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 \
@@ -396,6 +397,19 @@ sc_tests_ls_t:
          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.
index bfc55fa..2cb18cf 100755 (executable)
@@ -18,7 +18,7 @@
 # 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
@@ -38,11 +38,11 @@ $AUTOMAKE -a
 
 ./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
 
@@ -50,10 +50,10 @@ 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
@@ -62,9 +62,9 @@ test -f foo.trs
 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
 
@@ -72,13 +72,13 @@ 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