Skip to content

Commit 7afbee4

Browse files
committed
[roottest] convert to cmake meta/ROOT-7181 tests
Like in cmsUnload, provide special runscript.C which loads commands and invoke them one by one.
1 parent fd89054 commit 7afbee4

File tree

17 files changed

+88
-87
lines changed

17 files changed

+88
-87
lines changed

roottest/root/meta/ROOT-7181/.rootrc

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 44 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,44 @@
1-
#-------------------------------------------------------------------------------
2-
#
3-
# Placeholder file to translate the tests to the new CTest system. Meanwhile we
4-
# define a CTest test that calls 'make' in ${CMAKE_CURRENT_SOURCE_DIR}
5-
#
6-
#-------------------------------------------------------------------------------
7-
8-
ROOTTEST_ADD_OLDTEST()
1+
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/inc)
2+
3+
ROOTTEST_GENERATE_REFLEX_DICTIONARY(btag
4+
inc/BTagVertex_v1.h
5+
SELECTION inc/btag_selection.xml
6+
FIXTURES_SETUP root-meta-7181-btag-fixture)
7+
8+
ROOTTEST_GENERATE_REFLEX_DICTIONARY(jet
9+
inc/Jet_v1.h
10+
SELECTION inc/jet_selection.xml
11+
FIXTURES_SETUP root-meta-7181-jet-fixture)
12+
13+
ROOTTEST_GENERATE_REFLEX_DICTIONARY(sjet
14+
inc/SJet_v1.h
15+
SELECTION inc/sjet_selection.xml
16+
FIXTURES_SETUP root-meta-7181-sjet-fixture)
17+
18+
macro(ROOT_7181_TEST name use_rmap)
19+
if(${use_rmap} STREQUAL "true")
20+
set(testname rmap-${name})
21+
else()
22+
set(testname ${name})
23+
endif()
24+
25+
ROOTTEST_ADD_TEST(${testname}
26+
MACRO runscript.C
27+
MACROARG "\"${CMAKE_CURRENT_SOURCE_DIR}/scripts/${name}.script\",${use_rmap}"
28+
ROOTEXE_OPTS -e "gInterpreter->AddIncludePath(\"-I${CMAKE_CURRENT_SOURCE_DIR}\")"
29+
-e "gInterpreter->AddIncludePath(\"-I${CMAKE_CURRENT_SOURCE_DIR}/inc\")"
30+
OUTREF ${testname}.ref
31+
FIXTURES_REQUIRED root-meta-7181-btag-fixture
32+
root-meta-7181-jet-fixture
33+
root-meta-7181-sjet-fixture)
34+
endmacro(ROOT_7181_TEST)
35+
36+
ROOT_7181_TEST(case1 false)
37+
ROOT_7181_TEST(case2 false)
38+
ROOT_7181_TEST(case3 false)
39+
ROOT_7181_TEST(case4 false)
40+
41+
ROOT_7181_TEST(case1 true)
42+
ROOT_7181_TEST(case2 true)
43+
ROOT_7181_TEST(case3 true)
44+
ROOT_7181_TEST(case4 true)

roottest/root/meta/ROOT-7181/Makefile

Lines changed: 0 additions & 57 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11

2+
Processing runscript.C("scripts/case1.script",false)...
23
Classinfo for DataVector<xAOD::Jet_v1> is valid
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11

2+
Processing runscript.C("scripts/case2.script",false)...
23
Classinfo for SDataVector<xAOD::SJet_v1> is valid
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11

2+
Processing runscript.C("scripts/case3.script",false)...
23
TClass for DataVector<xAOD::Jet_v1> is loaded
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11

2+
Processing runscript.C("scripts/case4.script",false)...
23
Normalized name for DataVector<xAOD::Jet_v1> is : DataVector<xAOD::Jet_v1,DataVector<xAOD::IParticle,DataModel_detail::NoBase> >
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11

2-
Processing scripts/loadrootmap.C...
2+
Processing runscript.C("scripts/case1.script",true)...
33
Classinfo for DataVector<xAOD::Jet_v1> is valid
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11

2-
Processing scripts/loadrootmap.C...
2+
Processing runscript.C("scripts/case2.script",true)...
33
Classinfo for SDataVector<xAOD::SJet_v1> is valid
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11

2-
Processing scripts/loadrootmap.C...
2+
Processing runscript.C("scripts/case3.script",true)...
33
TClass for DataVector<xAOD::Jet_v1> is loaded

0 commit comments

Comments
 (0)