From 1fc0f979f50a0595cc2c76e81e0dca4e4cb4a5b8 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Sat, 8 Sep 2001 12:01:21 -0500 Subject: [svn-r4429] Description: Added a feature to print total test time spent in a host in addition to individual test time. Platforms tested: eirene, modi4, baldric. --- bin/runtest | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/bin/runtest b/bin/runtest index 0407a0f..bb2149d 100755 --- a/bin/runtest +++ b/bin/runtest @@ -150,15 +150,22 @@ PRINT_BLANK() PRINT } -# Print trailer summary -PRINT_TRAILER() +# Print test trailer +PRINT_TEST_TRAILER() { - PRINT "*** finished $TEST_TYPE tests in $HOSTNAME ***" + PRINT "*** finished $TEST_TYPE tests for $HOSTNAME ***" date; EndTime=`SecOfDay` PRINT Total time = `ElapsedTime $StartTime $EndTime` PRINT_BLANK - # reset StartTime for the next elapsed time report - StartTime=`SecOfDay` +} + +# Print trailer summary +PRINT_TRAILER() +{ + PRINT "*** finished tests in $HOSTNAME ***" + date; TotalEndTime=`SecOfDay` + PRINT Grand total tests time = `ElapsedTime $TotalStartTime $TotalEndTime` + PRINT_BLANK } # Figure out which remote command to use to reach a host. @@ -542,12 +549,13 @@ fi trap PRINT_TRAILER 0 # -StartTime=`SecOfDay` +TotalStartTime=`SecOfDay` # Process the configuration SNAPTEST_CONFIG PRINT STANDARD_OPT=$STANDARD_OPT PRINT TEST_TYPES=$TEST_TYPES +PRINT_BLANK # Do a checkout if one has not been done today # Also check MANIFEST file @@ -656,9 +664,10 @@ fi n_test=1 TEST="`echo $TEST_TYPES | cut -f1 -d';'`" while [ -n "$TEST" ]; do + StartTime=`SecOfDay` RUNSNAPTEST $TEST REPORT_RESULT - PRINT_TRAILER + PRINT_TEST_TRAILER n_test=`expr $n_test + 1` TEST="`echo $TEST_TYPES | cut -f$n_test -s -d';'`" @@ -666,6 +675,8 @@ done FLUSH_FILES +PRINT_TRAILER + # disable trailer summary printing since all trailers have been # printed and we are exiting normally. trap 0 -- cgit v0.12