1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# it assumes that it is NOT run from a release area
# i..e CMSSW_RELEASE_BASE is not empty
# at the moment is the opposite: assume /CondFormats/Common be in CMSSW_BASE
cmsenv
cd $CMSSW_BASE/src
mkdir -p PayloadTest/PayloadTest/test
cd PayloadTest/PayloadTest/test
# cp $CMSSW_RELEASE_BASE/src/CondFormats/Common/test/TestDriver.h .
# cp $ CMSSW_RELEASE_BASE/src/CondFormats/Common/test/TestDriver.cc .
cp $CMSSW_BASE/src/CondFormats/Common/test/TestDriver.h .
cp $CMSSW_BASE/src/CondFormats/Common/test/TestDriver.cc .
echo $1 $2 $3
cp TestDriver.cc $1_test.cc
sed -i "s/THECLASS/$1/g" $1_test.cc
sed -i "s/THEPACKAGE/$2/g" $1_test.cc
sed -i "s/THEHEADER/$3/g" $1_test.cc
echo "<bin file=$1_test.cc name=CondPayload_$1_test>" > bfile
echo "<use name=CondFormats/$2>" >> bfile
echo "<use name=CoralCommon>" >> bfile
echo "<use name=CoralKernel>" >> bfile
echo "<use name=RelationalAccess>" >> bfile
echo "<use name=DataSvc>" >> bfile
echo "<use name=Collection>" >> bfile
echo "<use name=ObjectRelationalAccess>" >> bfile
echo "</bin>" >> bfile
mv bfile BuildFile
scramv1 b
echo "run CondPayload_$1_test"
$CMSSW_BASE/test/$SCRAM_ARCH/CondPayload_$1_test
|