/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Alignment/OfflineValidation/test/testingScripts/test_unitSubmitPVsplit.sh
46 строк
2 KB
mmusich
clearer printout of the outpus in test_unitSubmitPVsplit
17 ноя 2024, 19:10
17 ноя 2024, 19:10
db24ba3
Код
Авторство
О чём код?
#! /bin/bash function die { echo $1: status $2 ; exit $2; } echo " TESTING Split Vertex Validation submission ..." submitPVResolutionJobs.py -j UNIT_TEST -D /JetHT/Run2022B-TkAlJetHT-PromptReco-v1/ALCARECO \ -i ${CMSSW_BASE}/src/Alignment/OfflineValidation/test/PVResolutionExample.ini --unitTest || die "Failure running Split Vertex Validation submission" $? echo -e "\n\n TESTING Primary Vertex Split script execution ..." # Define script name scriptName="batchHarvester_Prompt_0.sh" # Create directory if it doesn't exist testdir=$PWD mkdir ${testdir}/"testExecution" # Check if the script exists and is a regular file if [ -f "${testdir}/BASH/${scriptName}" ]; then # Copy script to the test execution directory cp "${testdir}/BASH/${scriptName}" "${testdir}/testExecution/" else # Emit a warning if the script doesn't exist or is not a regular file echo "Warning: Script '${scriptName}' not found or is not a regular file. Skipping excution of further tests." exit 0 fi # Change directory to the test execution directory cd "${testdir}/testExecution" || exit 1 # Execute the script and handle errors $PWD/"${scriptName}" || die "Failure running PVSplit script" $? # Dump to screen the content of the log file(s) with clear headers log_files=(log*.out) if [[ ${#log_files[@]} -gt 0 ]]; then echo "Displaying content of log files:" for log_file in "${log_files[@]}"; do echo "========================================" echo "Content of $log_file:" echo "========================================" cat "$log_file" echo # Add an extra blank line for separation done else echo "No log files found matching 'log*.out'." fi