[Swift-commit] r5211 - in branches/release-0.93: bin tests

davidk at ci.uchicago.edu davidk at ci.uchicago.edu
Fri Oct 7 13:39:00 CDT 2011


Author: davidk
Date: 2011-10-07 13:39:00 -0500 (Fri, 07 Oct 2011)
New Revision: 5211

Modified:
   branches/release-0.93/bin/gensites
   branches/release-0.93/tests/suite.sh
Log:
Fix for gensites _HOST_ bug


Modified: branches/release-0.93/bin/gensites
===================================================================
--- branches/release-0.93/bin/gensites	2011-10-07 18:28:23 UTC (rev 5210)
+++ branches/release-0.93/bin/gensites	2011-10-07 18:39:00 UTC (rev 5211)
@@ -59,6 +59,7 @@
 exit 0;
 }
 
+
 # Parse command line arguments
 while [ $# -gt 0 ]
 do
@@ -216,10 +217,14 @@
 # Verify that the variables by the template are defined
 for TOKEN in NODES HOST WORK PROJECT QUEUE N_GRAN N_MAX SLOTS INTERNALHOSTNAME MAXTIME EXECUTION_URL
 do
-   # Need but can't find, due
-   if grep _${TOKEN}_ $TEMPLATE_PATH > /dev/null; then
+   # Test for HOST/GLOBUS_HOSTNAME - the only values which don't match
+   if [ "$TOKEN" == "HOST" ]; then
+      if [ -z "$GLOBUS_HOSTNAME" ]; then
+         crash "Not specified: GLOBUS_HOSTNAME"
+      fi
+   elif grep _${TOKEN}_ $TEMPLATE_PATH > /dev/null; then
       if [ -z "${!TOKEN}" ]; then
-            crash "Not specified: ${TOKEN}"
+         crash "Not specified: ${TOKEN}"
       fi
    fi
 done

Modified: branches/release-0.93/tests/suite.sh
===================================================================
--- branches/release-0.93/tests/suite.sh	2011-10-07 18:28:23 UTC (rev 5210)
+++ branches/release-0.93/tests/suite.sh	2011-10-07 18:39:00 UTC (rev 5211)
@@ -947,7 +947,7 @@
   IFCONFIG=/sbin/ifconfig
 fi
 $IFCONFIG > /dev/null 2>&1 || crash "Cannot run ifconfig!"
-GLOBUS_HOSTNAME=$( $IFCONFIG | grep inet | head -1 | cut -d ':' -f 2 | \
+export GLOBUS_HOSTNAME=$( $IFCONFIG | grep inet | head -1 | cut -d ':' -f 2 | \
                    awk '{print $1}' )
 [ $? != 0 ] && crash "Could not obtain GLOBUS_HOSTNAME!"
 
@@ -958,7 +958,7 @@
   if [ -f "$GROUP/sites.template.xml" ]; then
      TEMPLATE="$GROUP/sites.template.xml"
   elif [ -f "$GROUP/gensites.template" ]; then
-     TEMPLATE=`cat $GROUP/gensites.template`
+     TEMPLATE=`$GROUP/gensites.template`
   else
      TEMPLATE="$TESTDIR/sites/localhost.xml"
   fi
@@ -972,11 +972,7 @@
   # Call gensites
   TEMPLATE_DIRNAME=`dirname $TEMPLATE`
   TEMPLATE=`basename $TEMPLATE`
-  if [ "$TEMPLATE_DIRNAME" != "." ]; then
-     gensites -L $TEMPLATE_DIRNAME $TEMPLATE > sites.xml
-  else 
-     gensites $TEMPLATE > sites.xml
-  fi
+  gensites -L $TEMPLATE_DIRNAME $TEMPLATE > sites.xml
 }
 
 # Generate tc.data




More information about the Swift-commit mailing list