Skip to content

[CI] Write per-process test run reports as JSONL - #199837

Draft
georgehong wants to merge 2 commits into
gh/georgehong/6/basefrom
gh/georgehong/6/head
Draft

georgehong wants to merge 2 commits into
gh/georgehong/6/basefrom
gh/georgehong/6/head

Conversation

@georgehong

@georgehong georgehong commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

Adds a pytest plugin (torch/testing/_internal/test_report.py) that writes one
JSONL file per test process for the tests.* tables (pytorch/test-infra#8849):
a report line (run context, environment, flags), then one run line per test
execution, in test/test-run-reports//-.jsonl. A test whose
process crashed or timed out becomes a synthetic run, and an error in the
writer turns it off without changing any test's outcome.
--save-test-run-reports and --no-save-test-run-reports control it in
run_test.py and common_utils; it is on by default in CI, like --save-xml.
Format: tools/testing/hud/test_run_report.md.

Test Plan:

python test/test_testing.py -k TestReport -k TestJunitXml
python test/run_test.py -i test_type_info --save-test-run-reports
spin lint

python test/run_test.py -i test_function_schema --save-test-run-reports
jq . test/test-run-reports/test_function_schema/test_function_schema-<HASH>.jsonl


Authored with the help of an AI assistant (Claude).

[ghstack-poisoned]
@pytorch-bot

pytorch-bot Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/199837

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit c025687 with merge base 4f0d8e2 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot

pytorch-bot Bot commented Oct 5, 2026

Copy link
Copy Markdown

This PR needs a release notes: label

If your changes are user facing and intended to be a part of release notes, please use a label starting with release notes:.

If not, please add the topic: not user facing label.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "topic: not user facing"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

[ghstack-poisoned]
@georgehong
georgehong requested review from huydhn and jathu October 5, 2026 22:36
@georgehong georgehong added the ciflow/trunk Trigger trunk jobs on your pull request label Oct 5, 2026
georgehong added a commit that referenced this pull request Oct 6, 2026
Adds a pytest plugin (torch/testing/_internal/test_report.py) that writes one
JSONL file per test process for the tests.* tables (pytorch/test-infra#8849):
a report line (run context, environment, flags), then one run line per test
execution, in test/test-run-reports/<file>/<file>-<id>.jsonl. A test whose
process crashed or timed out becomes a synthetic run, and an error in the
writer turns it off without changing any test's outcome.
--save-test-run-reports and --no-save-test-run-reports control it in
run_test.py and common_utils; it is on by default in CI, like --save-xml.
Format: tools/testing/hud/test_run_report.md.

Test Plan:

```
python test/test_testing.py -k TestReport -k TestJunitXml
python test/run_test.py -i test_type_info --save-test-run-reports
spin lint
```

Authored with the help of an AI assistant (Claude).

ghstack-source-id: 320113b
Pull-Request: #199837
georgehong added a commit that referenced this pull request Oct 7, 2026
Adds a pytest plugin (torch/testing/_internal/test_report.py) that writes one
JSONL file per test process for the tests.* tables (pytorch/test-infra#8849):
a report line (run context, environment, flags), then one run line per test
execution, in test/test-run-reports/<file>/<file>-<id>.jsonl. A test whose
process crashed or timed out becomes a synthetic run, and an error in the
writer turns it off without changing any test's outcome.
--save-test-run-reports and --no-save-test-run-reports control it in
run_test.py and common_utils; it is on by default in CI, like --save-xml.
Format: tools/testing/hud/test_run_report.md.

Test Plan:

```
python test/test_testing.py -k TestReport -k TestJunitXml
python test/run_test.py -i test_type_info --save-test-run-reports
spin lint
```

Authored with the help of an AI assistant (Claude).

ghstack-source-id: 320113b
Pull-Request: #199837

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant