From 67bdd9a7c95b3354e3f896dac7b6372c30c87baf Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Wed, 6 Dec 2023 15:04:40 +0100 Subject: [PATCH] Make sure that tests also work in Ubuntu environments (#243) * Add ubuntu based workflow to CI * Run catch test discovery in correct environment --- .github/workflows/lcg_linux_with_podio.yml | 2 ++ test/utils/CMakeLists.txt | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lcg_linux_with_podio.yml b/.github/workflows/lcg_linux_with_podio.yml index e811fab2f..a53702378 100644 --- a/.github/workflows/lcg_linux_with_podio.yml +++ b/.github/workflows/lcg_linux_with_podio.yml @@ -16,6 +16,8 @@ jobs: CXX_STANDARD: 17 - LCG: "LCG_104/x86_64-centos8-gcc11-opt" CXX_STANDARD: 17 + - LCG: "dev4/x86_64-ubuntu2004-gcc9-opt" + CXX_STANDARD: 17 steps: - uses: actions/checkout@v3 - uses: cvmfs-contrib/github-action-cvmfs@v3 diff --git a/test/utils/CMakeLists.txt b/test/utils/CMakeLists.txt index 3080eb6ef..ae6eaf952 100644 --- a/test/utils/CMakeLists.txt +++ b/test/utils/CMakeLists.txt @@ -41,7 +41,10 @@ if (SKIP_CATCH_DISCOVERY) ROOT_INCLUDE_PATH=${PROJECT_SOURCE_DIR}/edm4hep:${PROJECT_SOURCE_DIR}/utils/include:$ENV{ROOT_INCLUDE_PATH} ) else() - catch_discover_tests(unittests_edm4hep) + catch_discover_tests(unittests_edm4hep + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + DL_PATHS $:$:$:$ENV{LD_LIBRARY_PATH} + ) endif() add_test(NAME pyunittests COMMAND python -m unittest discover -s ${CMAKE_CURRENT_LIST_DIR})