X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=tests%2Fruntests.sh;h=60011744e67699f3eaaa88181257eec008a3d620;hp=4b5f745b01a1e294be83a2bf3fa9e04a9df37589;hb=a5bae03d59c22e57263b8610b9fed99738303cf0;hpb=31b598e0bb2fde285afa63986613e632e98b104d diff --git a/tests/runtests.sh b/tests/runtests.sh index 4b5f745..6001174 100755 --- a/tests/runtests.sh +++ b/tests/runtests.sh @@ -1,10 +1,21 @@ #!/bin/sh -for a in test_urcu_gc test_urcu_signal_gc test_urcu_mb_gc test_qsbr_gc \ - test_urcu_lgc test_urcu_signal_lgc test_urcu_mb_lgc test_qsbr_lgc \ - test_urcu test_urcu_signal test_urcu_mb test_qsbr \ +. ./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" +else + time_command="" +fi + +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 runall.detail.log - /usr/bin/time --append --output runall.detail.log ./${a} $* + echo "./${a} $*" | tee -a "$log_file" + $time_command ./${a} $* done