Skip to content

Commit

Permalink
Changes from review
Browse files Browse the repository at this point in the history
  • Loading branch information
iarspider committed Jan 29, 2025
1 parent dcdc887 commit 0e8b9ce
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 20 deletions.
7 changes: 4 additions & 3 deletions pr_testing/run-pr-unittests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ mark_commit_status_all_prs "unittests/${GPU_FLAVOR}" 'pending' -u "${BUILD_URL}"
echo '--------------------------------------'
mkdir -p $WORKSPACE/${GPU_FLAVOR}UnitTests
let UT_TIMEOUT=7200+${CMSSW_PKG_COUNT}*20
UTESTS_CMD="USER_UNIT_TESTS=cuda timeout ${UT_TIMEOUT} scram b -v -k -j ${NCPU} unittests "
gpu_t_lc=$(echo ${GPU_T} | tr '[A-Z]' '[a-z]')
UTESTS_CMD="USER_UNIT_TESTS=${gpu_t_lc} timeout ${UT_TIMEOUT} scram b -v -k -j ${NCPU} unittests "
echo "LD_LIBRARY_PATH: ${LD_LIBRARY_PATH}"
scram build echo_LD_LIBRARY_PATH || true
scram build -r echo_CXX || true
Expand All @@ -32,8 +33,8 @@ TEST_ERRORS=`grep -ai "had errors" $WORKSPACE/${GPU_FLAVOR}UnitTests/log.txt` ||
GENERAL_ERRORS=`grep -a "ALL_OK" $WORKSPACE/${GPU_FLAVOR}UnitTests/log.txt` || true

if [ "X$TEST_ERRORS" != "X" -o "X$GENERAL_ERRORS" = "X" ]; then
echo "Errors in the gpu unit tests"
echo 'GPU_UNIT_TEST_RESULTS;ERROR,GPU Unit Tests,See Log,${GPU_FLAVOR}UnitTests' >> ${RESULTS_DIR}/unittest${GPU_FLAVOR}.txt
echo "Errors in the ${GPU_FLAVOR} unit tests"
echo "${GPU_FLAVOR}_UNIT_TEST_RESULTS;ERROR,GPU Unit Tests,See Log,${GPU_FLAVOR}UnitTests" >> ${RESULTS_DIR}/unittest${GPU_FLAVOR}.txt
ALL_OK=false
UNIT_TESTS_OK=false
$CMS_BOT_DIR/report-pull-request-results PARSE_${GPU_FLAVOR}_UNIT_TESTS_FAIL -f $WORKSPACE/${GPU_FLAVOR}UnitTests/log.txt --report-file ${RESULTS_DIR}/14-unittest${GPU_FLAVOR}-report.res ${REPORT_OPTS}
Expand Down
37 changes: 20 additions & 17 deletions pr_testing/test_multiple_prs.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -ex
#!/bin/bash -ex
# This script will be called by Jenkins job 'ib-run-pr-tests'
# and
# 1) will merge multiple PRs for multiple repos
Expand Down Expand Up @@ -161,6 +161,7 @@ if [ $(echo "${CONFIG_LINE}" | grep "PROD_ARCH=1" | wc -l) -gt 0 ] ; then
fi
fi
fi
ALL_GPU_TYPES=("cuda" "rocm")

# ----------
# -- MAIN --
Expand Down Expand Up @@ -380,15 +381,14 @@ if $DO_COMPARISON ; then
echo "WORKFLOWS=-l ${WF_LIST}" >> run-baseline-${BUILD_ID}-02.${ex_type_lc}
echo "MATRIX_ARGS=${WF_ARGS}" >> run-baseline-${BUILD_ID}-02.${ex_type_lc}
if [ X"${ex_type_lc}" = X"gpu" ]; then
cp run-baseline-${BUILD_ID}-01.${ex_type_lc} run-baseline-${BUILD_ID}-01.cuda
mv run-baseline-${BUILD_ID}-01.${ex_type_lc} run-baseline-${BUILD_ID}-01.rocm
sed -i -e 's/TEST_FLAVOR=gpu/TEST_FLAVOR=cuda/g' run-baseline-${BUILD_ID}-01.cuda
sed -i -e 's/TEST_FLAVOR=gpu/TEST_FLAVOR=rocm/g' run-baseline-${BUILD_ID}-01.rocm

cp run-baseline-${BUILD_ID}-02.${ex_type_lc} run-baseline-${BUILD_ID}-02.cuda
mv run-baseline-${BUILD_ID}-02.${ex_type_lc} run-baseline-${BUILD_ID}-02.rocm
sed -i -e 's/TEST_FLAVOR=gpu/TEST_FLAVOR=cuda/g' run-baseline-${BUILD_ID}-02.cuda
sed -i -e 's/TEST_FLAVOR=gpu/TEST_FLAVOR=rocm/g' run-baseline-${BUILD_ID}-02.rocm
for GPU_T in ${ALL_GPU_TYPES[@]}; do
cp run-baseline-${BUILD_ID}-01.${ex_type_lc} run-baseline-${BUILD_ID}-01.${GPU_T}
sed -i -e "s/TEST_FLAVOR=gpu/TEST_FLAVOR=${GPU_T}/g" run-baseline-${BUILD_ID}-01.${GPU_T}

cp run-baseline-${BUILD_ID}-02.${ex_type_lc} run-baseline-${BUILD_ID}-02.${GPU_T}
sed -i -e "s/TEST_FLAVOR=gpu/TEST_FLAVOR=${GPU_T}/g" run-baseline-${BUILD_ID}-02.${GPU_T}
done
rm run-baseline-${BUILD_ID}-01.${ex_type_lc} run-baseline-${BUILD_ID}-02.${ex_type_lc}
fi
done
popd
Expand Down Expand Up @@ -1469,8 +1469,11 @@ if [ "X$DO_SHORT_MATRIX" = Xtrue ]; then
grep -v '^MATRIX_ARGS=' $WORKSPACE/run-relvals.prop > $WORKSPACE/run-relvals-${ex_type_lc}.prop
echo "MATRIX_ARGS=$(get_pr_relval_args $DO_COMPARISON _${ex_type})" >> $WORKSPACE/run-relvals-${ex_type_lc}.prop
if [ "${ex_type_lc}" = "gpu" ]; then
cp $WORKSPACE/run-relvals-${ex_type_lc}.prop $WORKSPACE/run-relvals-cuda.prop
mv $WORKSPACE/run-relvals-${ex_type_lc}.prop $WORKSPACE/run-relvals-rocm.prop
for GPU_T in ${ALL_GPU_TYPES[@]}; do
gpu_t_lc=$(echo ${GPU_T} | tr '[A-Z]' '[a-z]')
cp $WORKSPACE/run-relvals-${ex_type_lc}.prop $WORKSPACE/run-relvals-${gpu_t_lc}.prop
done
rm $WORKSPACE/run-relvals-${ex_type_lc}.prop
fi
done
if [ $(runTheMatrix.py --help | grep '^ *--maxSteps' | wc -l) -eq 0 ] ; then
Expand Down Expand Up @@ -1503,10 +1506,10 @@ if [ "X$DO_ADDON_TESTS" = Xtrue ]; then
fi

if [ "X$DO_GPU_TESTS" = Xtrue ]; then
cp $WORKSPACE/test-env.txt $WORKSPACE/run-unittests-cuda.prop
echo "GPU_FLAVOR=cuda" >> $WORKSPACE/run-unittests-cuda.prop
cp $WORKSPACE/test-env.txt $WORKSPACE/run-unittests-rocm.prop
echo "GPU_FLAVOR=rocm" >> $WORKSPACE/run-unittests-rocm.prop
for GPU_T in ${ALL_GPU_TYPES[@]}; do
gpu_t_lc=$(echo ${GPU_T} | tr '[A-Z]' '[a-z]')
cp $WORKSPACE/test-env.txt $WORKSPACE/run-unittests-${GPU_T}.prop
done
fi

if ${BUILD_EXTERNAL} ; then
Expand All @@ -1517,7 +1520,7 @@ fi

if [ "${DO_PROFILING}" = "true" ] ; then
PROFILING_WORKFLOWS=$($CMS_BOT_DIR/cmssw-pr-test-config _PROFILING | tr ',' ' ')
for wf in ${PROFILING_WORKFLOWS};do
for wf in ${PROFILING_WORKFLOWS}; do
cp $WORKSPACE/test-env.txt $WORKSPACE/run-profiling-$wf.prop
echo "PROFILING_WORKFLOWS=${wf}" >> $WORKSPACE/run-profiling-$wf.prop
done
Expand Down
2 changes: 2 additions & 0 deletions report-pull-request-results.py
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,8 @@ def complain_missing_param(param_name):
GITLOG_FILE_BASE_URL = "%s/git-recent-commits.json" % options.report_url
GIT_CMS_MERGE_TOPIC_BASE_URL = "%s/git-merge-result" % options.report_url

ACTION = ACTION.upper()

if ACTION == "GET_BASE_MESSAGE":
get_base_message()
elif ACTION == "PARSE_UNIT_TESTS_FAIL":
Expand Down

0 comments on commit 0e8b9ce

Please sign in to comment.