Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion pr_testing/run-pr-hlt-p2-integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ 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}"
# Get the name of the output JSON files from the FastTimerService of the release under test
RES_PREFIX=$(python3 -c 'from HLTrigger.Configuration.HLT_75e33.services.FastTimerService_cfi import FastTimerService; print(FastTimerService.jsonFileName.value())' 2>/dev/null | sed 's|[.]json$||') || true
[ -n "${RES_PREFIX}" ] || RES_PREFIX="resources"
# Report test started
mark_commit_status_all_prs 'hlt-p2-integration' 'pending' -u "${BUILD_URL}" -d "Running"

Expand Down Expand Up @@ -36,7 +39,7 @@ touch ${RESULTS_DIR}/11-hlt-p2-integration-failed.res

if grep -iE 'Error|failure' "${INTEGRTESTS_LOG}"; then
HLT_P2_RES="ERROR"
elif [ ! -f $WORKSPACE/rundir/Phase2Timing_resources.json ] ; then
elif [ ! -f $WORKSPACE/rundir/${RES_PREFIX}.json ] ; then
HLT_P2_RES="ERROR"
fi
echo "HLT_P2_INTEGRATION;${HLT_P2_RES},HLT Phase 2 integration Test,See Logs,hlt-p2-integration.log" >> ${RESULTS_DIR}/hlt-p2-integration.txt
Expand Down
19 changes: 11 additions & 8 deletions pr_testing/run-pr-hlt-p2-timing.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ 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}"
# Get the name of the output JSON files from the FastTimerService of the release under test
RES_PREFIX=$(python3 -c 'from HLTrigger.Configuration.HLT_75e33.services.FastTimerService_cfi import FastTimerService; print(FastTimerService.jsonFileName.value())' 2>/dev/null | sed 's|[.]json$||') || true
[ -n "${RES_PREFIX}" ] || RES_PREFIX="resources"
# Report test started
mark_commit_status_all_prs 'hlt-p2-timing' 'pending' -u "${BUILD_URL}" -d "Running"

Expand Down Expand Up @@ -110,18 +113,18 @@ fi
touch ${RESULTS_DIR}/11-hlt-p2-timing-report.res ${RESULTS_DIR}/11-hlt-p2-timing-failed.res

required_files=(
"$WORKSPACE/rundir/Phase2Timing_resources.json"
"$WORKSPACE/rundir/${RES_PREFIX}.json"
)

if [ "$CMSSW_VERSION_NUMBER" -ge 1501 ]; then
required_files+=(
"$WORKSPACE/rundir/Phase2Timing_resources_NGT.json"
"$WORKSPACE/rundir/${RES_PREFIX}_NGT.json"
)
fi

if [ "$CMSSW_VERSION_NUMBER" -ge 1600 ]; then
required_files+=(
"$WORKSPACE/rundir/Phase2Timing_resources_OnCPU.json"
"$WORKSPACE/rundir/${RES_PREFIX}_OnCPU.json"
)
fi

Expand All @@ -134,15 +137,15 @@ for f in "${required_files[@]}"; do
done

if [ $missing -eq 0 ]; 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"
CHART_URL="https://cmssdt.cern.ch/circles/web/piechart.php?data_name=hlt-p2-timing&resource=time_thread&filter=${CMSSW_VERSION}&dataset=${UPLOAD_PATH}/${RES_PREFIX}"
echo "HLT_P2_TIMING;SUCCESS,HLT Phase 2 timing Test,See Chart,${CHART_URL}" >> ${RESULTS_DIR}/hlt-p2-timing.txt
echo "HLT_P2_TIMING_LOG;OK,HLT Phase 2 timing Test Log,See Logs,hlt-p2-timing.log" >> ${RESULTS_DIR}/hlt-p2-timing.txt
if [ "$CMSSW_VERSION_NUMBER" -ge 1700 ]; then
echo "HLT_P2_TIMING_CSV;OK,HLT Phase 2 hardware usage,See summary,hlt-p2-timing" >> ${RESULTS_DIR}/hlt-p2-timing.txt
fi
echo -e "**HLT P2 Timing**: [chart](${CHART_URL})" > ${RESULTS_DIR}/11-hlt-p2-timing-report.res

