Skip to content
Snippets Groups Projects
Commit da58e39f authored by Pierre-Alain Loizeau's avatar Pierre-Alain Loizeau
Browse files

[mCBM 2024] Add CI of chain reco script w/ first/temp run to protect dev changes

parent 9b8728ea
No related branches found
No related tags found
1 merge request!1874CI for mCBM 2024 Ni with temporary example run
......@@ -24,3 +24,71 @@ Install(DIRECTORY online
Install(DIRECTORY data
DESTINATION share/cbmroot/macro/beamtime/mcbm2024
PATTERN "*" EXCLUDE)
# ===== mCBM 2021 tests ==================================================
# ====> only if test TSA files for "typical runs" present
If(DEFINED ENV{RAW_DATA_PATH} )
SET( RAW_DATA_PATH $ENV{RAW_DATA_PATH} )
Message( STATUS "Raw data path provided => Performing mCBM 2024 tests using tsa files in ${RAW_DATA_PATH}" )
# ===== Cleanup the data directory =======================================
add_test(mcbm_2024_cleanup ${CMAKE_COMMAND}
-P ${CMAKE_SOURCE_DIR}/cmake/scripts/cleanmacrodir.cmake)
set_tests_properties(mcbm_2024_cleanup PROPERTIES
TIMEOUT 200
FIXTURES_SETUP mcbm_2024_cleanup
)
# ============================================================================
# ===== Copy the .rootrc file into the directory from which root is executed
# --- Otherwise the rootalias file is not loaded
file(COPY ${CBMROOT_SOURCE_DIR}/macro/include/.rootrc
DESTINATION ${CBMROOT_BINARY_DIR}/macro/beamtime/mcbm2024)
# ============================================================================
# ===== Create test script with all environment needed for the reco chain script
GENERATE_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/beamtime/mcbm2024/reco_mcbm.sh)
# ============================================================================
## Run only if raw data files present: 2024
# =====> Set the timeouts and data range depending on test model (profiling = slow)
if(${CBM_TEST_MODEL} MATCHES MergeRequest OR ${CBM_TEST_MODEL} MATCHES Continuous )
Message( STATUS "MR or Continuous model detected, decreasing event nb for mCBM 2024 reco tests to single one." )
SET( RECO_TS_NB 1)
SET( RAW_DATA_PROCESS_TO 700) # MR mode on run4: ???
List(APPEND mcbm_2024_runs 3105) # Run CI only on 3105 for now
elseif(${CBM_TEST_MODEL} MATCHES Weekly OR ${CBM_TEST_MODEL} MATCHES Profile )
Message( STATUS "Profiling model detected, increasing timeout and event nb for mCBM 2024 tests with coverage." )
SET( RECO_TS_NB 20)
SET( RAW_DATA_PROCESS_TO 3600) # MR mode on run4: ???
List(APPEND mcbm_2024_runs 3105) # Run CI only on 3105 for now
else()
SET( RECO_TS_NB 3)
SET( RAW_DATA_PROCESS_TO 1500) # MR mode on run4: ???
List(APPEND mcbm_2024_runs 3105) # Run CI only on 3105 for now
endif()
# ====================================================================
ForEach(RUN IN LISTS mcbm_2024_runs)
Message( STATUS "Checking if raw data file exists: ${RAW_DATA_PATH}/${RUN}_first20Ts.tsa" )
If(EXISTS ${RAW_DATA_PATH}/${RUN}_first20Ts.tsa)
Message( STATUS "Raw data file found, tests will be performed for mCBM run ${RUN}" )
### Complete reco chain script by S. Zharko
Set(testname mcbm_2024_${RUN})
Add_Test(${testname} ${CBMROOT_BINARY_DIR}/macro/beamtime/mcbm2024/reco_mcbm.sh
--tsa ${RAW_DATA_PATH}/${RUN}_first20Ts.tsa
--nts ${RECO_TS_NB}
--setup --unpack --reco --qa --qa-module
)
Set_Tests_Properties(${testname} PROPERTIES
TIMEOUT ${RAW_DATA_PROCESS_TO}
FAIL_REGULAR_EXPRESSION "segmentation violation"
PASS_REGULAR_EXPRESSION "Reconstruction of ${RAW_DATA_PATH}/${RUN}_first20Ts.tsa succeeded\n"
FIXTURES_REQUIRED mcbm_2024_cleanup
)
EndIf() # If(EXISTS ${RAW_DATA_PATH}/${RUN}_first20Ts.tsa))
EndForEach() # ForEach(RUN 2391 2488 )
EndIf() # If(DEFINED ENV{RAW_DATA_PATH} )
......@@ -48,8 +48,11 @@
# <qa>: Main QA output: <top_dir>/<label>.qa.root
# <qa-module>: Reconstruction module QA: <top_dir>/<label>.rqa.root
#
# 4. Knwon missing features
#
#
# - Automated detection of success/failure if a given step to avoid running unnecessary steps
# - Proper evaluation and printout of script result (reaching the end is not always success)
# - Script and its sub-process is not killed if CTEST is stopped with CTRL+C
#
# *********************
# ** USER PARAMETERS **
......@@ -140,9 +143,15 @@ ONLINE_BINARY="${VMCWORKDIR}/../../bin/cbmreco"
if [[ ! -x "${ONLINE_BINARY}" ]]; then
ONLINE_BINARY=$(which cbmreco)
if [[ ! -x "${ONLINE_BINARY}" ]]; then
printf "E- Online binary was not found. Please, install and configure your CbmRoot "
printf "or provide the bin directory in the PATH environmental variable\n"
exit 2
# Test for execution within the build folder by CTEST (CI/CMAKE/CDASH)
ONLINE_BINARY="${PWD}/../../../bin/cbmreco"
if [[ ! -x "${ONLINE_BINARY}" ]]; then
printf "E- Online binary was not found. Please:\n"
printf " - install and configure your CbmRoot\n"
printf " - or provide the bin directory in the PATH environmental variable\n"
printf " - or run within the CI/CTEST environment\n"
exit 2
fi
fi
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment