[Swift-commit] r3649 - trunk/tests

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Mon Sep 27 16:19:48 CDT 2010


Author: wozniak
Date: 2010-09-27 16:19:48 -0500 (Mon, 27 Sep 2010)
New Revision: 3649

Modified:
   trunk/tests/nightly.sh
Log:
Output readability improvements


Modified: trunk/tests/nightly.sh
===================================================================
--- trunk/tests/nightly.sh	2010-09-27 18:51:54 UTC (rev 3648)
+++ trunk/tests/nightly.sh	2010-09-27 21:19:48 UTC (rev 3649)
@@ -155,6 +155,8 @@
 
 SWIFTCOUNT=0
 
+echo "HTML_OUTPUT: $HTML"
+
 cd $TOPDIR
 mkdir -p $RUNDIR
 [ $? != 0 ] && echo "Could not mkdir: $RUNDIR" && exit 1
@@ -175,6 +177,12 @@
   exit 1
 }
 
+verbose() {
+  MSG="${*}"
+  (( $VERBOSE )) && echo $MSG
+  return 0
+}
+
 header() {
   CURRENT=$SCRIPTDIR/html/current.html
   sed "s at _HTMLBASE_@$HTMLPATH@" < $CURRENT > $TOPDIR/current.html
@@ -426,8 +434,8 @@
   TEST_LOG="output_$LOGCOUNT.txt"
   banner "$LASTCMD" $RUNDIR/$TEST_LOG
   if [ -f $OUTPUT ]; then
-    cp -v $OUTPUT $RUNDIR/$TEST_LOG 2>>$LOG
-    cp -v $OUTPUT $RUNDIR/stdout.txt
+    cp $OUTPUT $RUNDIR/$TEST_LOG 2>>$LOG
+    cp $OUTPUT $RUNDIR/stdout.txt
   fi
   let "LOGCOUNT=$LOGCOUNT+1"
 }
@@ -477,7 +485,7 @@
 
 process_exec() {
   printf "\nExecuting: $@" >>$LOG
-  rm -fv $OUTPUT
+  rm -f $OUTPUT
 
   "$@" > $OUTPUT 2>&1 &
   EXEC_PID=$!
@@ -538,12 +546,13 @@
   V=$SWIFTCOUNT
 
   # Use background so kill/trap is immediate
-  sleep $TIMEOUT &
+  sleep $TIMEOUT > /dev/null 2>&1 &
   SLEEP_PID=$!
-  trap "monitor_trap $SLEEP_PID $V" SIGTERM
+  trap "monitor_trap $SLEEP_PID $V > /dev/null 2>&1" SIGTERM
   wait $SLEEP_PID
-  [ $? != 0 ] && echo "monitor($V) cancelled" && return 0
+  [ $? != 0 ] && verbose "monitor($V) cancelled" && return 0
 
+  echo "monitor($V): killing test process..."
   /bin/kill -TERM $PID
   KILLCODE=$?
   if [ $KILLCODE == 0 ]; then
@@ -553,14 +562,13 @@
   sleep 1
   MSG="nightly.sh: monitor($V): killed: exceeded $TIMEOUT seconds"
   echo "$MSG" >> $OUTPUT
-  trap
+  # trap
   return 1
 }
 
 monitor_trap() {
   SLEEP_PID=$1
   V=$2
-  echo "monitor_trap($V)"
   /bin/kill -9 $SLEEP_PID
 }
 
@@ -590,7 +598,7 @@
 
   # If EXITCODE != 0, monitor() may have work to do
   (( $EXITCODE != 0 )) && sleep 5
-  echo "Killing monitor..."
+  verbose "Killing monitor..."
   /bin/kill -TERM $MONITOR_PID
 
   echo "TOOK: $(( STOP-START ))"
@@ -706,9 +714,11 @@
   if [ -f $TEMPLATE ]; then
     sed "s at _WORK_@$PWD/work@;s at _HOST_@$GLOBUS_HOSTNAME@" < $TEMPLATE > sites.xml
     [ $? != 0 ] && crash "Could not create sites.xml!"
+    echo "Using: $GROUP/sites.template.xml"
   else
     sed "s at _WORK_@$PWD/work@" < $TESTDIR/sites/localhost.xml > sites.xml
     [ $? != 0 ] && crash "Could not create sites.xml!"
+    echo "Using: $TESTDIR/sites/localhost.xml"
   fi
 }
 
@@ -716,6 +726,7 @@
   if [ -f $GROUP/tc.template.data ]; then
     sed "s at _DIR_@$GROUP@" < $GROUP/tc.template.data > tc.data
     [ $? != 0 ] && crash "Could not create tc.data!"
+    echo "Using: $GROUP/tc.template.data"
   else
     cp -v $SWIFT_HOME/etc/tc.data .
     [ $? != 0 ] && crash "Could not copy tc.data!"
@@ -726,6 +737,7 @@
   if [ -f $GROUP/fs.template.data ]; then
     sed "s at _PWD_@$PWD@" < $GROUP/fs.template.data > fs.data
     [ $? != 0 ] && crash "Could not create fs.data!"
+    echo "Using: $GROUP/fs.template.data"
   else
     rm -f fs.data
   fi




More information about the Swift-commit mailing list