From 67bcb9c5ab3c175704db5cd355768b68aa83cb23 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 17 Nov 2009 08:42:58 +0100 Subject: [PATCH] test-xalloc-die.sh: fix a portability bug * tests/test-xalloc-die.sh: Do not invoke via ./test-xalloc-die. Instead, set PATH to start with "." and invoke via "test-xalloc-die". Otherwise, argv[0] (as often seen in diagnostics) would be too system-dependent, sometimes with, and sometimes without the leading "./". --- ChangeLog | 6 ++++++ tests/test-xalloc-die.sh | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8b1853e88..1bfb24981 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2009-11-17 Jim Meyering + test-xalloc-die.sh: fix a portability bug + * tests/test-xalloc-die.sh: Do not invoke via ./test-xalloc-die. + Instead, set PATH to start with "." and invoke via "test-xalloc-die". + Otherwise, argv[0] (as often seen in diagnostics) would be too + system-dependent, sometimes with, and sometimes without the leading "./". + version-etc-fsf: relax license to LGPLv3+ * modules/version-etc-fsf (License): Relax license. diff --git a/tests/test-xalloc-die.sh b/tests/test-xalloc-die.sh index 340a500f7..53cdaeb3b 100755 --- a/tests/test-xalloc-die.sh +++ b/tests/test-xalloc-die.sh @@ -13,7 +13,9 @@ else fi tmpfiles="t-xalloc-die.tmp" -./test-xalloc-die${EXEEXT} 2> t-xalloc-die.tmp +PATH="$PATH:." +export PATH +test-xalloc-die${EXEEXT} 2> t-xalloc-die.tmp case $? in 1) ;; *) (exit 1); exit 1 ;; -- 2.11.0