Tests fix: errors in shell scripts
[urcu.git] / tests / benchmark / runtests-batch.sh
index 0e5577b3cdc4a9cf3c783a6301d2ff997ac85d09..f030de6e6e75617314761ca3e8a0628b72861310 100755 (executable)
@@ -1,35 +1,14 @@
 #!/bin/bash
 
-source ../utils/tap.sh
+. ../utils/tap.sh
+. ./common.sh
 
 NUM_TESTS=1
 
 plan_tests     ${NUM_TESTS}
 
-. ./common.sh
-
-function cleanup()
-{
-       if [ x"$tmpfile" != x"" ]; then
-               rm -f $tmpfile
-       fi
-}
-
-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
-
-tmpfile=$(mktemp)
-
 #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 "${TEST_TIME_BIN}" ./"${a}" "$@" 2>"${TMPFILE}"
+       diag "time: $(cat "${TMPFILE}")"
 done
This page took 0.02302 seconds and 4 git commands to generate.