diff options
author | michelou <michelou@epfl.ch> | 2007-07-16 11:54:26 +0000 |
---|---|---|
committer | michelou <michelou@epfl.ch> | 2007-07-16 11:54:26 +0000 |
commit | 511a3ff39a6c3c228cfb0ef4050087488f237c54 (patch) | |
tree | 02f74a03f473d1ee00cf73c77722d5a4b42f4136 /test/scalatest | |
parent | e48c7736476650ea2e1a691631786530a34e1801 (diff) | |
download | scala-511a3ff39a6c3c228cfb0ef4050087488f237c54.tar.gz scala-511a3ff39a6c3c228cfb0ef4050087488f237c54.tar.bz2 scala-511a3ff39a6c3c228cfb0ef4050087488f237c54.zip |
added elapsed time info
Diffstat (limited to 'test/scalatest')
-rwxr-xr-x | test/scalatest | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/scalatest b/test/scalatest index a2b7b43b24..8bb513acf6 100755 --- a/test/scalatest +++ b/test/scalatest @@ -816,13 +816,19 @@ else fi; printf_outline "\\n"; +START_SECONDS=`date +%s`; test_check_all; +END_SECONDS=`date +%s`; TOTAL_COUNT=`echo "$FAILURE_COUNT+$SUCCESS_COUNT" | bc`; + +ELAPSED_SECONDS=`expr $END_SECONDS - $START_SECONDS`; +ELAPSED_TIME=`date --date="1970-01-01 $ELAPSED_SECONDS sec" +%T`; + if [ $FAILURE_COUNT -eq 0 ]; then - printf_success "All of $TOTAL_COUNT tests were successful\\n"; + printf_success "All of $TOTAL_COUNT tests were successful (elapsed time: $ELAPSED_TIME)\\n"; else - printf_failure "$FAILURE_COUNT of $TOTAL_COUNT tests failed\\n"; + printf_failure "$FAILURE_COUNT of $TOTAL_COUNT tests failed (elapsed time: $ELAPSED_TIME)\\n"; fi; if [ $FAILURE_COUNT -eq "$ERRORS" ]; then |