From be8efac78d067c138ad8dda03df4336e73f94887 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sat, 8 Jan 2022 11:51:07 +0100 Subject: New upstream version 1.0 --- build-aux/run-test | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'build-aux/run-test') diff --git a/build-aux/run-test b/build-aux/run-test index cfa7751..7c980ce 100755 --- a/build-aux/run-test +++ b/build-aux/run-test @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (C) 2009 Free Software Foundation, Inc. +# Copyright (C) 2009-2022 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -13,7 +13,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # This program is a test driver that supports running a test under valgrind. @@ -47,9 +47,9 @@ Report bugs to Bruno Haible." func_version () { echo "\ -run-test (GNU libunistring) -Copyright (C) 2009 Free Software Foundation, Inc. -License GPLv3+: GNU GPL version 3 or later +run-test (GNU gnulib) +Copyright (C) 2019 Free Software Foundation, Inc. +License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. @@ -104,17 +104,26 @@ func_fatal_error () if test -z "$checker"; then # No checker. Run the test directly. - exec "$@" + case "$1" in + *.sh) + # Support environments where sh exists but not /bin/sh. + exec sh "$@" + ;; + *) + exec "$@" + ;; + esac else # Using valgrind. We want to apply valgrind only to executables, not to - # shell script, because + # shell scripts, because # 1. we don't want to look for memory leaks in bash, # 2. on a bi-arch system, we would get an error message such as # "valgrind: wrong executable class (eg. 32-bit instead of 64-bit)". case "$1" in *.sh) # A shell script. Ignore the checker. - exec "$@" + # Support environments where sh exists but not /bin/sh. + exec sh "$@" ;; *) # The 'file' command is not portable enough. So, look -- cgit v1.2.3