Add failure preservation and artifact upload for GTest XML results (#985) - #985
Closed
agampe wants to merge 1 commit into
Closed
Add failure preservation and artifact upload for GTest XML results (#985)#985agampe wants to merge 1 commit into
agampe wants to merge 1 commit into
Conversation
|
@agampe has exported this pull request. If you are a Meta employee, you can view the originating Diff in D102739348. |
…acebook#985) Summary: The Redex CI composite action already sets GTEST_OUTPUT=xml:/tmp/test-results/ to generate GTest XML reports, but the XML files were never uploaded and were lost when the runner exited. Additionally, if tests failed, subsequent steps would not run. This change adds three things to setup-build-and-test-w-make-impl/action.yml: 1. **Exit code capture**: The "Run tests" step now uses `set +e` and captures the exit code to `$GITHUB_OUTPUT` instead of failing immediately. This ensures subsequent steps (artifact upload) always run. Also clears stale XML files before running tests. 2. **Artifact upload**: A new `actions/upload-artifact@v4` step uploads /tmp/test-results/ with unique artifact names per matrix entry (using `inputs.job_name`). Uses `if-no-files-found: ignore` so 32-bit builds that skip tests are unaffected. 14-day retention. 3. **Failure gate**: A final step checks the captured exit code and runs `exit 1` if tests failed, preserving the red failure signal on the job after artifacts are safely uploaded. Differential Revision: D102739348
agampe
force-pushed
the
export-D102739348
branch
from
April 28, 2026 07:59
d93af34 to
73863bc
Compare
|
This pull request has been merged in a9f402f. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
The Redex CI composite action already sets GTEST_OUTPUT=xml:/tmp/test-results/ to generate GTest XML reports, but the XML files were never uploaded and were lost when the runner exited. Additionally, if tests failed, subsequent steps would not run.
This change adds three things to setup-build-and-test-w-make-impl/action.yml:
Exit code capture: The "Run tests" step now uses
set +eand captures the exit code to$GITHUB_OUTPUTinstead of failing immediately. This ensures subsequent steps (artifact upload) always run. Also clears stale XML files before running tests.Artifact upload: A new
actions/upload-artifact@v4step uploads /tmp/test-results/ with unique artifact names per matrix entry (usinginputs.job_name). Usesif-no-files-found: ignoreso 32-bit builds that skip tests are unaffected. 14-day retention.Failure gate: A final step checks the captured exit code and runs
exit 1if tests failed, preserving the red failure signal on the job after artifacts are safely uploaded.Differential Revision: D102739348