diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-01-10 13:47:04 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-01-10 13:47:04 -0800 |
commit | 4249d850cff0d1d36b3a9c4cf38066c50365cfd1 (patch) | |
tree | cdca9f6c091de6d5b462a5880029d52127f82fdb /t/Makefile | |
parent | Merge branch 'mz/pick-unborn' (diff) | |
parent | test: Add check-non-portable-shell.pl (diff) | |
download | tgif-4249d850cff0d1d36b3a9c4cf38066c50365cfd1.tar.xz |
Merge branch 'tb/test-shell-lint'
Check for common mistakes in the test scripts, based on simple
pattern-matching.
* tb/test-shell-lint:
test: Add check-non-portable-shell.pl
Diffstat (limited to 't/Makefile')
-rw-r--r-- | t/Makefile | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/t/Makefile b/t/Makefile index 5c6de8169b..1923cc104b 100644 --- a/t/Makefile +++ b/t/Makefile @@ -17,6 +17,7 @@ TEST_LINT ?= test-lint-duplicates test-lint-executable # Shell quote; SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH)) +PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH)) T = $(sort $(wildcard t[0-9][0-9][0-9][0-9]-*.sh)) TSVN = $(sort $(wildcard t91[0-9][0-9]-*.sh)) @@ -44,7 +45,7 @@ clean-except-prove-cache: clean: clean-except-prove-cache $(RM) .prove -test-lint: test-lint-duplicates test-lint-executable +test-lint: test-lint-duplicates test-lint-executable test-lint-shell-syntax test-lint-duplicates: @dups=`echo $(T) | tr ' ' '\n' | sed 's/-.*//' | sort | uniq -d` && \ @@ -56,6 +57,9 @@ test-lint-executable: test -z "$$bad" || { \ echo >&2 "non-executable tests:" $$bad; exit 1; } +test-lint-shell-syntax: + @'$(PERL_PATH_SQ)' check-non-portable-shell.pl $(T) + aggregate-results-and-cleanup: $(T) $(MAKE) aggregate-results $(MAKE) clean @@ -88,7 +92,7 @@ test-results: mkdir -p test-results test-results/git-smoke.tar.gz: test-results - $(PERL_PATH) ./harness \ + '$(PERL_PATH_SQ)' ./harness \ --archive="test-results/git-smoke.tar.gz" \ $(T) |