summaryrefslogtreecommitdiff
path: root/build-aux/run-test
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2022-01-08 11:53:52 +0100
committerJörg Frings-Fürst <debian@jff.email>2022-01-08 11:53:52 +0100
commitfa838e76139763f902c7d27cb9e1d393ed6a15e4 (patch)
tree7d0ae09775ea950056193eaa2ca93844299d46f1 /build-aux/run-test
parentc78359d9542c86b972aac373efcf7bc7a8a560e5 (diff)
parent2959e59fab3bab834368adefd90bd4b1b094366b (diff)
Merge branch 'feature/upstream' into develop
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