From 235aa17446e11b06f8a3737360d3cd0cf87d16b7 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Sun, 10 Mar 2002 22:49:16 -0500 Subject: [svn-r5058] Purpose: Feature/bug fix Description: The 'snapshot diff' command is run in all cases, even after the initial "snapshot diff" and hosts are polled to run the test. It would not cause any harm except wasting time repeating diff'ing. Also, the path is quite right to invoke snapshot by merely "bin/snapshot diff" since it has not "cd" to the right directory yet. Solution: Added a new option of "-nodiff" to skip the special diff request. Then make "runtest" to call itself again with it to prevent any further unnecessary diff'ing. Platforms tested: eirene --- bin/runtest | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/bin/runtest b/bin/runtest index d4aca93..abc927f 100755 --- a/bin/runtest +++ b/bin/runtest @@ -422,7 +422,7 @@ FLUSH_FILES() USAGE() { cat <] [-all] [-nocvs] [ ...] +Usage: runtest [-h] [-debug] [-r] [-all] [-nocvs] [-nodiff] [ ...] -h print this help page -debug @@ -433,6 +433,8 @@ Usage: runtest [-h] [-debug] [-r] [-all] [-nocvs] [ ...] launch tests for all pre-defined testing hosts -nocvs do not do cvs commands + -nodiff + do not do diff commands launch tests for @@ -481,6 +483,10 @@ while [ $# -gt 0 ]; do # do not do cvs commands NOCVS=nocvs ;; + -nodiff) + # do not do diff commands + NODIFF=nodiff + ;; -*) # Unknow option PRINT "Unknown option ($1)" USAGE @@ -599,17 +605,20 @@ fi # run a snapshot diff to see if any significant differences between # the current and previous versions -($SNAPSHOT diff ) >> $DIFFLOG 2>&1 -errcode=$? -if [ $errcode -eq 0 ]; then - # no need to run test - PRINT "NO TEST: no significant differences between current and previous versions" | - tee -a $PASSEDLOG - exit 0 +if [ -z "$NODIFF" ]; then + $SNAPSHOT diff >> $DIFFLOG 2>&1 + errcode=$? + if [ $errcode -eq 0 ]; then + # no need to run test + PRINT "NO TEST: no significant differences between current and previous versions" | + tee -a $PASSEDLOG + exit 0 + fi fi # we can use the version of script in SNAPYARD/current now -PROGNAME="$SNAPYARD/current/$PROGNAME" +# Don't do the diff any more. +PROGNAME="$SNAPYARD/current/$PROGNAME -nodiff" # Decide to do test for the local host or for remote hosts if [ -n "$TESTHOST" -a $HOSTNAME != "$TESTHOST" ]; then -- cgit v0.12