Skip to content

Commit

Permalink
Remove any path containing /fccanalyses/ for one test (#278)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell authored Feb 22, 2024
1 parent d0deb7f commit 7b100c7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,15 @@ IF(TARGET ROOT::ROOTDataFrame)

add_test(NAME py_test_rdf COMMAND python ${CMAKE_CURRENT_LIST_DIR}/test_rdf.py)
set_test_env(py_test_rdf)
get_property(ENVIRONMENT TEST py_test_rdf PROPERTY ENVIRONMENT)
set_property(TEST py_test_rdf PROPERTY ENVIRONMENT
set_property(TEST py_test_rdf APPEND PROPERTY ENVIRONMENT
${ENVIRONMENT}
PYTHONPATH=${PROJECT_SOURCE_DIR}/python:$ENV{PYTHONPATH}
)
get_property(ENVIRONMENT TEST py_test_rdf PROPERTY ENVIRONMENT)
# Remove fccanalyses to prevent ROOT from loading their dictionaries
# for RDataFrame
string(REGEX REPLACE "[^:]*\\/fccanalyses\\/[^:]*(:?|$)" "" ENVIRONMENT "${ENVIRONMENT}")
set_property(TEST py_test_rdf PROPERTY ENVIRONMENT ${ENVIRONMENT})
set_tests_properties(py_test_rdf PROPERTIES DEPENDS write_events)
endif()

Expand Down
2 changes: 1 addition & 1 deletion test/test_rdf.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3

import ROOT
import edm4hep
import edm4hep # noqa: F401

ROOT.EnableImplicitMT()

Expand Down

0 comments on commit 7b100c7

Please sign in to comment.