Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-12-10 02:51:01

0001 #!/bin/bash
0002 
0003 LOCAL_TEST_DIR=${CMSSW_BASE}/src/FWCore/Integration/test
0004 LOCAL_TMP_DIR=${CMSSW_BASE}/tmp/${SCRAM_ARCH}
0005 
0006 # Pass in name and status
0007 function die { echo $1: status $2 ; echo === Log file === ; cat ${3:-/dev/null} ; echo === End log file === ; exit $2; }
0008 
0009 pushd ${LOCAL_TMP_DIR}
0010 
0011 cat <<EOF > finalpath_expected_empty.log
0012 EOF
0013 
0014 cmsRun  ${LOCAL_TEST_DIR}/test_finalpath_cfg.py >& finalpath.log || die "failed test_finalpath_cfg.py" $?
0015 grep "thing '.*' TEST" finalpath.log | diff finalpath_expected_empty.log - || die "differences for test_finalpath_cfg.py" $?
0016 
0017 
0018 cmsRun  ${LOCAL_TEST_DIR}/test_finalpath_cfg.py -- --schedule >& finalpath.log || die "failed test_finalpath_cfg.py --schedule" $?
0019 grep "thing '.*' TEST" finalpath.log | diff finalpath_expected_empty.log - || die "differences for test_finalpath_cfg.py" $?
0020 
0021 
0022 cat <<EOF > finalpath_expected_not_found.log
0023 did not find thing '' TEST
0024 did not find thing '' TEST
0025 did not find thing '' TEST
0026 found thing 'beginLumi' TEST
0027 found thing 'endLumi' TEST
0028 found thing 'beginRun' TEST
0029 found thing 'endRun' TEST
0030 EOF
0031 cmsRun  ${LOCAL_TEST_DIR}/test_finalpath_cfg.py -- --schedule --task >& finalpath.log || die "failed test_finalpath_cfg.py --schedule --task" $?
0032 grep "thing '.*' TEST" finalpath.log | diff finalpath_expected_not_found.log - || die "differences for test_finalpath_cfg.py --schedule --task" $?
0033 
0034 
0035 cmsRun  ${LOCAL_TEST_DIR}/test_finalpath_cfg.py -- --endpath >& finalpath.log || die "failed test_finalpath_cfg.py --endpath" $?
0036 grep "thing '.*' TEST" finalpath.log | diff finalpath_expected_empty.log - || die "differences for test_finalpath_cfg.py --endpath" $?
0037 
0038 cmsRun  ${LOCAL_TEST_DIR}/test_finalpath_cfg.py -- --schedule --endpath >& finalpath.log || die "failed test_finalpath_cfg.py --schedule --endpath" $?
0039 grep "thing '.*' TEST" finalpath.log | diff finalpath_expected_empty.log - || die "differences for test_finalpath_cfg.py --schedule --endpath" $?
0040 
0041 
0042 cat <<EOF > finalpath_expected_found.log
0043 found thing '' TEST
0044 found thing '' TEST
0045 found thing '' TEST
0046 found thing 'beginLumi' TEST
0047 found thing 'endLumi' TEST
0048 found thing 'beginRun' TEST
0049 found thing 'endRun' TEST
0050 EOF
0051 cmsRun  ${LOCAL_TEST_DIR}/test_finalpath_cfg.py -- --endpath --task >& finalpath.log || die "failed test_finalpath_cfg.py --endpath --task" $?
0052 grep "thing '.*' TEST" finalpath.log | diff finalpath_expected_found.log - || die "differences for test_finalpath_cfg.py --endpath --task" $?
0053 
0054 cmsRun  ${LOCAL_TEST_DIR}/test_finalpath_cfg.py -- --endpath --task --schedule >& finalpath.log || die "failed test_finalpath_cfg.py --endpath --task --schedule" $?
0055 grep "thing '.*' TEST" finalpath.log | diff finalpath_expected_found.log - || die "differences for test_finalpath_cfg.py --endpath --task --schedule" $?
0056 
0057 cmsRun  ${LOCAL_TEST_DIR}/test_finalpath_cfg.py -- --path --task >& finalpath.log || die "failed test_finalpath_cfg.py --path --task" $?
0058 grep "thing '.*' TEST" finalpath.log | diff finalpath_expected_found.log - || die "differences for test_finalpath_cfg.py --path --task" $?
0059 
0060 cmsRun  ${LOCAL_TEST_DIR}/test_finalpath_cfg.py -- --path --task --schedule >& finalpath.log || die "failed test_finalpath_cfg.py --path --task --schedule" $?
0061 grep "thing '.*' TEST" finalpath.log | diff finalpath_expected_found.log - || die "differences for test_finalpath_cfg.py --path --task --schedule" $?
0062 
0063 
0064 cat <<EOF > finalpath_expected_filter.log
0065 did not find thing '' TEST
0066 found thing '' TEST
0067 did not find thing '' TEST
0068 found thing 'beginLumi' TEST
0069 found thing 'endLumi' TEST
0070 found thing 'beginRun' TEST
0071 found thing 'endRun' TEST
0072 EOF
0073 
0074 cmsRun  ${LOCAL_TEST_DIR}/test_finalpath_cfg.py -- --path --filter >& finalpath.log || die "failed test_finalpath_cfg.py --path --filter" $?
0075 grep "thing '.*' TEST" finalpath.log | diff finalpath_expected_filter.log - || die "differences for test_finalpath_cfg.py --path --filter" $?
0076 
0077 
0078 cmsRun  ${LOCAL_TEST_DIR}/test_finalpath_cfg.py -- --path --filter --task >& finalpath.log || die "failed test_finalpath_cfg.py --path --filter --task" $?
0079 grep "thing '.*' TEST" finalpath.log | diff finalpath_expected_filter.log - || die "differences for test_finalpath_cfg.py --path --filter --task" $?