summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2011-06-21 17:45:11 +0200
committerJim Meyering <meyering@redhat.com>2011-06-21 19:16:14 +0200
commit8a54f203127575f11b9a809e002aba22a365aebe (patch)
treea9b330474621fd7009cba7779a67ba6d52267c03
parent5f7848a0dc89b30b15e3a76a8d53d43d4f746a36 (diff)
downloadgrep-8a54f203127575f11b9a809e002aba22a365aebe.tar.gz
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.
-rw-r--r--tests/Makefile.am11
-rwxr-xr-x[-rw-r--r--]tests/backref0
-rwxr-xr-x[-rw-r--r--]tests/backref-multibyte-slow0
-rwxr-xr-x[-rw-r--r--]tests/backref-word0
-rwxr-xr-x[-rw-r--r--]tests/bogus-wctob0
-rwxr-xr-x[-rw-r--r--]tests/bre0
-rwxr-xr-x[-rw-r--r--]tests/case-fold-backref0
-rwxr-xr-x[-rw-r--r--]tests/case-fold-char-class0
-rwxr-xr-x[-rw-r--r--]tests/case-fold-char-range0
-rwxr-xr-x[-rw-r--r--]tests/case-fold-char-type0
-rwxr-xr-x[-rw-r--r--]tests/char-class-multibyte0
-rwxr-xr-x[-rw-r--r--]tests/dfaexec-multibyte0
-rwxr-xr-x[-rw-r--r--]tests/equiv-classes0
-rwxr-xr-x[-rw-r--r--]tests/ere0
-rwxr-xr-x[-rw-r--r--]tests/euc-mb0
-rwxr-xr-x[-rw-r--r--]tests/fedora0
-rwxr-xr-x[-rw-r--r--]tests/fgrep-infloop0
-rwxr-xr-x[-rw-r--r--]tests/file0
-rwxr-xr-x[-rw-r--r--]tests/grep-dev-null0
-rwxr-xr-x[-rw-r--r--]tests/grep-dir0
-rwxr-xr-x[-rw-r--r--]tests/high-bit-range0
-rwxr-xr-x[-rw-r--r--]tests/ignore-mmap0
-rwxr-xr-x[-rw-r--r--]tests/include-exclude0
-rwxr-xr-x[-rw-r--r--]tests/inconsistent-range0
-rwxr-xr-x[-rw-r--r--]tests/khadafy0
-rwxr-xr-x[-rw-r--r--]tests/options0
-rwxr-xr-x[-rw-r--r--]tests/pcre0
-rwxr-xr-x[-rw-r--r--]tests/prefix-of-multibyte0
-rwxr-xr-x[-rw-r--r--]tests/reversed-range-endpoints0
-rwxr-xr-x[-rw-r--r--]tests/sjis-mb0
-rwxr-xr-x[-rw-r--r--]tests/spencer10
-rwxr-xr-x[-rw-r--r--]tests/status0
-rwxr-xr-x[-rw-r--r--]tests/unibyte-bracket-expr0
-rwxr-xr-x[-rw-r--r--]tests/warn-char-classes0
-rwxr-xr-x[-rw-r--r--]tests/word-delim-multibyte0
-rwxr-xr-x[-rw-r--r--]tests/word-multi-file0
-rwxr-xr-x[-rw-r--r--]tests/yesno0
37 files changed, 11 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 6829d303..a3a0f33a 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -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; } \
+ || :
diff --git a/tests/backref b/tests/backref
index 5f39b27b..5f39b27b 100644..100755
--- a/tests/backref
+++ b/tests/backref
diff --git a/tests/backref-multibyte-slow b/tests/backref-multibyte-slow
index ffebb6b2..ffebb6b2 100644..100755
--- a/tests/backref-multibyte-slow
+++ b/tests/backref-multibyte-slow
diff --git a/tests/backref-word b/tests/backref-word
index adf6a100..adf6a100 100644..100755
--- a/tests/backref-word
+++ b/tests/backref-word
diff --git a/tests/bogus-wctob b/tests/bogus-wctob
index 6be6c397..6be6c397 100644..100755
--- a/tests/bogus-wctob
+++ b/tests/bogus-wctob
diff --git a/tests/bre b/tests/bre
index 21155959..21155959 100644..100755
--- a/tests/bre
+++ b/tests/bre
diff --git a/tests/case-fold-backref b/tests/case-fold-backref
index ef9e9bca..ef9e9bca 100644..100755
--- a/tests/case-fold-backref
+++ b/tests/case-fold-backref
diff --git a/tests/case-fold-char-class b/tests/case-fold-char-class
index 018d2d24..018d2d24 100644..100755
--- a/tests/case-fold-char-class
+++ b/tests/case-fold-char-class
diff --git a/tests/case-fold-char-range b/tests/case-fold-char-range
index d0364924..d0364924 100644..100755
--- a/tests/case-fold-char-range
+++ b/tests/case-fold-char-range
diff --git a/tests/case-fold-char-type b/tests/case-fold-char-type
index 7ae7d4b5..7ae7d4b5 100644..100755
--- a/tests/case-fold-char-type
+++ b/tests/case-fold-char-type
diff --git a/tests/char-class-multibyte b/tests/char-class-multibyte
index 07d96200..07d96200 100644..100755
--- a/tests/char-class-multibyte
+++ b/tests/char-class-multibyte
diff --git a/tests/dfaexec-multibyte b/tests/dfaexec-multibyte
index eea63154..eea63154 100644..100755
--- a/tests/dfaexec-multibyte
+++ b/tests/dfaexec-multibyte
diff --git a/tests/equiv-classes b/tests/equiv-classes
index de38d95c..de38d95c 100644..100755
--- a/tests/equiv-classes
+++ b/tests/equiv-classes
diff --git a/tests/ere b/tests/ere
index 1516c949..1516c949 100644..100755
--- a/tests/ere
+++ b/tests/ere
diff --git a/tests/euc-mb b/tests/euc-mb
index e6154f33..e6154f33 100644..100755
--- a/tests/euc-mb
+++ b/tests/euc-mb
diff --git a/tests/fedora b/tests/fedora
index e85cd605..e85cd605 100644..100755
--- a/tests/fedora
+++ b/tests/fedora
diff --git a/tests/fgrep-infloop b/tests/fgrep-infloop
index 908b7887..908b7887 100644..100755
--- a/tests/fgrep-infloop
+++ b/tests/fgrep-infloop
diff --git a/tests/file b/tests/file
index cbfe21b4..cbfe21b4 100644..100755
--- a/tests/file
+++ b/tests/file
diff --git a/tests/grep-dev-null b/tests/grep-dev-null
index e649be07..e649be07 100644..100755
--- a/tests/grep-dev-null
+++ b/tests/grep-dev-null
diff --git a/tests/grep-dir b/tests/grep-dir
index e0055250..e0055250 100644..100755
--- a/tests/grep-dir
+++ b/tests/grep-dir
diff --git a/tests/high-bit-range b/tests/high-bit-range
index d150633f..d150633f 100644..100755
--- a/tests/high-bit-range
+++ b/tests/high-bit-range
diff --git a/tests/ignore-mmap b/tests/ignore-mmap
index a7572169..a7572169 100644..100755
--- a/tests/ignore-mmap
+++ b/tests/ignore-mmap
diff --git a/tests/include-exclude b/tests/include-exclude
index 4be5c785..4be5c785 100644..100755
--- a/tests/include-exclude
+++ b/tests/include-exclude
diff --git a/tests/inconsistent-range b/tests/inconsistent-range
index e28acde4..e28acde4 100644..100755
--- a/tests/inconsistent-range
+++ b/tests/inconsistent-range
diff --git a/tests/khadafy b/tests/khadafy
index 907ce16e..907ce16e 100644..100755
--- a/tests/khadafy
+++ b/tests/khadafy
diff --git a/tests/options b/tests/options
index 04f85507..04f85507 100644..100755
--- a/tests/options
+++ b/tests/options
diff --git a/tests/pcre b/tests/pcre
index a712d19a..a712d19a 100644..100755
--- a/tests/pcre
+++ b/tests/pcre
diff --git a/tests/prefix-of-multibyte b/tests/prefix-of-multibyte
index 05045b09..05045b09 100644..100755
--- a/tests/prefix-of-multibyte
+++ b/tests/prefix-of-multibyte
diff --git a/tests/reversed-range-endpoints b/tests/reversed-range-endpoints
index eb845940..eb845940 100644..100755
--- a/tests/reversed-range-endpoints
+++ b/tests/reversed-range-endpoints
diff --git a/tests/sjis-mb b/tests/sjis-mb
index 07c9a9ab..07c9a9ab 100644..100755
--- a/tests/sjis-mb
+++ b/tests/sjis-mb
diff --git a/tests/spencer1 b/tests/spencer1
index 671ae260..671ae260 100644..100755
--- a/tests/spencer1
+++ b/tests/spencer1
diff --git a/tests/status b/tests/status
index 62d4b674..62d4b674 100644..100755
--- a/tests/status
+++ b/tests/status
diff --git a/tests/unibyte-bracket-expr b/tests/unibyte-bracket-expr
index a0b51dd3..a0b51dd3 100644..100755
--- a/tests/unibyte-bracket-expr
+++ b/tests/unibyte-bracket-expr
diff --git a/tests/warn-char-classes b/tests/warn-char-classes
index 8cc65635..8cc65635 100644..100755
--- a/tests/warn-char-classes
+++ b/tests/warn-char-classes
diff --git a/tests/word-delim-multibyte b/tests/word-delim-multibyte
index 5add9c87..5add9c87 100644..100755
--- a/tests/word-delim-multibyte
+++ b/tests/word-delim-multibyte
diff --git a/tests/word-multi-file b/tests/word-multi-file
index 6614ab66..6614ab66 100644..100755
--- a/tests/word-multi-file
+++ b/tests/word-multi-file
diff --git a/tests/yesno b/tests/yesno
index 4b1046d8..4b1046d8 100644..100755
--- a/tests/yesno
+++ b/tests/yesno