Skip to content

[torchci] Report C++ tests and the slow and inductor workflows - #201020

Draft
georgehong wants to merge 1 commit into
mainfrom
torchci-cpp-wider-gate
Draft

georgehong wants to merge 1 commit into
mainfrom
torchci-cpp-wider-gate

Conversation

@georgehong

Copy link
Copy Markdown
Contributor

Report C++ gtest results to the new test tables, keyed as cpp/<binary>, with suite and test names from gtest's JSON test list. Also write reports by default in the slow and inductor workflows, raising coverage from 87% to about 97% of tests.all_test_runs rows. This combines PR 200980 with the wider gate. xpu is left for a follow-up, since its reports never reach S3.

**Summary:**
C++ tests run as `pytest <binary>` under pytest-cpp, not through run_tests, so run_test.py registers the report plugin for them. Each gtest is recorded as file `cpp/<binary>`, the name run_test.py and junit already use, with language `cpp` and the suite and test name from gtest's JSON test list (`--gtest_list_tests --gtest_output=json`), which keeps them as separate fields; a full name can't always be split on its `.`, since a custom typed-name generator can put one in the suite. The plugin lists each binary once per process itself, which costs about as much as running one of its tests, rather than setting GTEST_OUTPUT around pytest-cpp's own listing. Only pytest-cpp's Google Test items are recorded. The declared name drops a value-parameterized test's `/<param>`. As in junit, a gtest whose process crashed is `failed` with pytest-cpp's message. A test's source file isn't recorded, so owners for `cpp/<binary>` are left to a follow-up.

Under xdist, `-x` stops right after the final failing report, before the teardown report where the writer writes the run. Runs whose failure is already known are now written at session end; without that, the attempt that stops a C++ run is missing from its report. An xdist worker that dies isn't recorded: pytest-rerunfailures sends a test's reports only after each attempt, so the controller never has the identity of the test the worker was running. junit and the log still have it.

Reports are now also written by default in the slow and inductor workflows. On 2026-10-13, trunk and pull had 87.1% of tests.all_test_runs rows (re-ingested copies removed); slow brings that to 94.6% and inductor to 96.7%. Both use the same test workflows as trunk, and upload-test-stats already copies their GitHub-only reports (ROCm's) to S3. 99% of slow's rows are skipped tests, mostly fast tests that PYTORCH_TEST_SKIP_FAST skips, but its slow tests run nowhere else. xpu stays off: its jobs upload to GitHub only and upload-test-stats doesn't run for it, so its reports would never reach S3. The other 3.3% is rows without a job id (1.1%) and 27 smaller workflows, led by the rocm-* workflows (1.3%) and periodic (0.6%).

**Test Plan:**
```
python test/torchci/test_testing.py
CPP_TESTS_DIR=<dir with a gtest binary> python test/run_test.py --cpp -i cpp/<binary> --save-torchci-reports <dir>
```
`test_xdist_maxfail` fails without the session-end flush.

Authored with the help of an AI assistant (Claude).
@pytorch-bot

pytorch-bot Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

✅ No Failures

As of commit 069f051 with merge base 2b0c4f5 (image):
💚 Looks good so far! There are no failures yet. 💚

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

@georgehong georgehong added ciflow/trunk Trigger trunk jobs on your pull request ciflow/slow ciflow/inductor topic: not user facing topic category ci-no-td Do not run TD on this PR keep-going Don't stop on first failure, keep running tests until the end labels Oct 15, 2026
pytorchmergebot pushed a commit that referenced this pull request Oct 15, 2026
…trict workflows (#201097)

**Summary:**
Continue rollout. This should be passing based on #201020 already, with the exception of `periodic-strict`, so `ci-no-td` shouldn't be necessary here.

Authored with the help of an AI assistant (Claude).
Pull Request resolved: #201097
Approved by: https://github.com/jathu, https://github.com/huydhn
ghstack dependencies: #200980

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

ci-no-td Do not run TD on this PR ciflow/inductor ciflow/slow ciflow/trunk Trigger trunk jobs on your pull request keep-going Don't stop on first failure, keep running tests until the end topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant