Skip to content
Snippets Groups Projects
Commit f4928e51 authored by John Chapman's avatar John Chapman
Browse files

Prevent unit tests running the same transform from running in parallel (ATLINFR-2296)

In ATLINFR-2296 it was noted that the CI attempts to run unit tests in
parallel.  As unit tests all run in the same directory this causes
problems if two tests try to write to the same file(s), as is the
case with the simualtion configuration unit tests, where `AtlasG4_tf`
and `Sim_tf` are run in mulitple configurations in different tests.

By using the `RESOURCE_LOCK` property it is possible to prevent
unit tests running the same job transform from running in parallel.
This allows all unit tests to succeed even when running in parallel
in local tests.
parent 094b0724
No related branches found
No related tags found
No related merge requests found
...@@ -11,16 +11,19 @@ find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) ...@@ -11,16 +11,19 @@ find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
atlas_add_test(test_AtlasG4_tf_configuration atlas_add_test(test_AtlasG4_tf_configuration
SCRIPT test/test_AtlasG4_tf_configuration.py SCRIPT test/test_AtlasG4_tf_configuration.py
PROPERTIES TIMEOUT 300 ) PROPERTIES TIMEOUT 300
PROPERTIES RESOURCE_LOCK AtlasG4_Tf )
if( NOT SIMULATIONBASE ) if( NOT SIMULATIONBASE )
atlas_add_test(test_AtlasG4_cosmics_configuration atlas_add_test(test_AtlasG4_cosmics_configuration
SCRIPT test/test_AtlasG4_cosmics_configuration.py SCRIPT test/test_AtlasG4_cosmics_configuration.py
PROPERTIES TIMEOUT 300 ) PROPERTIES TIMEOUT 300
PROPERTIES RESOURCE_LOCK AtlasG4_Tf )
atlas_add_test(test_TestBeam_tf_configuration atlas_add_test(test_TestBeam_tf_configuration
SCRIPT test/test_TestBeam_tf_configuration.py SCRIPT test/test_TestBeam_tf_configuration.py
PROPERTIES TIMEOUT 300 ) PROPERTIES TIMEOUT 300
PROPERTIES RESOURCE_LOCK AtlasG4_Tf )
endif() endif()
# Install files from the package: # Install files from the package:
......
...@@ -12,11 +12,13 @@ atlas_depends_on_subdirs( PRIVATE ...@@ -12,11 +12,13 @@ atlas_depends_on_subdirs( PRIVATE
if( NOT SIMULATIONBASE ) if( NOT SIMULATIONBASE )
atlas_add_test(test_Sim_tf_configuration atlas_add_test(test_Sim_tf_configuration
SCRIPT test/test_Sim_tf_configuration.py SCRIPT test/test_Sim_tf_configuration.py
PROPERTIES TIMEOUT 300) PROPERTIES TIMEOUT 300
PROPERTIES RESOURCE_LOCK SimTf)
endif() endif()
atlas_add_test(test_FullG4_Sim_tf_configuration atlas_add_test(test_FullG4_Sim_tf_configuration
SCRIPT test/test_FullG4_Sim_tf_configuration.py SCRIPT test/test_FullG4_Sim_tf_configuration.py
PROPERTIES TIMEOUT 300) PROPERTIES TIMEOUT 300
PROPERTIES RESOURCE_LOCK SimTf)
# Install files from the package: # Install files from the package:
atlas_install_python_modules( python/*.py ) atlas_install_python_modules( python/*.py )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment