[Swift-commit] r3805 - trunk/tests

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Tue Dec 14 16:23:08 CST 2010


Author: wozniak
Date: 2010-12-14 16:23:08 -0600 (Tue, 14 Dec 2010)
New Revision: 3805

Modified:
   trunk/tests/nightly.sh
Log:
Move site-specific environment check into GROUPLIST defn file


Modified: trunk/tests/nightly.sh
===================================================================
--- trunk/tests/nightly.sh	2010-12-14 22:19:04 UTC (rev 3804)
+++ trunk/tests/nightly.sh	2010-12-14 22:23:08 UTC (rev 3805)
@@ -42,6 +42,7 @@
 # groups/ subdirectory by the name of GROUPLISTFILE.
 # The GROUPLISTFILE:
 #      1) sets the array
+#      2) checks any variables needed by make_sites_sed()
 
 # OUTPUT is the stdout of the current test
 # stdout.txt retains stdout from the previous test (for *.clean.sh)
@@ -181,24 +182,6 @@
 
 TESTDIR=$TOPDIR/cog/modules/swift/tests
 
-checkvars GROUPLISTFILE
-echo "GROUPLISTFILE: $GROUPLISTFILE"
-source $GROUPLISTFILE
-
-cd $TOPDIR
-mkdir -p $RUNDIR
-[ $? != 0 ] && echo "Could not mkdir: $RUNDIR" && exit 1
-
-checkfail() {
-  ERR=$?
-  shift
-  MSG=${*}
-  if [[ $ERR != 0 ]]; then
-    echo "FAILED($ERR): $MSG"
-    exit $ERR
-  fi
-}
-
 # Ensure all given variables are set
 checkvars() {
   while (( ${#*} ))
@@ -211,6 +194,16 @@
   return 0
 }
 
+checkfail() {
+  ERR=$?
+  shift
+  MSG=${*}
+  if [[ $ERR != 0 ]]; then
+    echo "FAILED($ERR): $MSG"
+    exit $ERR
+  fi
+}
+
 crash() {
   MSG=$1
   echo $MSG
@@ -819,7 +812,6 @@
 
 # Generate the sites.sed file
 make_sites_sed() {
-  checkvars WORK QUEUE PROJECT
   {
     echo "s at _WORK_@$WORK@"
     echo "s at _HOST_@$GLOBUS_HOSTNAME@"
@@ -925,6 +917,14 @@
   done
 }
 
+checkvars GROUPLISTFILE
+echo "GROUPLISTFILE: $GROUPLISTFILE"
+source $GROUPLISTFILE || exit 1
+
+cd $TOPDIR
+mkdir -p $RUNDIR
+[ $? != 0 ] && echo "Could not mkdir: $RUNDIR" && exit 1
+
 date > $LOG
 
 make_sites_sed




More information about the Swift-commit mailing list