From: Jens Lehmann <Jens.Lehmann@web.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Git Mailing List" <git@vger.kernel.org>,
"Jeff King" <peff@peff.net>,
"Torsten Bögershausen" <tboegi@web.de>
Subject: [PATCH v2 1/2] t/Makefile: check helper scripts for non-portable shell commands too
Date: Wed, 09 Jul 2014 21:34:12 +0200 [thread overview]
Message-ID: <53BD9934.9050708@web.de> (raw)
In-Reply-To: <53BD9908.1060807@web.de>
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>
---
t/Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/t/Makefile b/t/Makefile
index 8fd1a72..7fa6692 100644
--- a/t/Makefile
+++ b/t/Makefile
@@ -29,6 +29,7 @@ TEST_RESULTS_DIRECTORY_SQ = $(subst ','\'',$(TEST_RESULTS_DIRECTORY))
T = $(sort $(wildcard t[0-9][0-9][0-9][0-9]-*.sh))
TSVN = $(sort $(wildcard t91[0-9][0-9]-*.sh))
TGITWEB = $(sort $(wildcard t95[0-9][0-9]-*.sh))
+THELPERS = $(sort $(filter-out $(T),$(wildcard *.sh)))
all: $(DEFAULT_TEST_TARGET)
@@ -65,7 +66,7 @@ test-lint-executable:
echo >&2 "non-executable tests:" $$bad; exit 1; }
test-lint-shell-syntax:
- @'$(PERL_PATH_SQ)' check-non-portable-shell.pl $(T)
+ @'$(PERL_PATH_SQ)' check-non-portable-shell.pl $(T) $(THELPERS)
aggregate-results-and-cleanup: $(T)
$(MAKE) aggregate-results
--
2.0.1.476.gf051ede
next prev parent reply other threads:[~2014-07-09 19:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-03 22:19 [PATCH 0/2] always run all lint targets when running the test suite Jens Lehmann
2014-07-03 22:20 ` [PATCH 1/2] t/Makefile: check helper scripts for non-portable shell commands too Jens Lehmann
2014-07-03 22:21 ` [PATCH 2/2] t/Makefile: always test all lint targets when running tests Jens Lehmann
2014-07-07 18:13 ` Junio C Hamano
2014-07-08 19:24 ` Jens Lehmann
2014-07-09 5:42 ` Junio C Hamano
2014-07-09 19:33 ` [PATCH v2 0/2] always run all lint targets when running the test suite Jens Lehmann
2014-07-09 19:34 ` Jens Lehmann [this message]
2014-07-09 19:34 ` [PATCH v2 2/2] t/Makefile: always test all lint targets when running tests Jens Lehmann
2014-07-09 5:30 ` [PATCH " Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53BD9934.9050708@web.de \
--to=jens.lehmann@web.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
--cc=tboegi@web.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).