Restart content shell before test retries when running all tests.
If we're retrying a test, then it's because we think it might be flaky and rerunning it might provide a different result. Restarting content shell prevents state from leaking from previous tests. This CL does not apply to '--gtest_repeat'. That will be modified to use this same restart mechanism in a future CL. This CL slightly changes the implementation of "batch-size". Previously, the implementation relied on the assumption that "batch-size" never changed and restarted content shell after completion of the test. This CL makes "batch-size" a variable. In order to handle the case where "batch-size" is reduced [e.g. from 5 to 1, when 2 tests have been run in the current batch], this CL moves the restart of content shell to occur before the test is run, rather than after. Bug: 889036 Change-Id: Ibe28474033ea1fb1e67b9c4b8320bdefe95331ad Reviewed-on: https://chromium-review.googlesource.com/c/1288974Reviewed-by:Dirk Pranke <dpranke@chromium.org> Reviewed-by:
Ned Nguyen <nednguyen@google.com> Commit-Queue: Erik Chen <erikchen@chromium.org> Cr-Commit-Position: refs/heads/master@{#601989}
Showing
Please register or sign in to comment