From: Jakub Narebski Date: Sun, 26 Sep 2010 13:02:26 +0000 (+0200) Subject: gitweb/Makefile: Add 'test' and 'test-installed' targets X-Git-Tag: v1.7.4-rc0~145^2~1 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=958a8467216ca607ca6a24059d5c641347927333;hp=929909375034eb609f855fe51b2ffc57123e6dd4;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/gitweb/Makefile b/gitweb/Makefile index 2fb7c2d77..f2180741f 100644 --- a/gitweb/Makefile +++ b/gitweb/Makefile @@ -143,6 +143,15 @@ gitweb.cgi: gitweb.perl GITWEB-BUILD-OPTIONS chmod +x $@+ && \ mv $@+ $@ +### Testing rules + +test: + $(MAKE) -C ../t gitweb-test + +test-installed: + GITWEB_TEST_INSTALLED='$(DESTDIR_SQ)$(gitwebdir_SQ)' \ + $(MAKE) -C ../t gitweb-test + ### Installation rules install: all @@ -156,5 +165,5 @@ install: all clean: $(RM) gitweb.cgi static/gitweb.min.js static/gitweb.min.css GITWEB-BUILD-OPTIONS -.PHONY: all clean install .FORCE-GIT-VERSION-FILE FORCE +.PHONY: all clean install test test-installed .FORCE-GIT-VERSION-FILE FORCE diff --git a/t/Makefile b/t/Makefile index c7baefb7e..7aa409ab6 100644 --- a/t/Makefile +++ b/t/Makefile @@ -17,6 +17,7 @@ SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH)) T = $(wildcard t[0-9][0-9][0-9][0-9]-*.sh) TSVN = $(wildcard t91[0-9][0-9]-*.sh) +TGITWEB = $(wildcard t95[0-9][0-9]-*.sh) all: pre-clean $(MAKE) aggregate-results-and-cleanup @@ -46,6 +47,9 @@ full-svn-test: $(MAKE) $(TSVN) GIT_SVN_NO_OPTIMIZE_COMMITS=1 LC_ALL=C $(MAKE) $(TSVN) GIT_SVN_NO_OPTIMIZE_COMMITS=0 LC_ALL=en_US.UTF-8 +gitweb-test: + $(MAKE) $(TGITWEB) + valgrind: GIT_TEST_OPTS=--valgrind $(MAKE)