Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
etf
cmssam
Commits
d75d762b
Commit
d75d762b
authored
Feb 27, 2007
by
Andrea Sciaba
Browse files
New version calling CMSSW_frontier.sh
parent
29d72c6a
Changes
1
Hide whitespace changes
Inline
Side-by-side
SiteTests/FroNtier/tests/CE-cms-frontier
View file @
d75d762b
#!/bin/sh
#
# Test of FroNtier under CMSSW
#
#!/bin/bash
echo
"<h2>Test of FroNtier under CMSSW</h2>"
echo
"<h3>Worker node host name</h3>"
echo
"<pre>"
uname
-n
echo
"</pre>"
#
# Choose CMSSW version
#
cmsswvsn
=
CMSSW_1_2_0
# N.B. CMSSW_1_2_0 requires SCRAM_ARCH=slc3_ia32_gcc232
#
# Source the CMS environment
echo
"<h3>Sourcing the CMS environment</h3>"
echo
"<pre>"
export
SCRAM_ARCH
=
slc3_ia32_gcc323
source
$VO_CMS_SW_DIR
/cmsset_default.sh
result
=
$?
echo
"</pre>"
...
...
@@ -25,170 +13,11 @@ if [ $result != 0 ]
echo
"ERROR:
$VO_CMS_SW_DIR
/cmsset_default.sh non existent or non readable"
exit
$SAME_ERROR
fi
#
# Check that scramv1 command was defined by . $CMS_PATH/cmsset_default.sh
#
echo
"<h3>Checking if scramv1 is defined</h3>"
echo
"<pre>"
set
-x
type
scramv1
>
/dev/null 2>&1
result
=
$?
set
+x
echo
"</pre>"
if
[
$result
!=
0
]
then
echo
"ERROR: scramv1 not found"
exit
$SAME_ERROR
fi
#
# Get Working Directory
#
current
=
`
pwd
`
#
# Set up CMSSW
#
echo
"<h3>scramv1 project CMSSW
$cmsswvsn
... starting</h3>"
echo
"<pre>"
scramv1 project CMSSW
$cmsswvsn
scms
=
$?
echo
"</pre>"
if
[
$scms
-ne
0
]
then
echo
"ERROR:
$cmsswvsn
not available"
exit
$SAME_ERROR
fi
echo
"<h3>scramv1 project CMSSW
$cmsswvsn
... completed</h3>"
#
cd
$cmsswvsn
/src
export
SCRAM_ARCH
=
`
scramv1
arch
`
echo
"<p>"
echo
"<h3>scramv1 runtime -sh ... starting</h3>"
eval
`
scramv1 runtime
-sh
|
grep
-v
SCRAMRT_LSB_EXIT_REQUEUE |
grep
-v
SCRAMRT_DOMAINNAME |
grep
-v
SCRAMRT_LSB_JOBNAME
`
echo
"<p>"
echo
"<h3>scramv1 runtime -sh ... completed</h3>"
echo
"<p>"
#
# Return to working directory
#
cd
$current
#
# Report on site-local-config.xml
#
echo
"<h3>Checking the local config file</h3>"
if
[
!
-f
$CMS_PATH
/SITECONF/local/JobConfig/site-local-config.xml
]
then
# printf "Contents of site-local-config.xml are:\n"
# cat $CMS_PATH/SITECONF/local/JobConfig/site-local-config.xml
#else
echo
"ERROR: No site-local-config.xml"
exit
$SAME_ERROR
fi
#
# Test access to squid
#
echo
"<h3>Checking if the SQUID cache node exists and is alive</h3>"
echo
"<pre>"
set
-x
node
=
`
grep
proxy
$CMS_PATH
/SITECONF/local/JobConfig/site-local-config.xml |
cut
-f
3
-d
/ |
cut
-f
1
-d
: |
head
-1
`
set
+x
echo
"</pre>"
if
[
-z
$node
]
;
then
echo
"ERROR: no proxy node found"
exit
$SAME_ERROR
fi
echo
"<pre>"
ping
-c
1
$node
sping
=
$?
echo
"</pre>"
if
[
$sping
-ne
0
]
then
echo
"ERROR: ping to
$node
failed"
exit
$SAME_ERROR
fi
#
# Set environmental variables for CORAL
#
echo
"<h3>Setting the CORAL environment</h3>"
echo
"<pre>"
set
-x
export
CORAL_AUTH_USER
=
""
export
CORAL_AUTH_PASSWORD
=
""
export
CORAL_WEBCACHE_ZIP_LEVEL
=
0
set
+x
echo
"</pre>"
#
# Create configuration file for cmsRun
#
echo
"<h3>Creating configuration file for cmsRun</h3>"
/bin/cat
>
ecal_pedestals.cfg
<<
EOI
# Configuration file for EventSetupTest_t
process TEST = {
es_source = PoolDBESSource { VPSet toGet = {
{ string record = "EcalPedestalsRcd"
string tag = "EcalPedestals_test" }
}
bool loadAll = true
#string connect = "oracle://devdb10/cms_cond_ecal"
untracked bool siteLocalConfig = true
string connect = "frontier://cms_conditions_data/FrontierInt/CMS_COND_ECAL"
string timetype = "runnumber"
}
source = EmptySource { untracked int32 maxEvents = 2
untracked uint32 firstRun = 1
untracked uint32 numberEventsInRun = 1
}
module get = EventSetupRecordDataGetter {
VPSet toGet = {
{ string record = "EcalPedestalsRcd"
vstring data = {"EcalPedestals"}
}
}
untracked bool verbose = true
}
module print = AsciiOutputModule { }
path p = { get }
endpath ep = { print }
}
EOI
echo
"<p>"
echo
"Configuration file:"
# Execute main test script
echo
"<h3>Executing the FroNtier test</h3>"
echo
"<pre>"
cat
ecal_pedestals.cfg
echo
"</pre>"
start
=
`
date
+%s
`
#
# Run cmsRun
#
echo
"<h3>Running cmsRun</h3>"
echo
"Squid nogzip Access test for ECAL"
echo
"<p>"
echo
"START TIME:
`
date
`
ACTION: Squid nogzip Access test for ECAL"
echo
"<p>"
echo
"
`
date
`
--> running cmsRun..."
echo
"<pre>"
cmsRun
-p
ecal_pedestals.cfg
srun
=
$?
$SAME_SENSOR_HOME
/tests/CMSSW_frontier.sh 2>&1
result
=
$?
echo
"</pre>"
echo
"
`
date
`
--> DONE"
echo
"<p>"
stop
=
`
date
+%s
`
if
[
$srun
-eq
0
]
then
echo
"ELAPSED TIME:
$[
$stop
-
$start
] ACTION: SQUID ECAL"
echo
"<p>"
echo
"OK"
else
echo
"ERROR:
$srun
from cmsRun"
exit
$SAME_ERROR
fi
#
# Exit
#
exit
$SAME_OK
exit
$result
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment