From: Stefano Lattarini Date: Sat, 30 Jun 2012 21:26:17 +0000 (+0200) Subject: maintcheck: test scripts should be executable, check for that X-Git-Tag: v1.12.2~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc5aff42f44ea05041498679318e325f6dcbcf30;p=thirdparty%2Fautomake.git maintcheck: test scripts should be executable, check for that * 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 --- diff --git a/Makefile.am b/Makefile.am index 9d5815514..b74572133 100644 --- a/Makefile.am +++ b/Makefile.am @@ -613,11 +613,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. ## diff --git a/syntax-checks.mk b/syntax-checks.mk index 3bbc4dae7..3b209115c 100644 --- a/syntax-checks.mk +++ b/syntax-checks.mk @@ -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 \ @@ -446,6 +447,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.