@@ -54,8 +54,6 @@ gaudi_add_module(k4FWCoreTestPlugins
54
54
SOURCES ${k4fwcoretest_plugin_sources}
55
55
LINK Gaudi::GaudiKernel k4FWCore k4FWCore::k4Interface ROOT::Core ROOT::RIO ROOT::Tree podio::podioIO EDM4HEP::edm4hep )
56
56
57
- include (CTest )
58
-
59
57
set (K4RUN ${PROJECT_SOURCE_DIR} /k4FWCore/scripts/k4run )
60
58
61
59
function (set_test_env testname )
@@ -64,6 +62,19 @@ function(set_test_env testname)
64
62
set_property (TEST ${testname} APPEND PROPERTY ENVIRONMENT "PYTHONPATH=${PROJECT_BINARY_DIR} /${PROJECT_NAME} /genConfDir:${PROJECT_BINARY_DIR} /test/k4FWCoreTest/genConfDir:$ENV{PYTHONPATH} " )
65
63
endfunction ()
66
64
65
+
66
+ # The following is done to make the tests work without installing the files in
67
+ # the installation directory. The k4FWCore in the build directory is populated by
68
+ # Gaudi so we can't just make a k4FWCore folder and put the python files there.
69
+ # We put everything in one of the folders generated by Gaudi so that importing from
70
+ # k4FWCore will give the right result
71
+ add_custom_target (copy_directory ALL
72
+ COMMAND ${CMAKE_COMMAND} -E copy_directory
73
+ ${PROJECT_SOURCE_DIR} /python/k4FWCore/ ${PROJECT_BINARY_DIR} /k4FWCore/genConfDir/k4FWCore
74
+ COMMENT "Copying k4FWCore python package after building all the libraries and plugins"
75
+ DEPENDS k4FWCoreTestPlugins k4FWCore k4FWCorePlugins
76
+ )
77
+
67
78
#[[
68
79
add_test_with_env
69
80
-----------------
@@ -234,15 +245,6 @@ add_test_with_env(ReadLimitedInputsAllEventsIOSvc options/ExampleIOSvcLimitInput
234
245
add_test_with_env (ParticleIDMetadataFramework options /ExampleParticleIDMetadata.py )
235
246
236
247
237
- # The following is done to make the tests work without installing the files in
238
- # the installation directory. The k4FWCore in the build directory is populated by
239
- # Gaudi so we can't just make a k4FWCore folder and put the python files there.
240
- # We put everything in one of the folders generated by Gaudi so that importing from
241
- # k4FWCore will give the right result
242
- add_custom_command (TARGET k4FWCoreTestPlugins POST_BUILD
243
- COMMAND ${CMAKE_COMMAND} -E copy_directory
244
- ${PROJECT_SOURCE_DIR} /python/k4FWCore/ ${PROJECT_BINARY_DIR} /k4FWCore/genConfDir/k4FWCore )
245
-
246
248
add_executable (check_ParticleIDOutputs src/check_ParticleIDOutputs.cpp )
247
249
target_link_libraries (check_ParticleIDOutputs PRIVATE podio::podioIO EDM4HEP::edm4hep EDM4HEP::utils fmt::fmt )
248
250
add_test (NAME check_ParticleIDOutputs COMMAND check_ParticleIDOutputs example_with_particleids.root )
0 commit comments