t/Makefile: check helper scripts for non-portable shell commands too
Currently only the "t[0-9][0-9][0-9][0-9]-*.sh" scripts are tested for shell incompatibilities using the check-non-portable-shell.pl script. This makes it easy to miss non-POSIX constructs added to one of the t/*lib*.sh helper scripts, as they aren't automatically detected. Fix that by adding a THELPERS variable containing all shell scripts that aren't tests and add these to the "test-lint-shell-syntax" target too. Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jens Lehmann committed
Jul 9, 2014 at 21:34 UTC
cd78cea29d5476c6178cd49c08d10566f5bf0d4f
1 file changed
+2
-1
t/Makefile
+2
-1
@@ -29,6 +29,7 @@ TEST_RESULTS_DIRECTORY_SQ = $(subst ','\'',$(TEST_RESULTS_DIRECTORY))
29
T = $(sort $(wildcard t[0-9][0-9][0-9][0-9]-*.sh))
30
TSVN = $(sort $(wildcard t91[0-9][0-9]-*.sh))
31
TGITWEB = $(sort $(wildcard t95[0-9][0-9]-*.sh))
32
+THELPERS = $(sort $(filter-out $(T),$(wildcard *.sh)))
33
34
all: $(DEFAULT_TEST_TARGET)
35
@@ -65,7 +66,7 @@ test-lint-executable:
66
echo >&2 "non-executable tests:" $$bad; exit 1; }
67
68
test-lint-shell-syntax:
68
- @'$(PERL_PATH_SQ)' check-non-portable-shell.pl $(T)
69
+ @'$(PERL_PATH_SQ)' check-non-portable-shell.pl $(T) $(THELPERS)
70
71
aggregate-results-and-cleanup: $(T)
72
$(MAKE) aggregate-results