Merge branch 'rs/tag-null-pointer-arith-fix'
[gitweb.git] / t / Makefile
index 18e2b28b263682a9eb6902b62535c228be1f36af..1bb06c36f22d9fa0fb01fb8dfad02ffa9f338ebd 100644 (file)
@@ -35,6 +35,12 @@ all: $(DEFAULT_TEST_TARGET)
 test: pre-clean $(TEST_LINT)
        $(MAKE) aggregate-results-and-cleanup
 
+failed:
+       @failed=$$(cd '$(TEST_RESULTS_DIRECTORY_SQ)' && \
+               grep -l '^failed [1-9]' *.counts | \
+               sed -n 's/\.counts$$/.sh/p') && \
+       test -z "$$failed" || $(MAKE) $$failed
+
 prove: pre-clean $(TEST_LINT)
        @echo "*** prove ***"; $(PROVE) --exec '$(SHELL_PATH_SQ)' $(GIT_PROVE_OPTS) $(T) :: $(GIT_TEST_OPTS)
        $(MAKE) clean-except-prove-cache
@@ -52,7 +58,8 @@ clean-except-prove-cache:
 clean: clean-except-prove-cache
        $(RM) .prove
 
-test-lint: test-lint-duplicates test-lint-executable test-lint-shell-syntax
+test-lint: test-lint-duplicates test-lint-executable test-lint-shell-syntax \
+       test-lint-filenames
 
 test-lint-duplicates:
        @dups=`echo $(T) | tr ' ' '\n' | sed 's/-.*//' | sort | uniq -d` && \
@@ -67,6 +74,14 @@ test-lint-executable:
 test-lint-shell-syntax:
        @'$(PERL_PATH_SQ)' check-non-portable-shell.pl $(T) $(THELPERS)
 
+test-lint-filenames:
+       @# We do *not* pass a glob to ls-files but use grep instead, to catch
+       @# non-ASCII characters (which are quoted within double-quotes)
+       @bad="$$(git -c core.quotepath=true ls-files 2>/dev/null | \
+                       grep '["*:<>?\\|]')"; \
+               test -z "$$bad" || { \
+               echo >&2 "non-portable file name(s): $$bad"; exit 1; }
+
 aggregate-results-and-cleanup: $(T)
        $(MAKE) aggregate-results
        $(MAKE) clean