gitweb/Makefile: Add 'test' and 'test-installed' targets
The 'test-installed' target in gitweb/Makefile tests installed gitweb, using the same destination directory that 'install' target uses. The 'test' target is just a convenience wrapper invoking 'gitweb-test' target of t/Makefile. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jakub Narebski committed
Sep 26, 2010 at 15:02 UTC
958a8467216ca607ca6a24059d5c641347927333
2 files changed
+14
-1
gitweb/Makefile
+10
-1
@@ -143,6 +143,15 @@ gitweb.cgi: gitweb.perl GITWEB-BUILD-OPTIONS
143
chmod +x $@+ && \
144
mv $@+ $@
145
146
+### Testing rules
147
+
148
+test:
149
+ $(MAKE) -C ../t gitweb-test
150
+
151
+test-installed:
152
+ GITWEB_TEST_INSTALLED='$(DESTDIR_SQ)$(gitwebdir_SQ)' \
153
+ $(MAKE) -C ../t gitweb-test
154
+
155
### Installation rules
156
157
install: all
@@ -156,5 +165,5 @@ install: all
165
clean:
166
$(RM) gitweb.cgi static/gitweb.min.js static/gitweb.min.css GITWEB-BUILD-OPTIONS
167
159
-.PHONY: all clean install .FORCE-GIT-VERSION-FILE FORCE
168
+.PHONY: all clean install test test-installed .FORCE-GIT-VERSION-FILE FORCE
169
t/Makefile
+4
@@ -17,6 +17,7 @@ SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
17
18
T = $(wildcard t[0-9][0-9][0-9][0-9]-*.sh)
19
TSVN = $(wildcard t91[0-9][0-9]-*.sh)
20
+TGITWEB = $(wildcard t95[0-9][0-9]-*.sh)
21
22
all: pre-clean
23
$(MAKE) aggregate-results-and-cleanup
@@ -46,6 +47,9 @@ full-svn-test:
47
$(MAKE) $(TSVN) GIT_SVN_NO_OPTIMIZE_COMMITS=1 LC_ALL=C
48
$(MAKE) $(TSVN) GIT_SVN_NO_OPTIMIZE_COMMITS=0 LC_ALL=en_US.UTF-8
49
50
+gitweb-test:
51
+ $(MAKE) $(TGITWEB)
52
+
53
valgrind:
54
GIT_TEST_OPTS=--valgrind $(MAKE)
55