unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] test: test-lib.sh: use $BASH instead of ${SHELL-sh} to relaunch
@ 2016-09-24 12:43 Tomi Ollila
  2016-09-24 13:03 ` David Bremner
  2016-09-24 13:17 ` David Bremner
  0 siblings, 2 replies; 4+ messages in thread
From: Tomi Ollila @ 2016-09-24 12:43 UTC (permalink / raw)
  To: notmuch; +Cc: tomi.ollila

In case of the test script is to be relaunced under valgrind, or --tee
is requested, use the $BASH shell variable to locate the command
interpreter. The $SHELL variable is re-set by non-interactive shells
so in case the shell uses some other shell (e.g. zsh) for interactive
use these bash scripts continue to work.
---
 test/test-lib.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/test-lib.sh b/test/test-lib.sh
index e2e26e6..bda8a80 100644
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -39,7 +39,7 @@ done,*)
 *' --tee '*|*' --va'*)
 	mkdir -p test-results
 	BASE=test-results/$this_test
-	(GIT_TEST_TEE_STARTED=done ${SHELL-sh} "$0" "$@" 2>&1;
+	(GIT_TEST_TEE_STARTED=done "$BASH" "$0" "$@" 2>&1;
 	 echo $? > $BASE.exit) | tee $BASE.out
 	test "$(cat $BASE.exit)" = 0
 	exit
-- 
2.7.4

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

* Re: [PATCH] test: test-lib.sh: use $BASH instead of ${SHELL-sh} to relaunch
  2016-09-24 12:43 Tomi Ollila
@ 2016-09-24 13:03 ` David Bremner
  2016-09-24 13:17 ` David Bremner
  1 sibling, 0 replies; 4+ messages in thread
From: David Bremner @ 2016-09-24 13:03 UTC (permalink / raw)
  To: Tomi Ollila, notmuch; +Cc: tomi.ollila

Tomi Ollila <tomi.ollila@iki.fi> writes:

> In case of the test script is to be relaunced under valgrind, or --tee
> is requested, use the $BASH shell variable to locate the command
> interpreter. The $SHELL variable is re-set by non-interactive shells
> so in case the shell uses some other shell (e.g. zsh) for interactive
> use these bash scripts continue to work.

This seems to fix the problem I was having. I did notice the test_C
function probably needs to be updated to pay attention to valgrind
option, but that is more of a feature request than a bug.

d

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

* Re: [PATCH] test: test-lib.sh: use $BASH instead of ${SHELL-sh} to relaunch
  2016-09-24 12:43 Tomi Ollila
  2016-09-24 13:03 ` David Bremner
@ 2016-09-24 13:17 ` David Bremner
  1 sibling, 0 replies; 4+ messages in thread
From: David Bremner @ 2016-09-24 13:17 UTC (permalink / raw)
  To: Tomi Ollila, notmuch; +Cc: tomi.ollila

Tomi Ollila <tomi.ollila@iki.fi> writes:

> In case of the test script is to be relaunced under valgrind, or --tee
> is requested, use the $BASH shell variable to locate the command
> interpreter. The $SHELL variable is re-set by non-interactive shells
> so in case the shell uses some other shell (e.g. zsh) for interactive
> use these bash scripts continue to work.
> ---
>  test/test-lib.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

pushed

d

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

* [PATCH] test: test-lib.sh: use $BASH instead of ${SHELL-sh} to relaunch
@ 2016-09-24 13:27 Tomi Ollila
  0 siblings, 0 replies; 4+ messages in thread
From: Tomi Ollila @ 2016-09-24 13:27 UTC (permalink / raw)
  To: notmuch; +Cc: tomi.ollila

In case of the test script is to be relaunced under valgrind, or --tee
is requested, use the $BASH shell variable to locate the command
interpreter.
The $SHELL environment variable is not set by bash if it already
had non-empty value (e.g. "/bin/zsh").
After this change requesting script relaunch from users' "incompatible"
(i.e. not bash 4.x) cli SHELLs will work.
---

this obsoletes id:1474721007-15011-1-git-send-email-tomi.ollila@iki.fi
(commit message change)

some times it is really hard to come up with tolerable commit message...


 test/test-lib.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/test-lib.sh b/test/test-lib.sh
index 21940d183b45..4f99f7c7a233 100644
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -42,7 +42,7 @@ done,*)
 *' --tee '*|*' --va'*)
 	mkdir -p test-results
 	BASE=test-results/$this_test
-	(GIT_TEST_TEE_STARTED=done ${SHELL-sh} "$0" "$@" 2>&1;
+	(GIT_TEST_TEE_STARTED=done "$BASH" "$0" "$@" 2>&1;
 	 echo $? > $BASE.exit) | tee $BASE.out
 	test "$(cat $BASE.exit)" = 0
 	exit
-- 
2.8.2

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

end of thread, other threads:[~2016-09-24 13:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-24 13:27 [PATCH] test: test-lib.sh: use $BASH instead of ${SHELL-sh} to relaunch Tomi Ollila
  -- strict thread matches above, loose matches on Subject: below --
2016-09-24 12:43 Tomi Ollila
2016-09-24 13:03 ` David Bremner
2016-09-24 13:17 ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

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 read-only IMAP folder(s) and NNTP newsgroup(s).