Skip to content

Commit

Permalink
add hlt-p2-integration on demand in PR tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mmusich committed Oct 2, 2024
1 parent fe7c021 commit a7fba11
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 1 deletion.
35 changes: 35 additions & 0 deletions pr_testing/run-pr-hlt-p2-integration.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash -ex
source $WORKSPACE/cms-bot/pr_testing/setup-pr-test-env.sh

PR_REPO_NUM=$(echo $PULL_REQUEST | sed 's|^.*/||;s|#||')
UPLOAD_PATH="${CMSSW_VERSION}-${PR_REPO_NUM}/${ARCHITECTURE}/${BUILD_NUMBER}"
# Report test started
mark_commit_status_all_prs 'hlt-p2-integration' 'pending' -u "${BUILD_URL}" -d "Running"

ls -l /eos/cms/store
# Do work
HLT_P2_SCRIPT="src/HLTrigger/Configuration/scripts"
HLT_BASEDIR="${CMSSW_BASE}"
if [ ! -e "${HLT_BASEDIR}/${HLT_P2_SCRIPT}" ] ; then HLT_BASEDIR="${CMSSW_RELEASE_BASE}" ; fi
cp -r ${HLT_BASEDIR}/${HLT_P2_SCRIPT} $WORKSPACE/rundir
rm -rf $WORKSPACE/rundir/__pycache__

pushd $WORKSPACE/rundir
export LOCALRT=${WORKSPACE}/${CMSSW_VERSION}
timeout $TIMEOUT ${HLT_BASEDIR}/${HLT_P2_SCRIPT}/hltPhase2UpgradeIntegrationTests 2>&1 | tee -a ${WORKSPACE}/hlt-p2-integration.log
popd

# Upload results
source $WORKSPACE/cms-bot/jenkins-artifacts
touch ${RESULTS_DIR}/15-hlt-p2-integration-report.res ${RESULTS_DIR}/15-hlt-p2-integration-failed.res
if [ -f $WORKSPACE/rundir/Phase2Timing_resources.json ] ; then
echo "HLT_P2_INTEGRATION;SUCCESS,HLT Phase 2 integration Test" >> ${RESULTS_DIR}/hlt-p2-integration.txt
echo -e "\n* **HLT P2 Integration**" > ${RESULTS_DIR}/15-hlt-p2-integration-report.res
mark_commit_status_all_prs 'hlt-p2-integration' 'success' -u "${BUILD_URL}" -d "HLT Phase2 integration data collected"
else
echo "HLT_P2_INTEGRATION;ERROR,HLT Phase 2 integration Test,See Logs,hlt-p2-integration.log" >> ${RESULTS_DIR}/hlt-p2-integration.txt
echo "HLTP2Integration" > ${RESULTS_DIR}/15-hlt-p2-integration-failed.res
mark_commit_status_all_prs 'hlt-p2-integration' 'error' -u "${BUILD_URL}" -d "HLT Phase2 integration script failed"
fi
rm -rf $WORKSPACE/json_upload $WORKSPACE/rundir
prepare_upload_results
14 changes: 14 additions & 0 deletions pr_testing/test_multiple_prs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ DO_MB_COMPARISON=false
DO_DAS_QUERY=false
DO_CRAB_TESTS=false
DO_HLT_P2_TIMING=false
DO_HLT_P2_INTEGRATION=false
[ $(echo ${ARCHITECTURE} | grep "_amd64_" | wc -l) -gt 0 ] && DO_COMPARISON=true
[ $(echo ${RELEASE_FORMAT} | grep 'SAN_X' | wc -l) -gt 0 ] && DO_COMPARISON=false
BUILD_VERBOSE=true
Expand Down Expand Up @@ -1235,12 +1236,21 @@ if [ "X$BUILD_OK" = Xtrue -a "$RUN_TESTS" = "true" ]; then
fi
fi
fi
if [ $(echo ${ENABLE_BOT_TESTS} | tr ',' ' ' | tr ' ' '\n' | grep '^HLT_P2_INTEGRATION$' | wc -l) -gt 0 ] ; then
if [ $(echo ${ARCHITECTURE} | grep "_amd64_" | wc -l) -gt 0 ] ; then
if [ -e ${CMSSW_RELEASE_BASE}/src/HLTrigger/Configuration/scripts/hltPhase2UpgradeIntegrationTests ]; then
DO_HLT_P2_INTEGRATION=true
mark_commit_status_all_prs 'hlt-p2-integration' 'pending' -u "${BUILD_URL}" -d "Waiting for tests to start"
fi
fi
fi
else
DO_TESTS=false
DO_SHORT_MATRIX=false
DO_ADDON_TESTS=false
DO_CRAB_TESTS=false
DO_HLT_P2_TIMING=false
DO_HLT_P2_INTEGRATION=false
fi

REPORT_OPTS="--report-url ${PR_RESULT_URL} $NO_POST"
Expand Down Expand Up @@ -1409,4 +1419,8 @@ if [ "${DO_HLT_P2_TIMING}" = "true" ] ; then
cp $WORKSPACE/test-env.txt $WORKSPACE/run-hlt_p2_timing.prop
fi

if [ "${DO_HLT_P2_INTEGRATION}" = "true" ] ; then
cp $WORKSPACE/test-env.txt $WORKSPACE/run-hlt_p2_integration.prop
fi

rm -f $WORKSPACE/test-env.txt
2 changes: 1 addition & 1 deletion process_pr.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def format(s, **kwds):
ALL_CHECK_FUNCTIONS = None
EXTRA_RELVALS_TESTS = ["threading", "gpu", "high-stats", "nano"]
EXTRA_RELVALS_TESTS_OPTS = "_" + "|_".join(EXTRA_RELVALS_TESTS)
EXTRA_TESTS = "|".join(EXTRA_RELVALS_TESTS) + "|hlt_p2_timing|profiling|none"
EXTRA_TESTS = "|".join(EXTRA_RELVALS_TESTS) + "|hlt_p2_integration|hlt_p2_timing|profiling|none"
SKIP_TESTS = "|".join(["static", "header"])
ENABLE_TEST_PTRN = "enable(_test(s|)|)"
JENKINS_NODES = r"[a-zA-Z0-9_|&\s()-]+"
Expand Down

0 comments on commit a7fba11

Please sign in to comment.