Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:07:43

0001 #!/bin/bash
0002 
0003 # Check if the key argument is provided
0004 if [ $# -eq 0 ]; then
0005     echo "Usage: $0 <key>"
0006     exit 1
0007 fi
0008 
0009 # Extract the key from the command line argument
0010 key="$1"
0011 
0012 # Define a function to run the python command
0013 run_python_command() {
0014     function die { echo $1: status $2 ; exit $2; }
0015 
0016     entry="$1"
0017     key="$2"
0018 
0019     # Check conditions to skip certain combinations
0020     if [[ "$entry" == *visualization-live_cfg.py* && ( "$key" == "pp_run_stage1" || "$key" == "cosmic_run_stage1" || "$key" == "hpu_run" ) ]]; then
0021         echo "===== Skipping Test \"python3 $entry runkey=$key\" ===="
0022         return
0023     fi
0024 
0025     # Otherwise, proceed with the test
0026     echo "===== Test \"python3 $entry runkey=$key\" ===="
0027     (python3 "$entry" runkey="$key" > /dev/null) 2>&1 || die "Failure using python3 $entry" $?
0028 }
0029 
0030 # Run the tests for the specified key
0031 echo "Running tests for key: $key"
0032 for entry in "${CMSSW_BASE}/src/DQM/Integration/python/clients/"*"-live_cfg.py"; do
0033     run_python_command "$entry" "$key"
0034 done
0035 
0036 # All tests passed
0037 echo "All tests passed!"