Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-23 10:17:42

0001 #!/bin/bash
0002 
0003 # Pass in name and status
0004 function die {
0005   printf "\n%s: status %s\n" "$1" "$2"
0006   exit $2
0007 }
0008 
0009 check_for_success() {
0010     "${@}" && echo -e "\n ---> Passed test of '${@}'\n\n" || exit 1
0011 }
0012 
0013 check_for_failure() {
0014     "${@}" && exit 1 || echo -e "\n ---> Passed test of '${@}'\n\n"
0015 }
0016 
0017 inputfile=/store/data/Run2024C/EphemeralHLTPhysics0/RAW/v1/000/379/416/00000/e8dd5e3c-216f-4545-acb6-ab86c9161085.root
0018 
0019 echo "========================================"
0020 echo "Testing convertToRaw in ${SCRAM_TEST_PATH}."
0021 echo "----------------------------------------"
0022 echo
0023 
0024 echo "========================================"
0025 echo "testing help function "
0026 echo "----------------------------------------"
0027 echo
0028 
0029 convertToRaw --help  || die "Failure running convertToRaw --help" $?
0030 
0031 echo "========================================"
0032 echo "testing successful conversion"
0033 echo "----------------------------------------"
0034 echo
0035 
0036 check_for_success convertToRaw -f 1 -l=1 -v $inputfile
0037 
0038 echo "========================================"
0039 echo "testing failing conversion"
0040 echo "----------------------------------------"
0041 echo
0042 
0043 check_for_failure convertToRaw -f 1 -l=-1 -s rawDataRepacker $inputfile