]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
maint: make some shell and perl scripts executable in 'tests/'
authorBernhard Voelker <mail@bernhard-voelker.de>
Sun, 21 Jul 2013 23:07:52 +0000 (01:07 +0200)
committerBernhard Voelker <mail@bernhard-voelker.de>
Sun, 21 Jul 2013 23:07:52 +0000 (01:07 +0200)
Some newer test scripts - partially ones from me - are not executable.
It does not seem to be a problem, but for consistency and to avoid
future problems on unusual platforms or shells change the permissions
by adding the executable bit.

* cfg.mk (sc_tests_executable): Add new syntax-check rule to ensure
that all test scripts are executable.
* tests/df/df-output.sh: Change file mode from 644 to 755.
* tests/du/threshold.sh: Likewise.
* tests/factor/run.sh: Likewise.
* tests/init.sh: Likewise.
* tests/misc/csplit-suppress-matched.pl: Likewise.
* tests/misc/numfmt.pl: Likewise.
* tests/tail-2/retry.sh: Likewise.

cfg.mk
tests/df/df-output.sh [changed mode: 0644->0755]
tests/du/threshold.sh [changed mode: 0644->0755]
tests/factor/run.sh [changed mode: 0644->0755]
tests/init.sh [changed mode: 0644->0755]
tests/misc/csplit-suppress-matched.pl [changed mode: 0644->0755]
tests/misc/numfmt.pl [changed mode: 0644->0755]
tests/tail-2/retry.sh [changed mode: 0644->0755]

diff --git a/cfg.mk b/cfg.mk
index 7b14c07f139f3aeced701f1135640fbf8da4ab87..a4f36ff5ff03f779ad30026a05168fffa0685d0c 100644 (file)
--- a/cfg.mk
+++ b/cfg.mk
@@ -115,6 +115,14 @@ sc_tests_list_consistency:
            | $(EGREP) "$$test_extensions_rx\$$";                       \
        } | sort | uniq -u | grep . && exit 1; :
 
+# Ensure that all version-controlled test scripts are executable.
+sc_tests_executable:
+       @test_extensions_rx=`echo $(TEST_EXTENSIONS)                    \
+         | sed -e "s/ / -o -name */g" -e "s/^/-name */"`; \
+       find tests/ \( $$test_extensions_rx \) \! -perm -111 -print \
+         | sed -e "s/^/$(ME): Please make test executable: /" | grep . \
+           && exit 1; :
+
 # Create a list of regular expressions matching the names
 # of files included from system.h.  Exclude a couple.
 .re-list:
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)