summaryrefslogtreecommitdiff
path: root/t/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 't/Makefile')
-rw-r--r--t/Makefile16
1 files changed, 14 insertions, 2 deletions
diff --git a/t/Makefile b/t/Makefile
index 73c6ec4..47cbeb6 100644
--- a/t/Makefile
+++ b/t/Makefile
@@ -23,10 +23,10 @@ TGITWEB = $(wildcard t95[0-9][0-9]-*.sh)
all: $(DEFAULT_TEST_TARGET)
-test: pre-clean
+test: pre-clean $(TEST_LINT)
$(MAKE) aggregate-results-and-cleanup
-prove: pre-clean
+prove: pre-clean $(TEST_LINT)
@echo "*** prove ***"; GIT_CONFIG=.git/config $(PROVE) --exec '$(SHELL_PATH_SQ)' $(GIT_PROVE_OPTS) $(T) :: $(GIT_TEST_OPTS)
$(MAKE) clean
@@ -41,6 +41,18 @@ clean:
$(RM) -r valgrind/bin
$(RM) .prove
+test-lint: test-lint-duplicates test-lint-executable
+
+test-lint-duplicates:
+ @dups=`echo $(T) | tr ' ' '\n' | sed 's/-.*//' | sort | uniq -d` && \
+ test -z "$$dups" || { \
+ echo >&2 "duplicate test numbers:" $$dups; exit 1; }
+
+test-lint-executable:
+ @bad=`for i in $(T); do test -x "$$i" || echo $$i; done` && \
+ test -z "$$bad" || { \
+ echo >&2 "non-executable tests:" $$bad; exit 1; }
+
aggregate-results-and-cleanup: $(T)
$(MAKE) aggregate-results
$(MAKE) clean