mv $WORKSPACE/rundir/Phase2Timing*.json $WORKSPACE/json_upload
mv $WORKSPACE/rundir/${RES_PREFIX}*.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
Expand All @@ -158,9 +161,9 @@ BUILD_TIMESTAMP=$(date -u '+%Y-%m-%d %H:%M UTC')
HLT_STATUS="✓ ok"; HLT_STATUS_CLASS="ok"
HLT_ONCPU_STATUS="✓ ok"; HLT_ONCPU_STATUS_CLASS="ok"
NGT_STATUS="✓ ok"; NGT_STATUS_CLASS="ok"
[ ! -f "$WORKSPACE/json_upload/Phase2Timing_resources.json" ] && HLT_STATUS="✗ missing" && HLT_STATUS_CLASS="err"
[ ! -f "$WORKSPACE/json_upload/Phase2Timing_resources_OnCPU.json" ] && HLT_ONCPU_STATUS="✗ missing" && HLT_ONCPU_STATUS_CLASS="err"
[ ! -f "$WORKSPACE/json_upload/Phase2Timing_resources_NGT.json" ] && NGT_STATUS="✗ missing" && NGT_STATUS_CLASS="err"
[ ! -f "$WORKSPACE/json_upload/${RES_PREFIX}.json" ] && HLT_STATUS="✗ missing" && HLT_STATUS_CLASS="err"
[ ! -f "$WORKSPACE/json_upload/${RES_PREFIX}_OnCPU.json" ] && HLT_ONCPU_STATUS="✗ missing" && HLT_ONCPU_STATUS_CLASS="err"
[ ! -f "$WORKSPACE/json_upload/${RES_PREFIX}_NGT.json" ] && NGT_STATUS="✗ missing" && NGT_STATUS_CLASS="err"

# Build optional CSV section for CMSSW >= 17
CSV_SECTION=""
Expand Down
5 changes: 4 additions & 1 deletion run-ib-hlt-p2-timing
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@ if has_jenkins_artifacts hlt-p2-timing/$RELEASE_FORMAT/${ARCHITECTURE}/status.tx
echo "SKIPPED: Not running hlt-p2-timing as it is already run"
exit 0
fi
# Get the name of the output JSON files from the FastTimerService of the release under test
RES_PREFIX=$(python3 -c 'from HLTrigger.Configuration.HLT_75e33.services.FastTimerService_cfi import FastTimerService; print(FastTimerService.jsonFileName.value())' 2>/dev/null | sed 's|[.]json$||') || true
[ -n "${RES_PREFIX}" ] || RES_PREFIX="resources"
git cms-addpkg HLTrigger/Configuration
cd src/HLTrigger/Configuration/python/HLT_75e33/test
# Uncomment the following in case we have to use quick patch for patatrack-scripts
#echo "git clone https://github.com/cms-externals/patatrack-scripts --depth 1" >> $WORKSPACE/run.sh
RES="passed"
mkdir -p $WORKSPACE/upload
timeout $TIMEOUT ./runHLTTiming.sh > $WORKSPACE/upload/run.log 2>&1 || RES="failed"
mv Phase2Timing_resources*.json $WORKSPACE/upload || RES="failed"
mv ${RES_PREFIX}*.json $WORKSPACE/upload || RES="failed"
if [ "$CMSSW_VERSION_NUMBER" -ge 1700 ]; then
(
mv logs.Phase2_L1P2GT_HLT/cpu_memory.csv $WORKSPACE/upload/cpu_memory_ph2_hlt.csv &&
Expand Down
Loading