Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/contrib/subtree/t/Makefile # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / contrib / subtree / t / Makefile` 88 lines ยท 2334 bytes Raw Blame History 1 # Run tests 2 # 3 # Copyright (c) 2005 Junio C Hamano 4 # 5 6 # The default target of this Makefile is... 7 all:: 8 9 -include ../../../config.mak.autogen 10 -include ../../../config.mak 11 12 #GIT_TEST_OPTS=--verbose --debug 13 SHELL_PATH ?= $(SHELL) 14 PERL_PATH ?= /usr/bin/perl 15 TAR ?= $(TAR) 16 RM ?= rm -f 17 PROVE ?= prove 18 DEFAULT_TEST_TARGET ?= test 19 TEST_LINT ?= test-lint 20 21 ifdef TEST_OUTPUT_DIRECTORY 22 TEST_RESULTS_DIRECTORY = $(TEST_OUTPUT_DIRECTORY)/test-results 23 else 24 TEST_RESULTS_DIRECTORY = ../../../t/test-results 25 endif 26 27 # Shell quote; 28 SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH)) 29 PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH)) 30 TEST_RESULTS_DIRECTORY_SQ = $(subst ','\'',$(TEST_RESULTS_DIRECTORY)) 31 32 T = $(sort $(wildcard t[0-9][0-9][0-9][0-9]-*.sh)) 33 TSVN = $(sort $(wildcard t91[0-9][0-9]-*.sh)) 34 TGITWEB = $(sort $(wildcard t95[0-9][0-9]-*.sh)) 35 THELPERS = $(sort $(filter-out $(T),$(wildcard *.sh))) 36 37 all:: $(DEFAULT_TEST_TARGET) 38 39 test: pre-clean $(TEST_LINT) 40 $(MAKE) aggregate-results-and-cleanup 41 42 prove: pre-clean $(TEST_LINT) 43 @echo "*** prove ***"; GIT_CONFIG=.git/config $(PROVE) --exec '$(SHELL_PATH_SQ)' $(GIT_PROVE_OPTS) $(T) :: $(GIT_TEST_OPTS) 44 $(MAKE) clean-except-prove-cache 45 46 $(T): 47 @echo "*** $@ ***"; GIT_CONFIG=.git/config '$(SHELL_PATH_SQ)' $@ $(GIT_TEST_OPTS) 48 49 pre-clean: 50 $(RM) -r '$(TEST_RESULTS_DIRECTORY_SQ)' 51 52 clean-except-prove-cache: 53 $(RM) -r 'trash directory'.* 54 $(RM) -r valgrind/bin 55 56 clean: clean-except-prove-cache 57 $(RM) -r '$(TEST_RESULTS_DIRECTORY_SQ)' 58 $(RM) .prove 59 60 test-lint: test-lint-duplicates test-lint-executable test-lint-shell-syntax 61 62 test-lint-duplicates: 63 @dups=`echo $(T) | tr ' ' '\n' | sed 's/-.*//' | sort | uniq -d` && \ 64 test -z "$$dups" || { \ 65 echo >&2 "duplicate test numbers:" $$dups; exit 1; } 66 67 test-lint-executable: 68 @bad=`for i in $(T); do test -x "$$i" || echo $$i; done` && \ 69 test -z "$$bad" || { \ 70 echo >&2 "non-executable tests:" $$bad; exit 1; } 71 72 test-lint-shell-syntax: 73 @'$(PERL_PATH_SQ)' ../../../t/check-non-portable-shell.pl $(T) $(THELPERS) 74 75 aggregate-results-and-cleanup: $(T) 76 $(MAKE) aggregate-results 77 $(MAKE) clean 78 79 aggregate-results: 80 @'$(SHELL_PATH_SQ)' ../../../t/aggregate-results.sh '$(TEST_RESULTS_DIRECTORY_SQ)' 81 82 valgrind: 83 $(MAKE) GIT_TEST_OPTS="$(GIT_TEST_OPTS) --valgrind" 84 85 test-results: 86 mkdir -p test-results 87 88 .PHONY: pre-clean $(T) aggregate-results clean valgrind