Git fork

Makefile: stop requiring Perl when running tests

The Makefile for our tests has a couple of targets that depend on Perl.
Adapt those targets to only run conditionally in case Perl is available
on the system so that it becomes possible to run the test suite without
Perl.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

authored by

Patrick Steinhardt and committed by
Junio C Hamano
8d531a9d 267143f2

+13 -3
+13 -3
t/Makefile
··· 59 59 60 60 all:: $(DEFAULT_TEST_TARGET) 61 61 62 - test: pre-clean check-chainlint check-meson $(TEST_LINT) 62 + test: pre-clean check-meson $(TEST_LINT) 63 63 $(CHAINLINTSUPPRESS) $(MAKE) aggregate-results-and-cleanup 64 64 65 + ifneq ($(PERL_PATH),) 66 + test: check-chainlint 67 + prove: check-chainlint 68 + endif 69 + 65 70 failed: 66 71 @failed=$$(cd '$(TEST_RESULTS_DIRECTORY_SQ)' && \ 67 72 grep -l '^failed [1-9]' *.counts | \ 68 73 sed -n 's/\.counts$$/.sh/p') && \ 69 74 test -z "$$failed" || $(MAKE) $$failed 70 75 71 - prove: pre-clean check-chainlint $(TEST_LINT) 76 + prove: pre-clean $(TEST_LINT) 72 77 @echo "*** prove (shell & unit tests) ***" 73 78 @$(CHAINLINTSUPPRESS) TEST_OPTIONS='$(GIT_TEST_OPTS)' TEST_SHELL_PATH='$(TEST_SHELL_PATH_SQ)' $(PROVE) --exec ./run-test.sh $(GIT_PROVE_OPTS) $(T) $(UNIT_TESTS) 74 79 $(MAKE) clean-except-prove-cache ··· 132 137 fi; \ 133 138 done 134 139 135 - test-lint: test-lint-duplicates test-lint-executable test-lint-shell-syntax \ 140 + test-lint: test-lint-duplicates test-lint-executable \ 136 141 test-lint-filenames 142 + ifneq ($(PERL_PATH),) 143 + test-lint: test-lint-shell-syntax 144 + else 145 + GIT_TEST_CHAIN_LINT = 0 146 + endif 137 147 ifneq ($(GIT_TEST_CHAIN_LINT),0) 138 148 test-lint: test-chainlint 139 149 endif