Commit | Line | Data |
---|---|---|
da56d5ca | 1 | #!/usr/bin/env bash |
de6cb9d5 MJ |
2 | # |
3 | # SPDX-License-Identifier: GPL-2.0-only | |
4 | # | |
5 | # SPDX-FileCopyrightText: 2022 EfficiOS Inc. | |
6 | # | |
7 | ||
8 | if [ "x${URCU_TESTS_SRCDIR:-}" != "x" ]; then | |
9 | UTILSSH="$URCU_TESTS_SRCDIR/utils/utils.sh" | |
10 | else | |
11 | UTILSSH="$(dirname "$0")/../utils/utils.sh" | |
12 | fi | |
13 | ||
14 | # Enable TAP | |
15 | SH_TAP=1 | |
16 | ||
17 | # shellcheck source=../utils/utils.sh | |
18 | source "$UTILSSH" | |
19 | ||
20 | ||
21 | # Create a temporary file for tests output | |
22 | TMPFILE=$(mktemp) | |
23 | ||
24 | # Set trap to delete the temporary file on exit and call tap.sh '_exit' | |
25 | trap 'rm -f "$TMPFILE"; _exit' EXIT | |
ad460058 | 26 | |
ad460058 MD |
27 | |
28 | NUM_TESTS=1 | |
29 | ||
30 | plan_tests ${NUM_TESTS} | |
a813abf8 | 31 | |
f8cbb9da | 32 | #for a in test_urcu_gc test_urcu_gc_mb test_urcu_qsbr_gc; do |
657a89f1 | 33 | for a in test_urcu_gc; do |
de6cb9d5 | 34 | okx "${URCU_TESTS_TIME_BIN}" "${URCU_TESTS_BUILDDIR}/benchmark/${a}" "$@" 2>"${TMPFILE}" |
748f9af1 | 35 | diag "time: $(cat "${TMPFILE}")" |
a813abf8 | 36 | done |