CMakeLists.txt 4.24 KB
Newer Older
1
2
3
4
5
# start of test CBM setups from geometry/setup
Set(MACRO_DIR ${CBMROOT_BINARY_DIR}/macro/C2F)
GENERATE_ROOT_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/C2F/c2f_transport.C)
GENERATE_CBM_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/run/run_digi.C ${MACRO_DIR})
GENERATE_CBM_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/run/run_reco_event.C ${MACRO_DIR})
Viktor's avatar
Viktor committed
6
GENERATE_CBM_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/analysis/common/analysis_tree_converter/run_analysis_tree_maker.C ${MACRO_DIR})
Oleksii Lubynets's avatar
Oleksii Lubynets committed
7
GENERATE_CBM_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/analysis/common/at_kfpf_interface/run_at_kfpf.C ${MACRO_DIR})
Viktor Klochkov's avatar
Viktor Klochkov committed
8
GENERATE_CBM_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/analysis/common/qa/run_analysistree_qa.C ${MACRO_DIR})
9
10
11
12
13
14
15
16
17
18
19
20
21

# Put the .rootrc file into the directory from which root is executed.
# Otherwise the rootalias file is not loaded
File(COPY ${CBMROOT_SOURCE_DIR}/macro/include/.rootrc DESTINATION ${MACRO_DIR})
File(COPY ${CBMROOT_SOURCE_DIR}/macro/C2F/sis100_electron.tree.list DESTINATION ${MACRO_DIR})


# Define the number of events to run
Set(NumEvents 20)

# Define the different setups to be tested
If( ($ENV{ctest_model} MATCHES Nightly) OR ($ENV{ctest_model} MATCHES Weekly) )
  List(APPEND cbm_setup sis100_electron)
22
EndIf()
23
24
25
26
27
28
29
30
31
32
33

  ForEach(setup IN LISTS cbm_setup)

    # The test dependencies are set such that parallel execution is prevented, even is there is no logical
    # dependence. The reason is that all runs (for a given setup) use the same ROOT parameter file,
    # and concurrent access to this file results in erros.
    # The logical dependences are expressed in the required "ok" files.

    # --- Transport run, using run_transport.C
    Set(testname c2f_transport_${setup})
    Add_Test(${testname} ${MACRO_DIR}/c2f_transport.sh ${NumEvents} \"${setup}\" \"data/${setup}_test\" \"\" \"TGeant4\" false)
Viktor Klochkov's avatar
Viktor Klochkov committed
34
35
36
37
38
    Set_Tests_Properties(${testname} PROPERTIES 
        TIMEOUT "900"
        PASS_REGULAR_EXPRESSION "Test Passed;All ok"
        FIXTURES_SETUP fixture_c2f_digi_${setup}
    )
39
40
41
  
    # --- Digitisation run, event-by-event
    Set(testname c2f_digi_event_${setup})
42
43
    Add_Test(${testname} ${MACRO_DIR}/run_digi.sh \"data/${setup}_test\" ${NumEvents} 
    	\"data/${setup}_test.event\" -1.)
Viktor Klochkov's avatar
Viktor Klochkov committed
44
45
46
47
48
49
    Set_Tests_Properties(${testname} PROPERTIES 
        TIMEOUT "300"
        PASS_REGULAR_EXPRESSION "Macro finished successfully"
        FIXTURES_REQUIRED fixture_c2f_digi_${setup}
        FIXTURES_SETUP fixture_c2f_reco_event_${setup}
    )
50
51
52
53

    # --- Reconstruction run, event-by-event
    Set(testname c2f_reco_event_${setup})
    Add_Test(${testname} ${MACRO_DIR}/run_reco_event.sh ${NumEvents} \"data/${setup}_test\" \"${setup}\")
Viktor Klochkov's avatar
Viktor Klochkov committed
54
55
56
57
58
59
    Set_Tests_Properties(${testname} PROPERTIES 
        TIMEOUT "1300"
        PASS_REGULAR_EXPRESSION "Test Passed;All ok"
        FIXTURES_REQUIRED fixture_c2f_reco_event_${setup}
        FIXTURES_SETUP fixture_c2f_ana_${setup}
    )
60
  
Viktor's avatar
Viktor committed
61
62
    # --- AnalysisTree
    Set(testname analysis_tree_maker_${setup})
Viktor Klochkov's avatar
Viktor Klochkov committed
63
64
65
66
67
68
69
70
    Add_Test(${testname} ${MACRO_DIR}/run_analysis_tree_maker.sh \"data/${setup}_test\" \"${setup}\")
    Set_Tests_Properties(${testname} PROPERTIES 
        TIMEOUT "300"
        PASS_REGULAR_EXPRESSION "Test Passed;All ok"
        FIXTURES_REQUIRED fixture_c2f_ana_${setup}
        FIXTURES_SETUP fixture_c2f_analysistree_${setup}
    )

Oleksii Lubynets's avatar
Oleksii Lubynets committed
71
72
73
    # --- AnalysisTree to KFPF interface
    Set(testname at_kfpf_${setup})
    Add_Test(${testname} ${MACRO_DIR}/run_at_kfpf.sh ${NumEvents} \"data/${setup}_test\")
Viktor Klochkov's avatar
Viktor Klochkov committed
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
    Set_Tests_Properties(${testname} PROPERTIES 
        TIMEOUT "300"
        PASS_REGULAR_EXPRESSION "Test Passed;All ok"
        FIXTURES_REQUIRED fixture_c2f_analysistree_${setup}
        FIXTURES_SETUP fixture_c2f_at_kfpf_interface_${setup}
    )

    # --- AnalysisTreeQA
    Set(testname analysistree_qa_${setup})
    Add_Test(${testname} ${MACRO_DIR}/run_analysistree_qa.sh \"data/${setup}_test.analysistree.root\" true)
    Set_Tests_Properties(${testname} PROPERTIES 
        TIMEOUT "300"
        PASS_REGULAR_EXPRESSION "Test Passed;All ok"
        FIXTURES_REQUIRED fixture_c2f_at_kfpf_interface_${setup}
#        FIXTURES_SETUP fixture_c2f_at_qa_${setup}
    )

Viktor's avatar
Viktor committed
91

92
93
94
  EndForEach(setup IN LISTS cbm_setup)
  # end of test CBM setups from geometry/setup

95
96
# Installation of macros is done in macro/CMakeLists.txt to install the
# macros even if the tests are not executed