Skip to content

Commit 87ef0fc

Browse files
committed
DPL: drop more boost_test usage
1 parent 1f0e874 commit 87ef0fc

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

Framework/Core/CMakeLists.txt

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -315,11 +315,14 @@ set_property(TARGET o2-test-framework-root PROPERTY RUNTIME_OUTPUT_DIRECTORY ${o
315315
add_test(NAME framework:root COMMAND o2-test-framework-root --skip-benchmarks)
316316
add_test(NAME framework:crash COMMAND sh -e -c "PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}:$PATH ${CMAKE_CURRENT_LIST_DIR}/test/test_AllCrashTypes.sh")
317317

318-
o2_add_test(InfoLogger NAME test_Framework_test_InfoLogger
319-
SOURCES test/test_InfoLogger.cxx
320-
COMPONENT_NAME Framework
321-
LABELS framework
322-
PUBLIC_LINK_LIBRARIES O2::Framework AliceO2::InfoLogger)
318+
add_executable(o2-test-framework-infologger
319+
test/test_InfoLogger.cxx)
320+
target_link_libraries(o2-test-framework-infologger PRIVATE O2::Framework)
321+
target_link_libraries(o2-test-framework-infologger PRIVATE AliceO2::InfoLogger)
322+
target_link_libraries(o2-test-framework-infologger PRIVATE O2::Catch2)
323+
set_property(TARGET o2-test-framework-infologger
324+
PROPERTY RUNTIME_OUTPUT_DIRECTORY ${outdir})
325+
add_test(NAME framework:infologger COMMAND o2-test-framework-infologger)
323326

324327
o2_add_executable(dpl-null-sink
325328
SOURCES src/o2NullSink.cxx

Framework/Core/test/test_InfoLogger.cxx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,12 @@
88
// In applying this license CERN does not waive the privileges and immunities
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
11-
#define BOOST_TEST_MODULE Test Framework InfoLoggerTest
12-
#define BOOST_TEST_MAIN
13-
#define BOOST_TEST_DYN_LINK
14-
15-
#include <boost/test/unit_test.hpp>
11+
#include <catch_amalgamated.hpp>
1612

1713
#include <InfoLogger/InfoLogger.hxx>
1814
using namespace AliceO2::InfoLogger;
1915

20-
BOOST_AUTO_TEST_CASE(InfoLoggerTest)
16+
TEST_CASE("InfoLoggerTest")
2117
{
2218

2319
// define infologger output to stdout, as we don't want to use the default infoLoggerD pipe which might not be running here
@@ -27,5 +23,5 @@ BOOST_AUTO_TEST_CASE(InfoLoggerTest)
2723
InfoLogger theLog;
2824

2925
// log a test message
30-
BOOST_CHECK(theLog.log("This is a log message test to stdout") == 0);
26+
CHECK(theLog.log("This is a log message test to stdout") == 0);
3127
}

0 commit comments

Comments
 (0)