Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-11-19 23:19:39

0001 #! /bin/bash
0002 
0003 function die { echo $1: status $2 ; exit $2; }
0004 
0005 echo " TESTING Split Vertex Validation submission ..."
0006 submitPVResolutionJobs.py -j UNIT_TEST -D /JetHT/Run2022B-TkAlJetHT-PromptReco-v1/ALCARECO \
0007   -i ${CMSSW_BASE}/src/Alignment/OfflineValidation/test/PVResolutionExample.ini --unitTest || die "Failure running Split Vertex Validation submission" $?
0008 
0009 echo -e "\n\n TESTING Primary Vertex Split script execution ..."
0010 # Define script name
0011 scriptName="batchHarvester_Prompt_0.sh"
0012 
0013 # Create directory if it doesn't exist
0014 testdir=$PWD
0015 mkdir ${testdir}/"testExecution"
0016 
0017 # Check if the script exists and is a regular file
0018 if [ -f "${testdir}/BASH/${scriptName}" ]; then
0019     # Copy script to the test execution directory
0020     cp "${testdir}/BASH/${scriptName}" "${testdir}/testExecution/"
0021 else
0022     # Emit a warning if the script doesn't exist or is not a regular file
0023     echo "Warning: Script '${scriptName}' not found or is not a regular file. Skipping excution of further tests."
0024     exit 0
0025 fi
0026 
0027 # Change directory to the test execution directory
0028 cd "${testdir}/testExecution" || exit 1
0029 
0030 # Execute the script and handle errors
0031 $PWD/"${scriptName}" || die "Failure running PVSplit script" $?
0032 
0033 # Dump to screen the content of the log file(s) with clear headers
0034 log_files=(log*.out)
0035 if [[ ${#log_files[@]} -gt 0 ]]; then
0036     echo "Displaying content of log files:"
0037     for log_file in "${log_files[@]}"; do
0038         echo "========================================"
0039         echo "Content of $log_file:"
0040         echo "========================================"
0041         cat "$log_file"
0042         echo # Add an extra blank line for separation
0043     done
0044 else
0045     echo "No log files found matching 'log*.out'."
0046 fi