Commit 4f02ff7e authored by machenbach's avatar machenbach Committed by Commit bot

[test] Make test runner more rubust on startup.

The test driver fails once in a while with no output when
listing the tests on windows, causing the testing to not
even start.

This should make that less likely if there's a flaky crash
when listing the tests.

BUG=v8:5438

Review-Url: https://codereview.chromium.org/2373043002
Cr-Commit-Position: refs/heads/master@{#39779}
parent 42ece474
......@@ -325,13 +325,22 @@ class GoogleTestSuite(TestSuite):
shell = os.path.abspath(os.path.join(context.shell_dir, self.shell()))
if utils.IsWindows():
shell += ".exe"
output = None
for i in xrange(3): # Try 3 times in case of errors.
output = commands.Execute(context.command_prefix +
[shell, "--gtest_list_tests"] +
context.extra_flags)
if output.exit_code != 0:
if output.exit_code == 0:
break
print "Test executable failed to list the tests (try %d).\n\nStdout:" % i
print output.stdout
print "\nStderr:"
print output.stderr
print "\nExit code: %d" % output.exit_code
else:
raise Exception("Test executable failed to list the tests.")
tests = []
test_case = ''
for line in output.stdout.splitlines():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment