diff --git a/pr_testing/run-pr-comparisons b/pr_testing/run-pr-comparisons index 5817235707a..145b389e1aa 100755 --- a/pr_testing/run-pr-comparisons +++ b/pr_testing/run-pr-comparisons @@ -402,7 +402,12 @@ for WF in ${WORKFLOWS_TO_COMPARE//,/ }; do $CMS_BOT_DIR/comparisons/compare-maxmem.py $WORKSPACE/data/PR-${PR_NUM}/$WF_DIR/maxmem_profile_${WF_NUMBER}.txt $WORKSPACE/data/$COMPARISON_RELEASE/$WF_DIR/maxmem_profile_${WF_NUMBER}.txt > $OUTPUT_DIR/${WF_NUMBER}.txt 2> $OUTPUT_DIR/${WF_NUMBER}.err || true fi done -grep -q "exceeds threshold" $OUTPUT_DIR/*.err 2>/dev/null || echo "MAXMEM_COMPARISON${TEST_FLAVOR_STR};OK,max memory used ${UC_TEST_FLAVOR} comparison,See results,/SDT/jenkins-artifacts/${OUTPUT_DIR}/" >> ${RESULTS_FILE} +if grep "exceeds threshold" $OUTPUT_DIR/*.err 2>/dev/null then + echo "MAXMEM_COMPARISON${TEST_FLAVOR_STR};OK,max memory used ${UC_TEST_FLAVOR} comparison,See results,/SDT/jenkins-artifacts/${OUTPUT_DIR}/" >> ${RESULTS_FILE} +else + echo "MAXMEM_COMPARISON${TEST_FLAVOR_STR};OK,max memory used ${UC_TEST_FLAVOR} comparison,See results,/SDT/jenkins-artifacts/${OUTPUT_DIR}/" >> ${RESULTS_FILE} +fi + # ---------------------------------------------------------------------------- # Alternative Comparison # ---------------------------------------------------------------------------- diff --git a/run-ib-pr-matrix.sh b/run-ib-pr-matrix.sh index d9fd126d731..6fd24d05107 100755 --- a/run-ib-pr-matrix.sh +++ b/run-ib-pr-matrix.sh @@ -88,8 +88,10 @@ pushd "$WORKSPACE/matrix-results" memFile=maxmem_profile_$(echo $WF | cut -d_ -f1).txt pushd $WF for log in $(ls step*.log);do - echo ${log} | cut -d_ -f1 >> ${memFile} - grep "Memory Report: " $log | tail -5 >> ${memFile} + if grep -q "Memory Report: " $log 2>/dev/null; then + echo ${log} | cut -d_ -f1 >> ${memFile} + grep "Memory Report: " $log | tail -5 >> ${memFile} + fi done popd done