runtests: check for existence of /usr/bin/time
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 1 line · * Simon Marchi ([email protected]) wrote:
Otherwise, if
/usr/bin/timedoes not exist, the tests won't run at all.
Hrm, wouldn't it be better if configure.ac checks that time is there ?
Thanks,
Mathieu
Quoted 57 lines
Signed-off-by Simon Marchi <[email protected]>--- tests/runtests-batch.sh | 8 +++++++- tests/runtests.sh | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-)tests/runtests-batch.sh +7
-1@@ -1,8 +1,14 @@ #!/bin/sh +if [ -x /usr/bin/time ]; then + TIME_COMMAND="/usr/bin/time -a -o runnall.detail.log" +else + TIME_COMMAND="" +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 runall.detail.log - /usr/bin/time -a -o runall.detail.log ./${a} $* + $TIME_COMMAND ./${a} $* donetests/runtests.sh +7
-1@@ -1,10 +1,16 @@ #!/bin/sh +if [ -x /usr/bin/time ]; then + TIME_COMMAND="/usr/bin/time -a -o runnall.detail.log" +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 -a -o runall.detail.log ./${a} $* + $TIME_COMMAND ./${a} $* doneSignature · 7 lines
1.7.1 _______________________________________________ lttng-dev mailing list [email protected] http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
Signature · 4 lines
Mathieu Desnoyers Operating System Efficiency R&D Consultant EfficiOS Inc. http://www.efficios.com