all repos — cgit @ 2ef4edee19c3f935dfffc3e0f4a56f5e2f183fa4

a hyperfast web frontend for git written in c

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>
John Keeping john@keeping.me.uk
Thu, 13 Aug 2015 12:14:13 +0100
commit

2ef4edee19c3f935dfffc3e0f4a56f5e2f183fa4

parent

c0b59823035efc136a82a96094d164a979d9b2e9

1 files changed, 5 insertions(+), 1 deletions(-)

jump to
M tests/Makefiletests/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