List for cgit developers and users
 help / color / mirror / Atom feed
From: john at keeping.me.uk (John Keeping)
Subject: [PATCH 1/8] tests: allow shell to be overridden
Date: Thu, 13 Aug 2015 12:14:13 +0100	[thread overview]
Message-ID: <63fa8fb124f4f4e63cf13842dde5daeeed927dd9.1439464215.git.john@keeping.me.uk> (raw)
In-Reply-To: <cover.1439464215.git.john@keeping.me.uk>

On some systems (e.g. Solaris), /bin/sh is not a POSIX shell.  Git
already provides suitable overrides in its config.mak.uname file and we
provide cgit.conf to allow the user to further change this.

The code for this is taken from Git's t/Makefile, meaning that we now
invoke the tests in the same way that Git does.

Signed-off-by: John Keeping <john at keeping.me.uk>
---
 tests/Makefile | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/Makefile b/tests/Makefile
index 1556475..65e1117 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -1,11 +1,15 @@
+include ../git/config.mak.uname
+-include ../cgit.conf
 
+SHELL_PATH ?= $(SHELL)
+SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
 
 T = $(wildcard t[0-9][0-9][0-9][0-9]-*.sh)
 
 all: $(T)
 
 $(T):
-	@./$@ $(CGIT_TEST_OPTS)
+	@'$(SHELL_PATH_SQ)' $@ $(CGIT_TEST_OPTS)
 
 clean:
 	$(RM) -rf trash
-- 
2.5.0.466.g9af26fa



  reply	other threads:[~2015-08-13 11:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-13 11:14 [PATCH 0/8] Portability fixes john
2015-08-13 11:14 ` john [this message]
2015-08-13 11:14 ` [PATCH 2/8] Makefile: include Git's config.mak.uname john
2015-08-13 11:14 ` [PATCH 3/8] Remove redundant includes john
2015-08-13 13:36   ` Jason
2015-08-13 13:49     ` john
2015-08-20 13:51     ` mathstuf
2015-08-13 11:14 ` [PATCH 4/8] configfile.c: don't include system headers directly john
2015-08-13 11:14 ` [PATCH 5/8] cache.c: fix header order john
2015-08-13 11:14 ` [PATCH 6/8] cgit.h: move stdbool.h from ui-shared.h john
2015-08-13 11:14 ` [PATCH 7/8] ui-tree: use "sane" isgraph() john
2015-08-13 11:14 ` [PATCH 8/8] filter: don't use dlsym unnecessarily john
2015-08-13 13:38 ` [PATCH 0/8] Portability fixes Jason

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=63fa8fb124f4f4e63cf13842dde5daeeed927dd9.1439464215.git.john@keeping.me.uk \
    --to=cgit@lists.zx2c4.com \
    /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).