Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-03-18 23:23:15

0001 #!/bin/bash -ex
0002 
0003 SCRAM_TEST_NAME=TestFWCoreSkeletons
0004 
0005 # Create a new CMSSW dev area
0006 OLD_CMSSW_BASE=$CMSSW_BASE
0007 rm -rf $SCRAM_TEST_NAME
0008 mkdir $SCRAM_TEST_NAME
0009 cd $SCRAM_TEST_NAME
0010 scram -a $SCRAM_ARCH project $CMSSW_VERSION
0011 cd $CMSSW_VERSION/src
0012 eval `scram run -sh`
0013 git init
0014 
0015 # Copy FWCore/Skeletons in cause unit test is run during PR tests which contains changes for FWCore/Skeletons
0016 if [ -d $OLD_CMSSW_BASE/src/FWCore/Skeletons ] ; then
0017     mkdir FWCore
0018     cp -r $OLD_CMSSW_BASE/src/FWCore/Skeletons FWCore/Skeletons
0019     scram build
0020 fi
0021 
0022 # Create TestSubsystem for testing the scripts
0023 mkdir TestSubsystem
0024 
0025 # Test output of scripts that can be easily compiled
0026 pushd TestSubsystem
0027 
0028 mkdqmedanalyzer TestDQMAnalyzerStream example_stream -author "Test Author"
0029 mkdqmedanalyzer TestDQMAnalyzerGlobal example_global -author "Test Author"
0030 mkdqmedanalyzer -debug TestDQMAnalyzerStrDbg example_stream -author "Test Author"
0031 mkdqmedanalyzer -debug TestDQMAnalyzerGlbDbg example_global -author "Test Author"
0032 
0033 mkedanlzr TestEDAnalyzer -author "Test Author"
0034 mkedanlzr TestEDAnalyzerHisto example_histo -author "Test Author"
0035 
0036 mkedfltr TestEDFilter -author "Test Author"
0037 
0038 mkedprod TestEDProducer -author "Test Author"
0039 mkedprod TestEDProducerParticle example_myparticle -author "Test Author"
0040 
0041 mkrecord TestRecord -author "Test Author"
0042 
0043 popd
0044 git add TestSubsystem
0045 git commit -a -m "Add skeleton modules that can be easily compiled"
0046 scram build
0047 
0048 # Test output of scripts for which compilation would be difficult, but
0049 # code-checks/code-format still works
0050 pushd TestSubsystem
0051 
0052 mkdatapkg TestDataPackage -author "Test Author"
0053 
0054 mkskel TestSkeleton -author "Test Author"
0055 
0056 mktsel TestSelector -author "Test Author"
0057 mktsel TestSelectorTrack example_track -author "Test Author"
0058 
0059 popd
0060 git add TestSubsystem
0061 git commit -a -m "Other skeletong code"
0062 scram b code-checks-all
0063 scram b code-format-all
0064 git diff
0065 if [ $(git diff --name-only | grep TestSubsystem | wc -l) -gt 0 ] ; then
0066     echo "code-checks or code-format caused differences, skeleton templates need to be updated!"
0067     exit 1
0068 fi
0069 
0070 # Test output of scripts for which compilation, code-checks, and
0071 # code-format would be difficult
0072 pushd TestSubsystem
0073 mkedlpr TestEDLooper -author "Test Author"
0074 mkedlpr TestEDLooperRecData TestRecord TestData1 TestData2 -author "Test Author"
0075 
0076 mkesprod TestESProducer -author "Test Author"
0077 mkesprod TestESProducerRec TestRecord -author "Test Author"
0078 mkesprod TestESProducerRecData TestRecord TestData -author "Test Author"
0079 popd