pants
pants copied to clipboard
Enroll more backends into retries for failed tests
Is your feature request related to a problem? Please describe. We now have machinery to retry failed tests. Each backend need to opt into this feature.
Describe the solution you'd like It is done by wrapping their test processes in a ProcessWithRetries:
results = await Get(
ProcessResultWithRetries,
ProcessWithRetries(setup.process, test_subsystem.attempts_default),
)
and then using the last result if needed
last_result = results.last
...
coverage_snapshot = await Get(
Snapshot, DigestSubset(last_result.output_digest, PathGlobs([".coverage"]))
)
Relevant backends
Potentially relevant files (searching for -> TestResult
and filtering out some irrelevant ones):
- [ ] src/python/pants/backend/helm/test/unittest.py
- [ ] src/python/pants/backend/javascript/goals/test.py
- [ ] src/python/pants/backend/scala/test/scalatest.py
- [ ] src/python/pants/backend/shell/goals/test.py
- [ ] src/python/pants/backend/shell/shunit2_test_runner.py
- [ ] src/python/pants/backend/go/goals/test.py
- [ ] src/python/pants/jvm/test/testutil.py
- [ ] src/python/pants/jvm/test/junit.py
I've done a search for -> TestResult
and put in what seem like the relevant files for updating. Please feel free to fix that up.