diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Tidy the test comments and shell portability
Diffstat (limited to '')
| -rw-r--r-- | tests/Makefile | 20 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 file changed, 16 insertions, 4 deletions
diff --git a/tests/Makefile b/tests/Makefile index e159487..1047de5 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -1,17 +1,29 @@ +# Runs the cgit test suite. Every t[0-9][0-9][0-9][0-9]-*.sh script beside this +# file is a self-contained test built on the test library in the bundled Git +# tree, so all that is needed here is a shell to run each one under and a way +# to pass extra options along. The top-level Makefile reaches this through its +# test target, once cgit and the Git tree it links against have been built. + +# SHELL_PATH comes from Git's platform detection, and cgit.conf may override it, +# so both are read before anything below uses it. include ../vendor/git/config.mak.uname -include ../cgit.conf SHELL_PATH ?= $(SHELL) + +# Escaped for the single quotes that the recipe below puts around the path. SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH)) -T = $(wildcard t[0-9][0-9][0-9][0-9]-*.sh) +TESTS = $(wildcard t[0-9][0-9][0-9][0-9]-*.sh) -all: $(T) +all: $(TESTS) -$(T): +$(TESTS): @'$(SHELL_PATH_SQ)' $@ $(CGIT_TEST_OPTS) clean: $(RM) -r 'trash directory'.* test-results -.PHONY: all $(T) clean +# Each test is named after a file that already exists, so without this make +# would decide there is nothing to do and run none of them. +.PHONY: all $(TESTS) clean |
