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

Unified Diff: mojo/devtools/common/devtoolslib/apptest_gtest.py

Issue 1266623002: Impose max running time for apptests. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Indicate time unit when printing out the time out value. Created 5 years, 5 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 | « mojo/devtools/common/devtoolslib/apptest_dart.py ('k') | mojo/devtools/common/devtoolslib/linux_shell.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/devtools/common/devtoolslib/apptest_gtest.py
diff --git a/mojo/devtools/common/devtoolslib/apptest_gtest.py b/mojo/devtools/common/devtoolslib/apptest_gtest.py
index 5308f096fc587989c5076b22eb2896b7cca35d14..4515e896751484a8c85c2a4e7eead469bda33608 100644
--- a/mojo/devtools/common/devtoolslib/apptest_gtest.py
+++ b/mojo/devtools/common/devtoolslib/apptest_gtest.py
@@ -25,7 +25,8 @@ def _gtest_apptest_output_test(output):
return True
-def run_gtest_apptest(shell, shell_args, apptest_url, apptest_args, isolate):
+def run_gtest_apptest(shell, shell_args, apptest_url, apptest_args, timeout,
+ isolate):
"""Runs a gtest apptest.
Args:
@@ -41,7 +42,7 @@ def run_gtest_apptest(shell, shell_args, apptest_url, apptest_args, isolate):
"""
if not isolate:
- return run_apptest(shell, shell_args, apptest_url, apptest_args,
+ return run_apptest(shell, shell_args, apptest_url, apptest_args, timeout,
_gtest_apptest_output_test)
# List the apptest fixtures so they can be run independently for isolation.
@@ -54,7 +55,7 @@ def run_gtest_apptest(shell, shell_args, apptest_url, apptest_args, isolate):
for fixture in fixtures:
isolated_apptest_args = apptest_args + ["--gtest_filter=%s" % fixture]
success = run_apptest(shell, shell_args, apptest_url, isolated_apptest_args,
- _gtest_apptest_output_test)
+ timeout, _gtest_apptest_output_test)
if not success:
apptest_result = False
@@ -78,8 +79,8 @@ def get_fixtures(shell, shell_args, apptest):
arguments.append("--args-for=%s %s" % (apptest, "--gtest_list_tests"))
arguments.append(apptest)
- (exit_code, output) = shell.RunAndGetOutput(arguments)
- if exit_code:
+ (exit_code, output, did_time_out) = shell.RunAndGetOutput(arguments)
+ if exit_code or did_time_out:
command_line = "mojo_shell " + " ".join(["%r" % x for x in arguments])
print "Failed to get test fixtures: %r" % command_line
print 72 * '-'
« no previous file with comments | « mojo/devtools/common/devtoolslib/apptest_dart.py ('k') | mojo/devtools/common/devtoolslib/linux_shell.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698