uatomic/x86: Remove redundant memory barriers
[urcu.git] / tests / benchmark / runtests-batch.sh
index 2da1401b15771c91e5e76090161027a91108aeca..93af6d4596d055422ceed26f6b96aefa7e093c5e 100755 (executable)
@@ -1,19 +1,36 @@
-#!/bin/sh
+#!/usr/bin/env bash
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# SPDX-FileCopyrightText: 2022 EfficiOS Inc.
+#
 
-. ./common.sh
-
-log_file="runall.detail.log"
-
-# Check if time bin is non-empty
-if [ -n "$test_time_bin" ]; then
-       time_command="$test_time_bin -a -o $log_file"
+if [ "x${URCU_TESTS_SRCDIR:-}" != "x" ]; then
+       UTILSSH="$URCU_TESTS_SRCDIR/utils/utils.sh"
 else
-       time_command=""
+       UTILSSH="$(dirname "$0")/../utils/utils.sh"
 fi
 
+# Enable TAP
+SH_TAP=1
+
+# shellcheck source=../utils/utils.sh
+source "$UTILSSH"
+
+
+# Create a temporary file for tests output
+TMPFILE=$(mktemp)
+
+# Set trap to delete the temporary file on exit and call tap.sh '_exit'
+trap 'rm -f "$TMPFILE"; _exit' EXIT
+
+
+NUM_TESTS=1
+
+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
-       echo "./${a} $*" | tee -a "$log_file"
-       $time_command ./${a} $*
+       okx "${URCU_TESTS_TIME_BIN}" "${URCU_TESTS_BUILDDIR}/benchmark/${a}" "$@" 2>"${TMPFILE}"
+       diag "time: $(cat "${TMPFILE}")"
 done
-
This page took 0.023019 seconds and 4 git commands to generate.