[Swift-commit] r5210 - in trunk: bin tests
davidk at ci.uchicago.edu
davidk at ci.uchicago.edu
Fri Oct 7 13:28:23 CDT 2011
Author: davidk
Date: 2011-10-07 13:28:23 -0500 (Fri, 07 Oct 2011)
New Revision: 5210
Modified:
trunk/bin/gensites
trunk/tests/suite.sh
Log:
Fixed bug in gensites with _HOST_
Modified: trunk/bin/gensites
===================================================================
--- trunk/bin/gensites 2011-10-07 02:49:42 UTC (rev 5209)
+++ trunk/bin/gensites 2011-10-07 18:28:23 UTC (rev 5210)
@@ -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: trunk/tests/suite.sh
===================================================================
--- trunk/tests/suite.sh 2011-10-07 02:49:42 UTC (rev 5209)
+++ trunk/tests/suite.sh 2011-10-07 18:28:23 UTC (rev 5210)
@@ -966,7 +966,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!"
@@ -977,7 +977,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
@@ -991,11 +991,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 2>&1
}
# Generate tc.data
More information about the Swift-commit
mailing list