From b67493fcda5ffe9f51b65ee95ca23714b7d9a555 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Thu, 24 Feb 2005 17:12:10 -0500 Subject: [svn-r10080] Purpose: Feature Description: Added code to dump the beginnng and last few lines of the test log file if errors have occurred. Platforms tested: Tested the code itself separatedly but daily test is where it is really tested. Should work. --- bin/runtest | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/bin/runtest b/bin/runtest index f188cad..d4a75e7 100755 --- a/bin/runtest +++ b/bin/runtest @@ -391,9 +391,14 @@ RUNSNAPTEST() date >> $LOGFILE if [ $retcode -ne 0 ]; then - echo FAILED in $LOGFILE >> $FAILEDDETAIL - else - echo PASSED in $LOGFILE >> $FAILEDDETAIL + # Dump the first 10 lines and the last 30 lines of the LOGFILE. + ( nhead=10; ntail=30; + echo ===Dumping first $nhead and last $ntail lines of $LOGFILE + head -$nhead $LOGFILE + echo "[last $ntail lines]..." + tail -$ntail $LOGFILE + echo ===Dumping done=== + ) >> $FAILEDDETAIL fi } -- cgit v0.12