[RFC/PATCH 3/3] gitweb/Makefile: Add test-installed target

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The 'test-installed' target in gitweb/Makefile installs and tests
installed gitweb.

Signed-off-by: Jakub Narebski <jnareb@xxxxxxxxx>
---
RFC, because I am not 100% sure that 'test-installed' should have
'install' target as a dependency.

Probably should be marked .PHONY, but then there are some other
targets that should be marked such beside 'test-installed'.

The t/Makefile part is fairly uncontroversial, I think.

 gitweb/Makefile |    4 ++++
 t/Makefile      |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/gitweb/Makefile b/gitweb/Makefile
index 88bcf08..90f7212 100644
--- a/gitweb/Makefile
+++ b/gitweb/Makefile
@@ -152,6 +152,10 @@ install: all
 	$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(gitwebstaticdir_SQ)'
 	$(INSTALL) -m 644 $(GITWEB_FILES) '$(DESTDIR_SQ)$(gitwebstaticdir_SQ)'
 
+test-installed: install
+	GITWEB_TEST_INSTALLED='$(DESTDIR_SQ)$(gitwebdir_SQ)' \
+		$(MAKE) -C ../t gitweb-test
+
 ### Cleaning rules
 
 clean:
diff --git a/t/Makefile b/t/Makefile
index c7baefb..7aa409a 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)
 
-- 
1.7.2.1

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]