Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Unified Diff: tools/testrunner/local/testsuite.py

Issue 2373043002: [test] Make test runner more rubust on startup. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testrunner/local/testsuite.py
diff --git a/tools/testrunner/local/testsuite.py b/tools/testrunner/local/testsuite.py
index 11d220742779f09650a1f140157679e86fedfa01..f7fa19b20a0b5ce18abe0cd934fbbe12145291b8 100644
--- a/tools/testrunner/local/testsuite.py
+++ b/tools/testrunner/local/testsuite.py
@@ -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 = commands.Execute(context.command_prefix +
- [shell, "--gtest_list_tests"] +
- context.extra_flags)
- if output.exit_code != 0:
+
+ 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:
+ 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():
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698