git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Cc: Jakub Narebski <jnareb@gmail.com>
Subject: [PATCHv2 3/3] gitweb/Makefile: Add 'test' and 'test-installed' targets
Date: Sun, 26 Sep 2010 15:02:26 +0200	[thread overview]
Message-ID: <1285506146-8009-4-git-send-email-jnareb@gmail.com> (raw)
In-Reply-To: <1285506146-8009-1-git-send-email-jnareb@gmail.com>

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>
---
Changes from previous version:

* 'test-installed' no longer has 'install' as requirement, which means that
  testing installed target does not force an install.  We cannot check easily
  and reliably that install is fresh.

* Added 'test' convenience target.

* Moved "Testing rules" section before "Installation rules", the way it is done
  in main Makefile.

 gitweb/Makefile |   11 ++++++++++-
 t/Makefile      |    4 ++++
 2 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/gitweb/Makefile b/gitweb/Makefile
index 88bcf08..df908a1 100644
--- a/gitweb/Makefile
+++ b/gitweb/Makefile
@@ -144,6 +144,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
@@ -157,5 +166,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 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.3

      parent reply	other threads:[~2010-09-26 13:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-26 13:02 [PATCHv2 0/3] Testing installed gitweb Jakub Narebski
2010-09-26 13:02 ` [PATCHv2 1/3] gitweb/Makefile: Include gitweb/config.mak Jakub Narebski
2010-09-26 13:02 ` [PATCHv2 2/3] t/gitweb-lib.sh: Add support for GITWEB_TEST_INSTALLED Jakub Narebski
2010-09-26 13:02 ` Jakub Narebski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1285506146-8009-4-git-send-email-jnareb@gmail.com \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).