Skip to content

Commit ab4db5e

Browse files
fuhlig1karabowi
authored andcommitted
fix(test): Run tests only if pythia is available
ROOT has dropped pythia6 support with recent version. Execute the Pythia related tests only if Pythia6 and/or Pythia8 is available.
1 parent 2eb8719 commit ab4db5e

1 file changed

Lines changed: 16 additions & 12 deletions

File tree

examples/simulation/Tutorial1/macros/CMakeLists.txt

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,23 @@ foreach(mcEngine IN LISTS mcEngine_list)
2222
PASS_REGULAR_EXPRESSION "Macro finished successfully"
2323
)
2424
25-
add_test(NAME ex_sim_tutorial1_pythia6_${mcEngine}
26-
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/run_tutorial1_pythia6.sh 10 \"${mcEngine}\")
27-
set_tests_properties(ex_sim_tutorial1_pythia6_${mcEngine} PROPERTIES
28-
TIMEOUT ${maxTestTime}
29-
PASS_REGULAR_EXPRESSION "Macro finished successfully"
30-
)
25+
if(Pythia6_FOUND)
26+
add_test(NAME ex_sim_tutorial1_pythia6_${mcEngine}
27+
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/run_tutorial1_pythia6.sh 10 \"${mcEngine}\")
28+
set_tests_properties(ex_sim_tutorial1_pythia6_${mcEngine} PROPERTIES
29+
TIMEOUT ${maxTestTime}
30+
PASS_REGULAR_EXPRESSION "Macro finished successfully"
31+
)
32+
endif()
3133
32-
add_test(NAME ex_sim_tutorial1_pythia8_${mcEngine}
33-
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/run_tutorial1_pythia8.sh 10 \"${mcEngine}\")
34-
set_tests_properties(ex_sim_tutorial1_pythia8_${mcEngine} PROPERTIES
35-
TIMEOUT ${maxTestTime}
36-
PASS_REGULAR_EXPRESSION "Macro finished successfully"
37-
)
34+
if(Pythia8_FOUND)
35+
add_test(NAME ex_sim_tutorial1_pythia8_${mcEngine}
36+
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/run_tutorial1_pythia8.sh 10 \"${mcEngine}\")
37+
set_tests_properties(ex_sim_tutorial1_pythia8_${mcEngine} PROPERTIES
38+
TIMEOUT ${maxTestTime}
39+
PASS_REGULAR_EXPRESSION "Macro finished successfully"
40+
)
41+
endif()
3842
3943
add_test(NAME ex_sim_tutorial1_urqmd_${mcEngine}
4044
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/run_tutorial1_urqmd.sh 2 \"${mcEngine}\")

0 commit comments

Comments
 (0)