summaryrefslogtreecommitdiff
path: root/build-aux/run-test
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2022-02-07 06:57:44 +0100
committerJörg Frings-Fürst <debian@jff.email>2022-02-07 06:57:44 +0100
commit6ffaa52cf732a84c0f8259dbc9b8183960ec5c33 (patch)
treed3136c22e3e805cfc0efe78412cce905a17e0c8d /build-aux/run-test
parent591cbf5878b7d4105b275585b9db1324c9dfce56 (diff)
parentaf151c593704a40e10efb28d1e3dd59a23a661f3 (diff)
Merge branch 'release/debian/1.0-1'debian/1.0-1
Diffstat (limited to 'build-aux/run-test')
-rwxr-xr-xbuild-aux/run-test25
1 files changed, 17 insertions, 8 deletions
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 <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
# 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 <http://gnu.org/licenses/gpl.html>
+run-test (GNU gnulib)
+Copyright (C) 2019 Free Software Foundation, Inc.
+License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
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