Skip to content

Commit

Permalink
Make it possible to run clic reco tests concurrently
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadlener authored and andresailer committed Jan 16, 2023
1 parent 53363c8 commit 9ef24c4
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 10 deletions.
10 changes: 10 additions & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ if (BASH_PROGRAM)
# Test simple_processors2
add_test( simple_processors2 ${BASH_PROGRAM} ${CMAKE_CURRENT_SOURCE_DIR}/scripts/simple_processors2.sh )

# CLICPerformance setup is added as a simple test that will always succeed, on
# which other tests that need it can depend, in order to make concurrent
# running of those more easily possible
add_test( CLICPerformance_setup ${BASH_PROGRAM} ${CMAKE_CURRENT_SOURCE_DIR}/scripts/setup_clic_performance.sh )

# Test clicReconstruction
add_test( clicRec ${BASH_PROGRAM} ${CMAKE_CURRENT_SOURCE_DIR}/scripts/clicRec.sh )

Expand Down Expand Up @@ -78,5 +83,10 @@ if (BASH_PROGRAM)
ENVIRONMENT "TEST_DIR=${CMAKE_CURRENT_SOURCE_DIR};LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:${CMAKE_INSTALL_PREFIX}/lib64:$ENV{LD_LIBRARY_PATH};PYTHONPATH=${CMAKE_INSTALL_PREFIX}/python:$ENV{PYTHONPATH}"
)

set_tests_properties(
clicRec clicRec_lcio_mt clicRec_edm4hep_input
PROPERTIES
DEPENDS CLICPerformance_setup
)

endif(BASH_PROGRAM)
4 changes: 1 addition & 3 deletions test/scripts/clicRec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
set -eu

# Clone CLICPerformance for input files
if [ ! -d CLICPerformance ]; then
git clone https://github.com/iLCSoft/CLICPerformance
fi
bash $TEST_DIR/scripts/setup_clic_performance.sh

cd CLICPerformance/clicConfig

Expand Down
4 changes: 1 addition & 3 deletions test/scripts/clicRec_e4h_input.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
set -eu

# Clone CLICPerformance for input files
if [ ! -d CLICPerformance ]; then
git clone https://github.com/iLCSoft/CLICPerformance
fi
bash $TEST_DIR/scripts/setup_clic_performance.sh

cd CLICPerformance/clicConfig

Expand Down
6 changes: 2 additions & 4 deletions test/scripts/clicRec_lcio_mt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
set -eu

# Clone CLICPerformance for input files
if [ ! -d CLICPerformance ]; then
git clone https://github.com/iLCSoft/CLICPerformance
fi
bash $TEST_DIR/scripts/setup_clic_performance.sh

cd CLICPerformance/clicConfig

Expand All @@ -31,4 +29,4 @@ if [ "$input_num_events" == "$output_num_events" ]; then
echo "Input and output have same number of events"
else
echo "ERROR: different number of events for input and output"
fi
fi
5 changes: 5 additions & 0 deletions test/scripts/setup_clic_performance.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

if [ ! -d CLICPerformance ]; then
git clone --depth=1 https://github.com/iLCSoft/CLICPerformance
fi

0 comments on commit 9ef24c4

Please sign in to comment.