Skip to content

Commit

Permalink
Fix the clicRec test
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell committed Feb 8, 2024
1 parent fb434ca commit c254363
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
3 changes: 1 addition & 2 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ ExternalData_Add_Test( marlinwrapper_tests NAME simple_processors2 COMMAND ${K4R
add_test( CLICPerformance_setup bash -c "test -d CLICPerformance || git clone --depth=1 https://github.com/iLCSoft/CLICPerformance")

# Test clicReconstruction
add_test( clicRec bash -c ${CMAKE_CURRENT_SOURCE_DIR}/scripts/clicRec.sh )

ExternalData_Add_Test( marlinwrapper_tests NAME clicRec COMMAND bash -c ${CMAKE_CURRENT_SOURCE_DIR}/scripts/clicRec.sh DATA{${PROJECT_SOURCE_DIR}/test/input_files/testSimulation.slcio} )
# Test converter constants
add_test( converter_constants bash -c ${CMAKE_CURRENT_SOURCE_DIR}/scripts/converter_constants.sh )

Expand Down
9 changes: 1 addition & 8 deletions test/scripts/clicRec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,11 @@ python \
clicReconstruction.xml \
clicReconstruction.py

# Generate slcio file if not present
if [ ! -f $TEST_DIR/inputFiles/testSimulation.slcio ]; then
echo "Input file not found. Getting it from key4hep..."
wget https://key4hep.web.cern.ch/testFiles/ddsimOutput/testSimulation.slcio -P $TEST_DIR/inputFiles/
fi


echo "Modifying clicReconstruction.py file..."
# Replace SLCIO file path
# sed -i 's|/run/simulation/with/ctest/to/create/a/file.slcio|testSimulation.slcio|g' clicReconstruction.py
sed -i '1s/^/import os\n/' clicReconstruction.py
sed -i 's|/run/simulation/with/ctest/to/create/a/file.slcio|$TEST_DIR/inputFiles/testSimulation.slcio|g' clicReconstruction.py
sed -i "s|/run/simulation/with/ctest/to/create/a/file.slcio|$1|g" clicReconstruction.py
# Uncomment selected optional processors
sed -i 's;EvtMax = 10,;EvtMax = 3,;' clicReconstruction.py
sed -i 's;"MaxRecordNumber": ["10"],;"MaxRecordNumber": ["3"],;' clicReconstruction.py
Expand Down

0 comments on commit c254363

Please sign in to comment.