Skip to content

Commit cd78cea

Browse files
jlehmanngitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6f92e5f commit cd78cea

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

t/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ TEST_RESULTS_DIRECTORY_SQ = $(subst ','\'',$(TEST_RESULTS_DIRECTORY))
2929
T = $(sort $(wildcard t[0-9][0-9][0-9][0-9]-*.sh))
3030
TSVN = $(sort $(wildcard t91[0-9][0-9]-*.sh))
3131
TGITWEB = $(sort $(wildcard t95[0-9][0-9]-*.sh))
32+
THELPERS = $(sort $(filter-out $(T),$(wildcard *.sh)))
3233

3334
all: $(DEFAULT_TEST_TARGET)
3435

@@ -65,7 +66,7 @@ test-lint-executable:
6566
echo >&2 "non-executable tests:" $$bad; exit 1; }
6667

6768
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)
6970

7071
aggregate-results-and-cleanup: $(T)
7172
$(MAKE) aggregate-results

0 commit comments

Comments
 (0)