Skip to content

Conversation

juj
Copy link
Collaborator

@juj juj commented Oct 16, 2025

The way this differs from the existing EMTEST_RETRY_FLAKY is that this retries any failed test, whereas EMTEST_RETRY_FLAKY only retries those tests that had explicitly been deemed to be flaky beforehand.

The rationale for adding this feature is twofold:

  1. There is currently so much flakiness in tests in the current test suites, that I would be flagging flaky tests for many months to come in my own CI. It is unclear if some of that flakiness is a harness problem or a systemic problem rather than an individual test problem, so I could end up flagging a majority of all tests in the suites as flaky.

  2. Whenever a test fails in my CI, the very first thing I need to check is whether the failure was just a one-off, or whether the failure was a deterministic failure. So being able to run with EMTEST_RETRY_COUNT=5 will automate such testing for me and immediately give me feedback whether any test failure was deterministic or intermittent.

@sbc100 sbc100 changed the title Add new env. var. EMTEST_RETRY_COUNT to enable forcing retrying failed tests Add EMTEST_RETRY_COUNT to force retrying failed tests Oct 16, 2025
retries_left = test_retry_count

num_fails = len(result.failures)
num_errors = len(result.errors)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these part of the non-parallel test runner too?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, these are part of the default unittest.py unittest.TestCase implementation. Had to add them to the parallel test runner to match the shape of the upstream Python implementation. Verified that this works in single-threaded and parallel test runner.

@juj juj enabled auto-merge (squash) October 16, 2025 14:45
@juj juj merged commit c862f75 into emscripten-core:main Oct 16, 2025
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants