Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions Framework/Core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ o2_add_library(Framework
src/DPLWebSocket.cxx
src/StatusWebSocketHandler.cxx
src/TimerParamSpec.cxx
test/TestClasses.cxx
TARGETVARNAME targetName
PRIVATE_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_LIST_DIR}/src
PUBLIC_LINK_LIBRARIES AliceO2::Configuration
Expand Down Expand Up @@ -189,9 +188,16 @@ o2_add_library(Framework
target_include_directories(${targetName} PUBLIC $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/DataFormats/simulation/include>)

o2_target_root_dictionary(Framework
HEADERS include/Framework/StepTHn.h
LINKDEF src/StepTHnLinkDef.h)

# o2::test::* support classes for unit tests, kept out of production libO2Framework.
o2_add_library(FrameworkTestSupport
SOURCES test/TestClasses.cxx
PUBLIC_LINK_LIBRARIES O2::Framework)
o2_target_root_dictionary(FrameworkTestSupport
HEADERS test/TestClasses.h
include/Framework/StepTHn.h
LINKDEF test/FrameworkCoreTestLinkDef.h)
LINKDEF test/TestClassesLinkDef.h)

add_executable(o2-test-framework-core
test/test_AlgorithmSpec.cxx
Expand Down Expand Up @@ -268,6 +274,7 @@ add_executable(o2-test-framework-core
test/unittest_DataSpecUtils.cxx
)
target_link_libraries(o2-test-framework-core PRIVATE O2::Framework)
target_link_libraries(o2-test-framework-core PRIVATE O2::FrameworkTestSupport)
target_link_libraries(o2-test-framework-core PRIVATE O2::Catch2)

get_filename_component(outdir ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/../tests ABSOLUTE)
Expand Down Expand Up @@ -374,7 +381,6 @@ foreach(w
RegionInfoCallbackService
DanglingInputs
DanglingOutputs
DataAllocator
StaggeringWorkflow
Forwarding
ParallelPipeline
Expand Down Expand Up @@ -403,6 +409,15 @@ foreach(w
COMMAND_LINE_ARGS ${DPL_WORKFLOW_TESTS_EXTRA_OPTIONS} --run --shm-segment-size 20000000)
endforeach()

o2_add_test(DataAllocator NAME test_Framework_test_DataAllocator
SOURCES test/test_DataAllocator.cxx
COMPONENT_NAME Framework
LABELS framework workflow
PUBLIC_LINK_LIBRARIES O2::Framework O2::FrameworkTestSupport
TIMEOUT 30
NO_BOOST_TEST
COMMAND_LINE_ARGS ${DPL_WORKFLOW_TESTS_EXTRA_OPTIONS} --run --shm-segment-size 20000000)

if (BUILD_TESTING)
# TODO: DanglingInput test not working for the moment [ERROR] Unable to relay
# part. [WARN] Incoming data is already obsolete, not relaying.
Expand Down
20 changes: 20 additions & 0 deletions Framework/Core/src/StepTHnLinkDef.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Copyright 2019-2026 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;

#pragma link C++ class StepTHn + ;
#pragma link C++ class StepTHnT < TArrayF> + ;
#pragma link C++ class StepTHnT < TArrayD> + ;
#pragma link C++ typedef StepTHnF;
#pragma link C++ typedef StepTHnD;
21 changes: 21 additions & 0 deletions Framework/Core/test/TestClassesLinkDef.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Copyright 2019-2026 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;

#pragma link C++ class o2::test::TriviallyCopyable + ;
#pragma link C++ class o2::test::Base + ;
#pragma link C++ class o2::test::Polymorphic + ;
#pragma link C++ class o2::test::SimplePODClass + ;
#pragma link C++ class std::vector < o2::test::TriviallyCopyable> + ;
#pragma link C++ class std::vector < o2::test::Polymorphic> + ;
6 changes: 3 additions & 3 deletions Framework/Utils/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ o2_add_executable(output-proxy
o2_add_test(RootTreeWriterWorkflow
NO_BOOST_TEST
SOURCES test/test_RootTreeWriterWorkflow.cxx
PUBLIC_LINK_LIBRARIES O2::DPLUtils
PUBLIC_LINK_LIBRARIES O2::DPLUtils O2::FrameworkTestSupport
COMPONENT_NAME DPLUtils
LABELS dplutils
COMMAND_LINE_ARGS ${DPL_WORKFLOW_TESTS_EXTRA_OPTIONS} --run)

o2_add_test(RootTreeReader
NO_BOOST_TEST
SOURCES test/test_RootTreeReader.cxx
PUBLIC_LINK_LIBRARIES O2::DPLUtils
PUBLIC_LINK_LIBRARIES O2::DPLUtils O2::FrameworkTestSupport
COMPONENT_NAME DPLUtils
LABELS dplutils
COMMAND_LINE_ARGS ${DPL_WORKFLOW_TESTS_EXTRA_OPTIONS} --run)
Expand All @@ -53,7 +53,7 @@ add_executable(o2-test-framework-utils
test/test_DPLRawParser.cxx
test/test_DPLRawPageSequencer.cxx
)
target_link_libraries(o2-test-framework-utils PRIVATE O2::Framework O2::DPLUtils O2::DetectorsRaw)
target_link_libraries(o2-test-framework-utils PRIVATE O2::Framework O2::DPLUtils O2::DetectorsRaw O2::FrameworkTestSupport)
target_link_libraries(o2-test-framework-utils PRIVATE O2::Catch2)

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