* syntax-checks.mk (sc_tests_executable): Here, in this new check.
(syntax_check_rules): Add it.
* Makefile.am (dist-hook): Drop, no need to make test cases executable
anymore.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
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. ##
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.