configure: enable extended compiler warnings
[urcu.git] / tests / benchmark / common.sh
CommitLineData
fce9a534
SM
1#
2# This file is meant to be sourced from other tests scripts.
3#
4
748f9af1
MJ
5cleanup() {
6 if [ x"$TMPFILE" != "x" ]; then
7 rm -f "$TMPFILE"
8 fi
fce9a534 9
748f9af1
MJ
10 # Call the tap.sh exit cleanup code
11 _exit
f80aadcd
MJ
12}
13
748f9af1 14xseq() {
f80aadcd
MJ
15 i=$1
16 while [[ "$i" -le "$2" ]]; do
17 echo "$i"
748f9af1 18 i=$(( i + 1 ))
f80aadcd
MJ
19 done
20}
748f9af1
MJ
21
22# Set TEST_TIME_BIN
23if [ -x "$URCU_TEST_TIME_BIN" ]; then
24 TEST_TIME_BIN="$URCU_TEST_TIME_BIN"
25elif [ -x "/usr/bin/time" ]; then
26 TEST_TIME_BIN="/usr/bin/time"
27else
28 TEST_TIME_BIN=""
29fi
30export TEST_TIME_BIN
31
32# Create a temporary file for tests output
33TMPFILE=$(mktemp)
34
35# Set traps to delete the temporary file on exit
36trap cleanup EXIT
This page took 0.044101 seconds and 4 git commands to generate.