Reduce pytest prints (#117069)

* custom pytest-shard so I can control the verbosity (also index by 1 since it's confusing)
* normal runs (not keep-going) always rerun each failed test 9 times (3 per process, 3 processes).  Previously it would only run the entire test file 3 times, so if a test before you segfaulted, you only got 2 tries

Example of quieter log https://github.com/pytorch/pytorch/actions/runs/7481334046/job/20363147497
"items in shard" only gets printed once at the beginning, and the reruns just say how many got skipped.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/117069
Approved by: https://github.com/huydhn
This commit is contained in:
Catherine Lee
2024-01-23 18:39:30 +00:00
committed by PyTorch MergeBot
parent 5ec2d7959d
commit 364728b27b
7 changed files with 124 additions and 47 deletions

View File

@ -8,6 +8,8 @@ addopts =
--capture=sys
# don't suppress warnings, but don't shove them all to the end either
-p no:warnings
# Use custom pytest shard located in test/pytest_shard_custom.py instead
-p no:pytest-shard
# don't rewrite assertions (usually not a problem in CI due to differences in imports, see #95844)
--assert=plain
testpaths =