about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJohn Keeping <john@keeping.me.uk>2015-08-13 12:14:13 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2015-08-13 15:36:18 +0200
commit2ef4edee19c3f935dfffc3e0f4a56f5e2f183fa4 (patch)
treece24b097d62b110cedec5ee71026d371abf0673a
parentredirect: cleanliness (diff)
downloadcgit-pink-2ef4edee19c3f935dfffc3e0f4a56f5e2f183fa4.tar.gz
cgit-pink-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 '')
-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 @@
+include ../git/config.mak.uname
+-include ../cgit.conf
 
+SHELL_PATH ?= $(SHELL)
+SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
 
 T = $(wildcard t[0-9][0-9][0-9][0-9]-*.sh)
 
 all: $(T)
 
 $(T):
-	@./$@ $(CGIT_TEST_OPTS)
+	@'$(SHELL_PATH_SQ)' $@ $(CGIT_TEST_OPTS)
 
 clean:
 	$(RM) -rf trash
href='/src/commit/home/.config/cwm/cwmrc?id=0395f875740def3580545a0640eefe9521a0da2b&follow=1'>Set colours for Xt and cwmJune McEnroe 2021-02-07Set urgency on bell in xtermJune McEnroe 2021-02-07Add bindings for brightness controlJune McEnroe 2021-02-07Set X key repeat rateJune McEnroe 2021-02-07Bump font size to 12June McEnroe 2021-02-07Fully configure and rebind cwmJune McEnroe 2021-02-07Add BintiJune McEnroe 2021-02-07Finish configuring xtermJune McEnroe 2021-02-06Enable tapping, reverse scroll, set scaling in wsconsctlJune McEnroe 2021-02-06Set root window to black on purple snowJune McEnroe 2021-02-06Add xmodmap configurationJune McEnroe 2021-02-06Add initial OpenBSD X configurationJune McEnroe 2021-02-06Add xterm output to schemeJune McEnroe