Skip to content

Commit 004d48a

Browse files
committed
DPL: split dictionary for test classes
1 parent 1183f52 commit 004d48a

4 files changed

Lines changed: 63 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.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Copyright 2019-2026 CERN and copyright holders of ALICE O2.
2+
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3+
// All rights not expressly granted are reserved.
4+
//
5+
// This software is distributed under the terms of the GNU General Public
6+
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7+
//
8+
// In applying this license CERN does not waive the privileges and immunities
9+
// granted to it by virtue of its status as an Intergovernmental Organization
10+
// or submit itself to any jurisdiction.
11+
12+
#pragma link off all globals;
13+
#pragma link off all classes;
14+
#pragma link off all functions;
15+
16+
#pragma link C++ class StepTHn + ;
17+
#pragma link C++ class StepTHnT < TArrayF> + ;
18+
#pragma link C++ class StepTHnT < TArrayD> + ;
19+
#pragma link C++ typedef StepTHnF;
20+
#pragma link C++ typedef StepTHnD;
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Copyright 2019-2026 CERN and copyright holders of ALICE O2.
2+
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3+
// All rights not expressly granted are reserved.
4+
//
5+
// This software is distributed under the terms of the GNU General Public
6+
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7+
//
8+
// In applying this license CERN does not waive the privileges and immunities
9+
// granted to it by virtue of its status as an Intergovernmental Organization
10+
// or submit itself to any jurisdiction.
11+
12+
#pragma link off all globals;
13+
#pragma link off all classes;
14+
#pragma link off all functions;
15+
16+
#pragma link C++ class o2::test::TriviallyCopyable + ;
17+
#pragma link C++ class o2::test::Base + ;
18+
#pragma link C++ class o2::test::Polymorphic + ;
19+
#pragma link C++ class o2::test::SimplePODClass + ;
20+
#pragma link C++ class std::vector < o2::test::TriviallyCopyable> + ;
21+
#pragma link C++ class std::vector < o2::test::Polymorphic> + ;

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)