Skip to content

Commit 5e885fd

Browse files
fuhlig1ChristianTackeGSI
authored andcommitted
Use resource lock to avoid parallel execution
Both tests ex_compare_seed_value and ex_sim_tutorial2_create_digis depend on the test ex_sim_tutorial2 which is specified by the required fixture. Since both tests also read the same output file they must not run in parallel. This is ensured by the resource lock.
1 parent 795218b commit 5e885fd

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

examples/simulation/Tutorial2/macros/CMakeLists.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
################################################################################
2-
# Copyright (C) 2014-2019 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH #
2+
# Copyright (C) 2014-2023 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH #
33
# #
44
# This software is distributed under the terms of the #
55
# GNU Lesser General Public Licence (LGPL) version 3, #
@@ -22,23 +22,25 @@ set_tests_properties(ex_sim_tutorial2 PROPERTIES
2222
TIMEOUT ${maxTestTime}
2323
PASS_REGULAR_EXPRESSION "Macro finished successfully"
2424
FIXTURES_SETUP fixtures.ex_sim_tutorial2_sim
25+
RESOURCE_LOCK ex_sim_tutorial2_paramFile
2526
)
2627
27-
add_test(NAME ex_compare_seed_value
28+
add_test(NAME ex_sim_tutorial2_compare_seed_value
2829
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/compare_seed_value.sh \"tutorial2_pions.params_p2.000_t0_n10.root\" 333)
29-
set_tests_properties(ex_compare_seed_value PROPERTIES
30+
set_tests_properties(ex_sim_tutorial2_compare_seed_value PROPERTIES
3031
TIMEOUT ${maxTestTime}
3132
FIXTURES_REQUIRED fixtures.ex_sim_tutorial2_sim
32-
FIXTURES_SETUP fixtures.ex_compare_seed_value
33+
RESOURCE_LOCK ex_sim_tutorial2_paramFile
3334
)
3435
3536
add_test(NAME ex_sim_tutorial2_create_digis
3637
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/create_digis.sh)
3738
set_tests_properties(ex_sim_tutorial2_create_digis PROPERTIES
38-
FIXTURES_REQUIRED fixtures.ex_compare_seed_value
39+
FIXTURES_REQUIRED fixtures.ex_sim_tutorial2_sim
3940
TIMEOUT ${maxTestTime}
4041
PASS_REGULAR_EXPRESSION "Macro finished successfully"
4142
FIXTURES_SETUP fixtures.ex_sim_tutorial2_digi
43+
RESOURCE_LOCK ex_sim_tutorial2_paramFile
4244
)
4345
4446
add_test(NAME ex_sim_tutorial2_read_digis

0 commit comments

Comments
 (0)