summaryrefslogtreecommitdiff
path: root/build-aux/run-test
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2022-01-08 11:51:07 +0100
committerJörg Frings-Fürst <debian@jff.email>2022-01-08 11:51:07 +0100
commitbe8efac78d067c138ad8dda03df4336e73f94887 (patch)
tree5f5254a628ba0ef72065b93d949d1c985742ea8e /build-aux/run-test
parent7b65dbd4ebade81d504cfe5e681292a58ad1fdf0 (diff)
New upstream version 1.0upstream/1.0
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 cfa77518..7c980ce2 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