diff --git a/tests/integration-tests/combine-test-results.sh b/tests/integration-tests/combine-test-results.sh index fcab1b94e..014be1238 100755 --- a/tests/integration-tests/combine-test-results.sh +++ b/tests/integration-tests/combine-test-results.sh @@ -34,13 +34,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 '[ . | { "file": ".github/workflow/integration_tests.yml", "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 '[ .[] +FAILURES=$(find . -maxdepth 1 -name '*.json' ! -name '_summary*.json' | xargs -I '{}' jq '[ .[] | select(((.status == "skip") and (.message | contains("TODO") | not)) or .status == "fail" or .status == "error")