From: Jim Meyering Date: Tue, 17 Nov 2009 07:42:58 +0000 (+0100) Subject: test-xalloc-die.sh: fix a portability bug X-Git-Tag: v0.1~5184 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=67bcb9c5ab3c175704db5cd355768b68aa83cb23;p=gnulib.git 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 "./". --- 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 ;;