Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

Commit

Permalink
Fix parsing results for PR message
Browse files Browse the repository at this point in the history
  • Loading branch information
kornys committed Jun 24, 2020
1 parent 73bde77 commit 67d58d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion systemtests/scripts/build_pr_response.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ fi

SUMMARY="**TEST_PROFILE**: ${TEST_PROFILE}\n**TEST_CASE:** ${TEST_CASE}\n**TOTAL:** ${TEST_COUNT}\n**PASS:** $((TEST_COUNT - TEST_ALL_FAILED_COUNT - TEST_SKIPPED_COUNT))\n**FAIL:** ${TEST_ALL_FAILED_COUNT}\n**SKIP:** ${TEST_SKIPPED_COUNT}\n**BUILD_NUMBER:** ${BUILD_ID}\n**BUILD_ENV:** ${BUILD_ENV}\n"

FAILED_TESTS=$(find "${RESULTS_PATH}" -name 'TEST*.xml' -type f -print0 | xargs -0 sed -n "s#\(<testcase.*time=\"[0-9]*,\{0,1\}[0-9]\{1,3\}\..*[^\/]>\)#\1#p" | awk -F '"' '{print "\\n- " $2 " in " $4}')
FAILED_TESTS=$(find "${RESULTS_PATH}" -name 'TEST*.xml' -type f -print0 | xargs -0 awk '/<testcase.*>/{ getline x; if (x ~ "<error" || x ~ "<failure") { gsub(/classname=|name=|\"/, "", $0); print "\\n- " $2 " in " $3 }}')
echo "${FAILED_TESTS}"
echo "Creating body ..."

Expand Down

0 comments on commit 67d58d1

Please sign in to comment.