aboutsummaryrefslogtreecommitdiff
path: root/contrib/bc/tests/script.sh
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/bc/tests/script.sh')
-rwxr-xr-xcontrib/bc/tests/script.sh25
1 files changed, 4 insertions, 21 deletions
diff --git a/contrib/bc/tests/script.sh b/contrib/bc/tests/script.sh
index b1346ef09904..ce5cf19ee275 100755
--- a/contrib/bc/tests/script.sh
+++ b/contrib/bc/tests/script.sh
@@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: BSD-2-Clause
#
-# Copyright (c) 2018-2024 Gavin D. Howard and contributors.
+# Copyright (c) 2018-2025 Gavin D. Howard and contributors.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
@@ -44,7 +44,7 @@ usage() {
if [ $# -eq 1 ]; then
printf '%s\n\n' "$1"
fi
- printf 'usage: %s dir script [run_extra_tests] [run_stack_tests] [generate_tests] [time_tests] [exec args...]\n' "$script"
+ printf 'usage: %s dir script [run_extra_tests] [run_stack_tests] [generate_tests] [exec args...]\n' "$script"
exit 1
}
@@ -91,15 +91,6 @@ else
fi
if [ "$#" -gt 0 ]; then
- time_tests="$1"
- shift
- check_bool_arg "$time_tests"
-else
- time_tests=0
- check_bool_arg "$generate"
-fi
-
-if [ "$#" -gt 0 ]; then
exe="$1"
shift
check_exec_arg "$exe"
@@ -209,16 +200,8 @@ set +e
printf 'Running %s script %s...' "$d" "$f"
-# Yes this is poor timing, but it works.
-if [ "$time_tests" -ne 0 ]; then
- printf '\n'
- printf '%s\n' "$halt" 2> /dev/null | /usr/bin/time -p "$exe" "$@" $options "$s" > "$out"
- err="$?"
- printf '\n'
-else
- printf '%s\n' "$halt" 2> /dev/null | "$exe" "$@" $options "$s" > "$out"
- err="$?"
-fi
+printf '%s\n' "$halt" 2> /dev/null | "$exe" "$@" $options "$s" > "$out"
+err="$?"
checktest "$d" "$err" "script $f" "$res" "$out"