tests: Use stderr redirection for time output
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 16 Mar 2015 01:15:41 +0000 (21:15 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 16 Mar 2015 01:15:41 +0000 (21:15 -0400)
Allows using Mac OS X time command in tests.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
tests/benchmark/runtests-batch.sh
tests/benchmark/runtests.sh

index 2da1401b15771c91e5e76090161027a91108aeca..3d295fb9c8bf835867fc3f9c60ce0b07fc29a372 100755 (executable)
@@ -6,7 +6,7 @@ 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"
+       time_command="$test_time_bin"
 else
        time_command=""
 fi
@@ -14,6 +14,6 @@ fi
 #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} $*
+       $time_command ./${a} $* 2>> $log_file
 done
 
index 60011744e67699f3eaaa88181257eec008a3d620..38e798c809b045df47fbe84232d437e6c425d0fc 100755 (executable)
@@ -6,7 +6,7 @@ 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"
+       time_command="$test_time_bin"
 else
        time_command=""
 fi
@@ -16,6 +16,6 @@ for a in test_urcu_gc test_urcu_signal_gc test_urcu_mb_gc test_urcu_qsbr_gc \
        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} $*
+       $time_command ./${a} $* 2>> $log_file
 done
 
This page took 0.027685 seconds and 4 git commands to generate.