summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authormichelou <michelou@epfl.ch>2007-07-16 11:54:26 +0000
committermichelou <michelou@epfl.ch>2007-07-16 11:54:26 +0000
commit511a3ff39a6c3c228cfb0ef4050087488f237c54 (patch)
tree02f74a03f473d1ee00cf73c77722d5a4b42f4136 /test
parente48c7736476650ea2e1a691631786530a34e1801 (diff)
downloadscala-511a3ff39a6c3c228cfb0ef4050087488f237c54.tar.gz
scala-511a3ff39a6c3c228cfb0ef4050087488f237c54.tar.bz2
scala-511a3ff39a6c3c228cfb0ef4050087488f237c54.zip
added elapsed time info
Diffstat (limited to 'test')
-rwxr-xr-xtest/scalatest10
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