Skip to content
Snippets Groups Projects
Commit 82fb3e6f authored by Valentin Volkl's avatar Valentin Volkl Committed by Andre Sailer
Browse files

[testing] separate import test for ddg4 and rest of dd4hep

This avoids a test failure when DD4hep is built with
DD4HEP_USE_GEANT4=OFF
parent 5516e3fb
No related branches found
No related tags found
No related merge requests found
...@@ -51,6 +51,11 @@ ADD_TEST( t_test_python_import "${CMAKE_INSTALL_PREFIX}/bin/run_test.sh" ...@@ -51,6 +51,11 @@ ADD_TEST( t_test_python_import "${CMAKE_INSTALL_PREFIX}/bin/run_test.sh"
SET_TESTS_PROPERTIES( t_test_python_import PROPERTIES FAIL_REGULAR_EXPRESSION "Exception;EXCEPTION;ERROR;Error" ) SET_TESTS_PROPERTIES( t_test_python_import PROPERTIES FAIL_REGULAR_EXPRESSION "Exception;EXCEPTION;ERROR;Error" )
if (DD4HEP_USE_GEANT4) if (DD4HEP_USE_GEANT4)
ADD_TEST( t_test_python_import_ddg4 "${CMAKE_INSTALL_PREFIX}/bin/run_test.sh"
pytest ${PROJECT_SOURCE_DIR}/DDTest/python/test_import_ddg4.py)
SET_TESTS_PROPERTIES( t_test_python_import_ddg4 PROPERTIES FAIL_REGULAR_EXPRESSION "Exception;EXCEPTION;ERROR;Error" )
foreach(TEST_NAME foreach(TEST_NAME
test_EventReaders test_EventReaders
) )
......
#!/usr/bin/env python #!/usr/bin/env python
""" """
Some imports to make sure that the DD4hep environment is complete Some imports to make sure that the DD4hep environment is complete.
Since it can be disabled in CMake, the import of DDG4 is tested in another file.
""" """
from __future__ import absolute_import, unicode_literals, print_function from __future__ import absolute_import, unicode_literals, print_function
import traceback import traceback
...@@ -11,7 +12,6 @@ parametrize = pytest.mark.parametrize ...@@ -11,7 +12,6 @@ parametrize = pytest.mark.parametrize
moduleNames = [ moduleNames = [
'dd4hep', 'dd4hep',
'DDG4',
'DDRec', 'DDRec',
'DDDigi', 'DDDigi',
] ]
......
#!/usr/bin/env python
"""
Some imports to make sure that the DD4hep environment is complete.
This file adds a test for the DDG4 python module.
"""
from __future__ import absolute_import
from test_import import test_module, parametrize
moduleNames = [
'DDG4',
]
@parametrize('moduleName', moduleNames)
def test_module_ddg4(moduleName):
test_module(moduleName)
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