Skip to content

Commit

Permalink
Rename unittests to unittests_edm4hep
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell committed Sep 13, 2023
1 parent 8c7f21f commit 0e234af
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/utils/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ endif()

include(Catch)

add_executable(unittests
add_executable(unittests_edm4hep
test_kinematics.cpp test_vector_utils.cpp)
target_link_libraries(unittests edm4hep EDM4HEP::utils Catch2::Catch2 Catch2::Catch2WithMain)
target_link_libraries(unittests_edm4hep edm4hep EDM4HEP::utils Catch2::Catch2 Catch2::Catch2WithMain)

option(SKIP_CATCH_DISCOVERY "Skip the Catch2 test discovery" OFF)

Expand All @@ -33,15 +33,15 @@ if (SKIP_CATCH_DISCOVERY)
# Unfortunately Memory sanitizer seems to be really unhappy with Catch2 and
# it fails to succesfully launch the executable and execute any test. Here
# we just include them in order to have them show up as failing
add_test(NAME unittests COMMAND unittests)
add_test(NAME unittests COMMAND unittests_edm4hep)
set_property(TEST unittests
PROPERTY ENVIRONMENT
LD_LIBRARY_PATH=$<TARGET_FILE_DIR:edm4hep>:$<TARGET_FILE_DIR:podio::podio>:$<TARGET_FILE_DIR:ROOT::Core>:$ENV{LD_LIBRARY_PATH}
PYTHONPATH=${PROJECT_SOURCE_DIR}/python:$ENV{PYTHONPATH}
ROOT_INCLUDE_PATH=${PROJECT_SOURCE_DIR}/edm4hep:${PROJECT_SOURCE_DIR}/utils/include:$ENV{ROOT_INCLUDE_PATH}
)
else()
catch_discover_tests(unittests)
catch_discover_tests(unittests_edm4hep)
endif()

add_test(NAME pyunittests COMMAND python -m unittest discover -s ${CMAKE_CURRENT_LIST_DIR})
Expand Down

0 comments on commit 0e234af

Please sign in to comment.