[Swift-commit] r5168 - in branches/release-0.93: bin etc/sites tests
davidk at ci.uchicago.edu
davidk at ci.uchicago.edu
Sat Sep 24 20:53:15 CDT 2011
Author: davidk
Date: 2011-09-24 20:53:14 -0500 (Sat, 24 Sep 2011)
New Revision: 5168
Added:
branches/release-0.93/etc/sites/local
branches/release-0.93/etc/sites/local-coasters
Modified:
branches/release-0.93/bin/gensites
branches/release-0.93/tests/suite.sh
Log:
Suite and gensites fixes
Added site templates from suite
Modified: branches/release-0.93/bin/gensites
===================================================================
--- branches/release-0.93/bin/gensites 2011-09-24 21:32:35 UTC (rev 5167)
+++ branches/release-0.93/bin/gensites 2011-09-25 01:53:14 UTC (rev 5168)
@@ -133,19 +133,22 @@
fi
# Ensure a properties file exists
-if [ ! -f "$PROPERTIES_FILE" ]; then
- PROPERTIES_FILE="./swift.properties"
- if [ ! -f "$PROPERTIES_FILE" ]; then
+if [ -z "$PROPERTIES_FILE" ]; then
+ if [ -f "./swift.properties" ]; then
+ PROPERTIES_FILE="./swift.properties"
+ elif [ -f "$HOME/.swift/swift.properties" ]; then
PROPERTIES_FILE="$HOME/.swift/swift.properties"
fi
fi
# Setup for creating a TC file
-if [ -n "`grep -e app $PROPERTIES_FILE`" ]; then
- if [ -f "tc.data" ]; then
- mv tc.data tc.data.old
+if [ -f "$PROPERTIES_FILE" ]; then
+ if [ -n "`grep -e app $PROPERTIES_FILE`" ]; then
+ if [ -f "tc.data" ]; then
+ mv tc.data tc.data.old
+ fi
+ HOSTS=`grep -i "pool handle" $TEMPLATE_PATH|grep -v "^[[:space:]]*#"|cut -d'"' -f2`
fi
- HOSTS=`grep -i "pool handle" $TEMPLATE_PATH|grep -v "^[[:space:]]*#"|cut -d'"' -f2`
fi
# Parse values into variables for later sed processing
Added: branches/release-0.93/etc/sites/local
===================================================================
--- branches/release-0.93/etc/sites/local (rev 0)
+++ branches/release-0.93/etc/sites/local 2011-09-25 01:53:14 UTC (rev 5168)
@@ -0,0 +1,9 @@
+<config>
+<pool handle="local">
+ <execution provider="local" />
+ <gridftp url="local://localhost" />
+ <profile key="initialScore" namespace="karajan">10000</profile>
+ <profile key="jobThrottle" namespace="karajan">.31</profile>
+ <workdirectory>_WORK_</workdirectory>
+</pool>
+</config>
Added: branches/release-0.93/etc/sites/local-coasters
===================================================================
--- branches/release-0.93/etc/sites/local-coasters (rev 0)
+++ branches/release-0.93/etc/sites/local-coasters 2011-09-25 01:53:14 UTC (rev 5168)
@@ -0,0 +1,24 @@
+<config>
+
+ <pool handle="localhost" sysinfo="INTEL32::LINUX">
+ <gridftp url="local://localhost" />
+ <execution provider="local" url="none" />
+ <workdirectory>_WORK_</workdirectory>
+ <profile namespace="swift" key="stagingMethod">file</profile>
+ </pool>
+
+ <pool handle="coasterslocal">
+ <filesystem provider="local" />
+ <execution provider="coaster" jobmanager="local:local"/>
+ <profile namespace="globus" key="internalHostname">_HOST_</profile>
+ <profile namespace="karajan" key="jobthrottle">2.55</profile>
+ <profile namespace="karajan" key="initialScore">10000</profile>
+ <profile namespace="globus" key="jobsPerNode">4</profile>
+ <profile namespace="globus" key="slots">8</profile>
+ <profile namespace="globus" key="maxTime">1000</profile>
+ <profile namespace="globus" key="nodeGranularity">1</profile>
+ <profile namespace="globus" key="maxNodes">4</profile>
+ <workdirectory>_WORK_</workdirectory>
+ </pool>
+
+</config>
Modified: branches/release-0.93/tests/suite.sh
===================================================================
--- branches/release-0.93/tests/suite.sh 2011-09-24 21:32:35 UTC (rev 5167)
+++ branches/release-0.93/tests/suite.sh 2011-09-25 01:53:14 UTC (rev 5168)
@@ -940,18 +940,6 @@
output_report package "swift-$DATE.tar.gz"
}
-# Generate the sites.sed file
-make_sites_sed() {
- {
- echo "s at _WORK_@$WORK@"
- echo "s at _HOST_@$GLOBUS_HOSTNAME@"
- echo "s at _PROJECT_@$PROJECT@"
- echo "s at _QUEUE_@$QUEUE@"
- echo "s at _EXECUTION_URL_@$EXECUTION_URL@"
- } > $RUNDIR/sites.sed
- return 0
-}
-
# Setup coasters variables
if which ifconfig > /dev/null 2>&1; then
IFCONFIG=ifconfig
@@ -965,20 +953,34 @@
# Generate sites.xml
group_sites_xml() {
- TEMPLATE=$GROUP/sites.template.xml
- if [ -f $TEMPLATE ]; then
- sed -f $RUNDIR/sites.sed < $TEMPLATE > sites.xml
- [ $? != 0 ] && crash "Could not create sites.xml!"
- echo "Using: $GROUP/sites.template.xml"
+
+ # Determine template
+ if [ -f "$GROUP/sites.template.xml" ]; then
+ TEMPLATE="$GROUP/sites.template.xml"
+ elif [ -f "$GROUP/gensites.template" ]; then
+ TEMPLATE=`cat $GROUP/gensites.template`
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"
+ TEMPLATE="$TESTDIR/sites/localhost.xml"
fi
+
+ # 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
}
# Generate tc.data
group_tc_data() {
+
+ # Gensites will create a tc.data file if it is being used
+ if [ -f "$GROUP/gensites.template" ]; then
+ return
+ fi
+
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!"
@@ -994,6 +996,7 @@
fi
}
+
# Generate the CDM file, fs.data
group_fs_data() {
if [ -f $GROUP/fs.template.data ]; then
@@ -1062,10 +1065,10 @@
# Execute all tests in current GROUP
test_group() {
+ group_swift_properties
group_sites_xml
group_tc_data
group_fs_data
- group_swift_properties
SWIFTS=$( echo $GROUP/*.swift )
checkfail "Could not list: $GROUP"
@@ -1159,7 +1162,6 @@
date > $LOG
-make_sites_sed
# Here the report starts.
# Call to function header()
@@ -1244,6 +1246,7 @@
(( $SHUTDOWN )) && break
done
+footer
exit 0
# Local Variables:
More information about the Swift-commit
mailing list