git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] t5801: properly test the test shell
@ 2013-04-25 10:09 Michael J Gruber
  2013-04-25 10:59 ` Johannes Sixt
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Michael J Gruber @ 2013-04-25 10:09 UTC (permalink / raw)
  To: git; +Cc: Felipe Contreras, Junio C Hamano

fc407f9 (Add new simplified git-remote-testgit, 2012-11-28) introduced a
test which was meant to skip the test unless the test shell is bash.
Unfortunately, it tests for the availability of bash only. But users can
opt to use a different shell (using SHELL_PATH) for the tests even though
bash is available.

At least for dash,
21610d8 (transport-helper: clarify pushing without refspecs, 2013-04-17)
is the commit which actually introduces a test (pushing without refspec)
which fails to fail even though it is supposed to. It uses the
construct:

VAR=value function arguments

Make t5801 actually test whether the test shell is bash.

An even better alternative would be to make the test POSIX compliant, of
course.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
---
 t/t5801-remote-helpers.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t5801-remote-helpers.sh b/t/t5801-remote-helpers.sh
index ed962c4..c979863 100755
--- a/t/t5801-remote-helpers.sh
+++ b/t/t5801-remote-helpers.sh
@@ -8,7 +8,7 @@ test_description='Test remote-helper import and export commands'
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-gpg.sh
 
-if ! type "${BASH-bash}" >/dev/null 2>&1; then
+if test $(basename "${SHELL_PATH}") != "bash"; then
 	skip_all='skipping remote-testgit tests, bash not available'
 	test_done
 fi
-- 
1.8.2.1.882.gefdb4b7

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-04-26 18:34 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-25 10:09 [PATCH] t5801: properly test the test shell Michael J Gruber
2013-04-25 10:59 ` Johannes Sixt
2013-04-25 11:21   ` Michael J Gruber
2013-04-25 11:35     ` Johannes Sixt
2013-04-25 16:22   ` Junio C Hamano
2013-04-25 13:06 ` Torsten Bögershausen
2013-04-25 16:25   ` Junio C Hamano
2013-04-25 16:20 ` Junio C Hamano
2013-04-25 17:12   ` Junio C Hamano
2013-04-26  9:55     ` Michael J Gruber
2013-04-26 18:33       ` Junio C Hamano

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).