blob: 7a8beb175c17c9963b7802060df470c8d30bf01b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# 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.

.DEFAULT_GOAL := all
.SUFFIXES:

# 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))

TESTS = $(wildcard t[0-9][0-9][0-9][0-9]-*.sh)

all: $(TESTS)

$(TESTS):
	@'$(SHELL_PATH_SQ)' $@ $(CGIT_TEST_OPTS)

clean:
	$(RM) -r 'trash directory'.* test-results

# 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