History

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.

John Keeping committed 11 years ago

Commit 2ef4ede1 parent c0b59821 file · +5 −1Browse files

Unified · Split

tests/Makefile+5−1
@@ -1,11 +1,15 @@
1+include ../git/config.mak.uname
2+-include ../cgit.conf
13
4+SHELL_PATH ?= $(SHELL)
5+SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
26
37 T = $(wildcard t[0-9][0-9][0-9][0-9]-*.sh)
48
59 all: $(T)
610
711 $(T):
8− @./$@ $(CGIT_TEST_OPTS)
12+ @'$(SHELL_PATH_SQ)' $@ $(CGIT_TEST_OPTS)
913
1014 clean:
1115 $(RM) -rf trash

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t