Skip to content

Commit 958a846

Browse files
jnarebgitster
authored andcommitted
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>
1 parent 9299093 commit 958a846

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

gitweb/Makefile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,15 @@ gitweb.cgi: gitweb.perl GITWEB-BUILD-OPTIONS
143143
chmod +x $@+ && \
144144
mv $@+ $@
145145

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+
146155
### Installation rules
147156

148157
install: all
@@ -156,5 +165,5 @@ install: all
156165
clean:
157166
$(RM) gitweb.cgi static/gitweb.min.js static/gitweb.min.css GITWEB-BUILD-OPTIONS
158167

159-
.PHONY: all clean install .FORCE-GIT-VERSION-FILE FORCE
168+
.PHONY: all clean install test test-installed .FORCE-GIT-VERSION-FILE FORCE
160169

t/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
1717

1818
T = $(wildcard t[0-9][0-9][0-9][0-9]-*.sh)
1919
TSVN = $(wildcard t91[0-9][0-9]-*.sh)
20+
TGITWEB = $(wildcard t95[0-9][0-9]-*.sh)
2021

2122
all: pre-clean
2223
$(MAKE) aggregate-results-and-cleanup
@@ -46,6 +47,9 @@ full-svn-test:
4647
$(MAKE) $(TSVN) GIT_SVN_NO_OPTIMIZE_COMMITS=1 LC_ALL=C
4748
$(MAKE) $(TSVN) GIT_SVN_NO_OPTIMIZE_COMMITS=0 LC_ALL=en_US.UTF-8
4849

50+
gitweb-test:
51+
$(MAKE) $(TGITWEB)
52+
4953
valgrind:
5054
GIT_TEST_OPTS=--valgrind $(MAKE)
5155

0 commit comments

Comments
 (0)