projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add support for OpenBSD
[urcu.git]
/
tests
/
benchmark
/
runtests-batch.sh
diff --git
a/tests/benchmark/runtests-batch.sh
b/tests/benchmark/runtests-batch.sh
index 0e5577b3cdc4a9cf3c783a6301d2ff997ac85d09..55650234f4268b229b50350e1cadd1f8a1bbd8d1 100755
(executable)
--- a/
tests/benchmark/runtests-batch.sh
+++ b/
tests/benchmark/runtests-batch.sh
@@
-1,35
+1,36
@@
#!/bin/bash
#!/bin/bash
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# SPDX-FileCopyrightText: 2022 EfficiOS Inc.
+#
+
+if [ "x${URCU_TESTS_SRCDIR:-}" != "x" ]; then
+ UTILSSH="$URCU_TESTS_SRCDIR/utils/utils.sh"
+else
+ UTILSSH="$(dirname "$0")/../utils/utils.sh"
+fi
-source ../utils/tap.sh
+# Enable TAP
+SH_TAP=1
-NUM_TESTS=1
+# shellcheck source=../utils/utils.sh
+source "$UTILSSH"
-plan_tests ${NUM_TESTS}
-. ./common.sh
+# Create a temporary file for tests output
+TMPFILE=$(mktemp)
-function cleanup()
-{
- if [ x"$tmpfile" != x"" ]; then
- rm -f $tmpfile
- fi
-}
+# Set trap to delete the temporary file on exit and call tap.sh '_exit'
+trap 'rm -f "$TMPFILE"; _exit' EXIT
-tmpfile=
-trap cleanup SIGINT SIGTERM EXIT
-tmpfile=$(mktemp)
-# Check if time bin is non-empty
-if [ -n "$test_time_bin" ]; then
- time_command="$test_time_bin"
-else
- time_command=""
-fi
+NUM_TESTS=1
-tmpfile=$(mktemp)
+plan_tests ${NUM_TESTS}
#for a in test_urcu_gc test_urcu_gc_mb test_urcu_qsbr_gc; do
for a in test_urcu_gc; do
#for a in test_urcu_gc test_urcu_gc_mb test_urcu_qsbr_gc; do
for a in test_urcu_gc; do
- okx
$time_command -o $tmpfile ./${a} $*
- diag "time: $(cat
$tmpfile
)"
+ okx
"${URCU_TESTS_TIME_BIN}" "${URCU_TESTS_BUILDDIR}/benchmark/${a}" "$@" 2>"${TMPFILE}"
+ diag "time: $(cat
"${TMPFILE}"
)"
done
done
This page took
0.024307 seconds
and
4
git commands to generate.