tests: ensure that each test script is executable

This adds a rule run at "make check" time to ensure that
test scripts are consistently executable.
This change is not required for "make check", but makes it easier
for people to run scripts manually, but that is discouraged because
doing so makes it easy to omit important variable settings that
are normally provided via TESTS_ENVIRONMENT.
This change also makes each of the existing TESTS executable.
* tests/Makefile.am (check_executable_TESTS): New rule.
(check): Depend on it.
* tests/{all_scripts}: chmod 755.
Prompted by a report from Eric Blake.
This commit is contained in:
Jim Meyering 2011-06-21 17:45:11 +02:00
parent 5f7848a0dc
commit 8a54f20312
37 changed files with 11 additions and 0 deletions

View File

@ -129,3 +129,14 @@ TESTS_ENVIRONMENT = \
; $(SHELL) 9>&2
VERBOSE = yes
check: check_executable_TESTS
.PHONY: check_executable_TESTS
check_executable_TESTS: Makefile
$(AM_V_GEN)fail=0; \
cd $(srcdir) && for i in $(TESTS); do \
test -x $$i || { fail=1; echo $$i >&2; }; \
done; \
test $$fail = 1 \
&& { echo the above test scripts are not executable >&2; exit 1; } \
|| :

0
tests/backref Normal file → Executable file
View File

0
tests/backref-multibyte-slow Normal file → Executable file
View File

0
tests/backref-word Normal file → Executable file
View File

0
tests/bogus-wctob Normal file → Executable file
View File

0
tests/bre Normal file → Executable file
View File

0
tests/case-fold-backref Normal file → Executable file
View File

0
tests/case-fold-char-class Normal file → Executable file
View File

0
tests/case-fold-char-range Normal file → Executable file
View File

0
tests/case-fold-char-type Normal file → Executable file
View File

0
tests/char-class-multibyte Normal file → Executable file
View File

0
tests/dfaexec-multibyte Normal file → Executable file
View File

0
tests/equiv-classes Normal file → Executable file
View File

0
tests/ere Normal file → Executable file
View File

0
tests/euc-mb Normal file → Executable file
View File

0
tests/fedora Normal file → Executable file
View File

0
tests/fgrep-infloop Normal file → Executable file
View File

0
tests/file Normal file → Executable file
View File

0
tests/grep-dev-null Normal file → Executable file
View File

0
tests/grep-dir Normal file → Executable file
View File

0
tests/high-bit-range Normal file → Executable file
View File

0
tests/ignore-mmap Normal file → Executable file
View File

0
tests/include-exclude Normal file → Executable file
View File

0
tests/inconsistent-range Normal file → Executable file
View File

0
tests/khadafy Normal file → Executable file
View File

0
tests/options Normal file → Executable file
View File

0
tests/pcre Normal file → Executable file
View File

0
tests/prefix-of-multibyte Normal file → Executable file
View File

0
tests/reversed-range-endpoints Normal file → Executable file
View File

0
tests/sjis-mb Normal file → Executable file
View File

0
tests/spencer1 Normal file → Executable file
View File

0
tests/status Normal file → Executable file
View File

0
tests/unibyte-bracket-expr Normal file → Executable file
View File

0
tests/warn-char-classes Normal file → Executable file
View File

0
tests/word-delim-multibyte Normal file → Executable file
View File

0
tests/word-multi-file Normal file → Executable file
View File

0
tests/yesno Normal file → Executable file
View File