Skip to content

Commit d7fc45c

Browse files
committed
DPL: split dictionary for test classes
1 parent c0fe351 commit d7fc45c

2 files changed

Lines changed: 22 additions & 7 deletions

File tree

Framework/Core/CMakeLists.txt

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ o2_add_library(Framework
160160
src/DPLWebSocket.cxx
161161
src/StatusWebSocketHandler.cxx
162162
src/TimerParamSpec.cxx
163-
test/TestClasses.cxx
164163
TARGETVARNAME targetName
165164
PRIVATE_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_LIST_DIR}/src
166165
PUBLIC_LINK_LIBRARIES AliceO2::Configuration
@@ -189,9 +188,16 @@ o2_add_library(Framework
189188
target_include_directories(${targetName} PUBLIC $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/DataFormats/simulation/include>)
190189

191190
o2_target_root_dictionary(Framework
191+
HEADERS include/Framework/StepTHn.h
192+
LINKDEF src/StepTHnLinkDef.h)
193+
194+
# o2::test::* support classes for unit tests, kept out of production libO2Framework.
195+
o2_add_library(FrameworkTestSupport
196+
SOURCES test/TestClasses.cxx
197+
PUBLIC_LINK_LIBRARIES O2::Framework)
198+
o2_target_root_dictionary(FrameworkTestSupport
192199
HEADERS test/TestClasses.h
193-
include/Framework/StepTHn.h
194-
LINKDEF test/FrameworkCoreTestLinkDef.h)
200+
LINKDEF test/TestClassesLinkDef.h)
195201

196202
add_executable(o2-test-framework-core
197203
test/test_AlgorithmSpec.cxx
@@ -268,6 +274,7 @@ add_executable(o2-test-framework-core
268274
test/unittest_DataSpecUtils.cxx
269275
)
270276
target_link_libraries(o2-test-framework-core PRIVATE O2::Framework)
277+
target_link_libraries(o2-test-framework-core PRIVATE O2::FrameworkTestSupport)
271278
target_link_libraries(o2-test-framework-core PRIVATE O2::Catch2)
272279

273280
get_filename_component(outdir ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/../tests ABSOLUTE)
@@ -374,7 +381,6 @@ foreach(w
374381
RegionInfoCallbackService
375382
DanglingInputs
376383
DanglingOutputs
377-
DataAllocator
378384
StaggeringWorkflow
379385
Forwarding
380386
ParallelPipeline
@@ -403,6 +409,15 @@ foreach(w
403409
COMMAND_LINE_ARGS ${DPL_WORKFLOW_TESTS_EXTRA_OPTIONS} --run --shm-segment-size 20000000)
404410
endforeach()
405411

412+
o2_add_test(DataAllocator NAME test_Framework_test_DataAllocator
413+
SOURCES test/test_DataAllocator.cxx
414+
COMPONENT_NAME Framework
415+
LABELS framework workflow
416+
PUBLIC_LINK_LIBRARIES O2::Framework O2::FrameworkTestSupport
417+
TIMEOUT 30
418+
NO_BOOST_TEST
419+
COMMAND_LINE_ARGS ${DPL_WORKFLOW_TESTS_EXTRA_OPTIONS} --run --shm-segment-size 20000000)
420+
406421
if (BUILD_TESTING)
407422
# TODO: DanglingInput test not working for the moment [ERROR] Unable to relay
408423
# part. [WARN] Incoming data is already obsolete, not relaying.

Framework/Utils/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ o2_add_executable(output-proxy
3434
o2_add_test(RootTreeWriterWorkflow
3535
NO_BOOST_TEST
3636
SOURCES test/test_RootTreeWriterWorkflow.cxx
37-
PUBLIC_LINK_LIBRARIES O2::DPLUtils
37+
PUBLIC_LINK_LIBRARIES O2::DPLUtils O2::FrameworkTestSupport
3838
COMPONENT_NAME DPLUtils
3939
LABELS dplutils
4040
COMMAND_LINE_ARGS ${DPL_WORKFLOW_TESTS_EXTRA_OPTIONS} --run)
4141

4242
o2_add_test(RootTreeReader
4343
NO_BOOST_TEST
4444
SOURCES test/test_RootTreeReader.cxx
45-
PUBLIC_LINK_LIBRARIES O2::DPLUtils
45+
PUBLIC_LINK_LIBRARIES O2::DPLUtils O2::FrameworkTestSupport
4646
COMPONENT_NAME DPLUtils
4747
LABELS dplutils
4848
COMMAND_LINE_ARGS ${DPL_WORKFLOW_TESTS_EXTRA_OPTIONS} --run)
@@ -53,7 +53,7 @@ add_executable(o2-test-framework-utils
5353
test/test_DPLRawParser.cxx
5454
test/test_DPLRawPageSequencer.cxx
5555
)
56-
target_link_libraries(o2-test-framework-utils PRIVATE O2::Framework O2::DPLUtils O2::DetectorsRaw)
56+
target_link_libraries(o2-test-framework-utils PRIVATE O2::Framework O2::DPLUtils O2::DetectorsRaw O2::FrameworkTestSupport)
5757
target_link_libraries(o2-test-framework-utils PRIVATE O2::Catch2)
5858

5959
get_filename_component(outdir ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/../tests ABSOLUTE)

0 commit comments

Comments
 (0)