diff --git a/Tests/IntegrationTests/combine-test-results.sh b/Tests/IntegrationTests/combine-test-results.sh index b1e770aa2..2662d2069 100755 --- a/Tests/IntegrationTests/combine-test-results.sh +++ b/Tests/IntegrationTests/combine-test-results.sh @@ -35,13 +35,25 @@ ERROR: \(.error // 0) SKIP: \(.skip // 0)" ' +# Print failed/error tests to stdout if any exist +FAILED_STDOUT=$(find . -maxdepth 1 -name '*.json' ! -name '_summary*.json' | xargs -I '{}' jq -r '[.[] + | select(.status == "fail" or .status == "error") + | " \(.id): \(.description)\n \(.message)"] + | .[]' '{}') + +if [ -n "${FAILED_STDOUT}" ]; then + echo "" + echo "Failed tests:" + echo "${FAILED_STDOUT}" +fi + # Have to use warning annotation level, notice isn't working anymore (but could be in future). SUMMARY=$(ls _summary*.json | xargs jq --arg wf "$WORKFLOW_FILE" '[ . | { "file": $wf, "line": 1, "message": ("PASS: \(.pass // 0)\nFAIL: \(.fail // 0)\nERROR: \(.error // 0)\nSKIP: \(.skip // 0)"), "annotation_level": "warning" } ]') -FAILURES=$(ls -I '_summary*.json' | xargs -I '{}' jq --arg wf "$WORKFLOW_FILE" '[ .[] +FAILURES=$(find . -maxdepth 1 -name '*.json' ! -name '_summary*.json' | xargs -I '{}' jq --arg wf "$WORKFLOW_FILE" '[ .[] | select(((.status == "skip") and (.message | contains("TODO") | not)) or .status == "fail" or .status == "error")