-
Notifications
You must be signed in to change notification settings - Fork 246
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add option to run hlt p2 timing script for PRs (#2240)
* Add option to run hlt p2 timing script for PRs * Changes from review * Changes from review; put logs and resource files in correct dirs * send_jenkins_artifacts takes directory, not file(s) * Changes from review * Fix * Changes from review * jenkins jobs drops every thing afetr first - * Update run-pr-hlt-p2-timing.sh * Update run-pr-hlt-p2-timing.sh * Update run-pr-hlt-p2-timing.sh * Update run-pr-hlt-p2-timing.sh * Update test_multiple_prs.sh * set order for report/failed * Update run-pr-hlt-p2-timing.sh * Update run-pr-hlt-p2-timing.sh * looks like + in url is not working * Update pr_testing/run-pr-hlt-p2-timing.sh * cleanup; only upload json file to hlt-p2-timing area * run hlt-p2 test in separate dir so that we do not upload every thing --------- Co-authored-by: Malik Shahzad Muzaffar <[email protected]>
- Loading branch information
Showing
3 changed files
with
56 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/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-timing' 'pending' -u "${BUILD_URL}" -d "Running" | ||
|
||
# Do work | ||
HLT_P2_SCRIPT="src/HLTrigger/Configuration/python/HLT_75e33/test/runHLTTiming.sh" | ||
if [ -e ${CMSSW_BASE}/${HLT_P2_SCRIPT} ] ; then | ||
HLT_P2_SCRIPT="${CMSSW_BASE}/${HLT_P2_SCRIPT}" | ||
else | ||
HLT_P2_SCRIPT="${CMSSW_RELEASE_BASE}/${HLT_P2_SCRIPT}" | ||
fi | ||
|
||
mkdir -p ${RESULTS_DIR} $WORKSPACE/json_upload $WORKSPACE/rundir | ||
pushd $WORKSPACE/rundir | ||
export LOCALRT=${WORKSPACE}/${CMSSW_VERSION} | ||
timeout $TIMEOUT ${HLT_P2_SCRIPT} 2>&1 | tee ${RESULTS_DIR}/hlt-p2-timing.log | ||
popd | ||
|
||
# Upload results | ||
source $WORKSPACE/cms-bot/jenkins-artifacts | ||
touch ${RESULTS_DIR}/15-hlt-p2-timing-report.res ${RESULTS_DIR}/15-hlt-p2-timing-failed.res | ||
if [ -f $WORKSPACE/rundir/Phase2Timing_resources.json ] ; then | ||
CHART_URL="https://cmssdt.cern.ch/circles/web/piechart.php?data_name=hlt-p2-timing&resource=time_thread&filter=${CMSSW_VERSION}&dataset=${UPLOAD_PATH}/Phase2Timing_resources" | ||
echo "HLT_P2_TIMING;SUCCESS,HLT Phase 2 timing Test,See Chart,${CHART_URL}" >> ${RESULTS_DIR}/hlt-p2-timing.txt | ||
echo "\n* **HLT P2 Timing**: [chart](${CHART_URL})" > ${RESULTS_DIR}/15-hlt-p2-timing-report.res | ||
|
||
mv $WORKSPACE/rundir/Phase2Timing*.json $WORKSPACE/json_upload | ||
send_jenkins_artifacts $WORKSPACE/json_upload hlt-p2-timing/${UPLOAD_PATH} | ||
mark_commit_status_all_prs 'hlt-p2-timing' 'success' -u "${BUILD_URL}" -d "HLT Phase2 timing data collected" | ||
else | ||
echo "HLT_P2_TIMING;ERROR,HLT Phase 2 timing Test,See Logs,hlt-p2-timing.log" >> ${RESULTS_DIR}/hlt-p2-timing.txt | ||
echo "HLTP2Timing" > ${RESULTS_DIR}/15-hlt-p2-timing-failed.res | ||
mark_commit_status_all_prs 'hlt-p2-timing' 'error' -u "${BUILD_URL}" -d "HLT Phase2 timing script failed" | ||
fi | ||
rm -rf $WORKSPACE/json_upload $WORKSPACE/rundir | ||
prepare_upload_results |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters