about summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorJohn Keeping2015-08-13 12:14:13 +0100
committerJason A. Donenfeld2015-08-13 15:36:18 +0200
commit2ef4edee19c3f935dfffc3e0f4a56f5e2f183fa4 (patch)
treece24b097d62b110cedec5ee71026d371abf0673a /tests
parentredirect: cleanliness (diff)
downloadcgit-2ef4edee19c3f935dfffc3e0f4a56f5e2f183fa4.tar.gz
cgit-2ef4edee19c3f935dfffc3e0f4a56f5e2f183fa4.zip
tests: allow shell to be overridden
On some systems (e.g. Solaris), /bin/sh is not a POSIX shell.  Git
already provides suitable overrides in its config.mak.uname file and we
provide cgit.conf to allow the user to further change this.

The code for this is taken from Git's t/Makefile, meaning that we now
invoke the tests in the same way that Git does.

Signed-off-by: John Keeping <john@keeping.me.uk>
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/Makefile b/tests/Makefile index 1556475..65e1117 100644 --- a/tests/Makefile +++ b/tests/Makefile
@@ -1,11 +1,15 @@
1include ../git/config.mak.uname
2-include ../cgit.conf
1 3
4SHELL_PATH ?= $(SHELL)
5SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
2 6
3T = $(wildcard t[0-9][0-9][0-9][0-9]-*.sh) 7T = $(wildcard t[0-9][0-9][0-9][0-9]-*.sh)
4 8
5all: $(T) 9all: $(T)
6 10
7$(T): 11$(T):
8 @./$@ $(CGIT_TEST_OPTS) 12 @'$(SHELL_PATH_SQ)' $@ $(CGIT_TEST_OPTS)
9 13
10clean: 14clean:
11 $(RM) -rf trash 15 $(RM) -rf trash