X-Git-Url: https://git.lttng.org/?p=urcu.git;a=blobdiff_plain;f=tests%2Fbenchmark%2Fruntests.sh;h=781e8f7f7e32d735e16430280d21b12448a24706;hp=38e798c809b045df47fbe84232d437e6c425d0fc;hb=ad46005890368f9c306f0c510b3d4b08c47b66f8;hpb=9ee07024d322512ce099acb16774cec2766ab09f diff --git a/tests/benchmark/runtests.sh b/tests/benchmark/runtests.sh index 38e798c..781e8f7 100755 --- a/tests/benchmark/runtests.sh +++ b/tests/benchmark/runtests.sh @@ -1,8 +1,23 @@ -#!/bin/sh +#!/bin/bash + +source ../utils/tap.sh + +NUM_TESTS=15 + +plan_tests ${NUM_TESTS} . ./common.sh -log_file="runall.detail.log" +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 @@ -15,7 +30,6 @@ for a in test_urcu_gc test_urcu_signal_gc test_urcu_mb_gc test_urcu_qsbr_gc \ test_urcu_lgc test_urcu_signal_lgc test_urcu_mb_lgc test_urcu_qsbr_lgc \ test_urcu test_urcu_signal test_urcu_mb test_urcu_qsbr \ test_rwlock test_perthreadlock test_mutex; do - echo "./${a} $*" | tee -a "$log_file" - $time_command ./${a} $* 2>> $log_file + okx $time_command -o $tmpfile ./${a} $* + diag "time: $(cat $tmpfile)" done -