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

Unified Diff: mojo/devtools/common/mojo_test

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/shell.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/devtools/common/mojo_test
diff --git a/mojo/devtools/common/mojo_test b/mojo/devtools/common/mojo_test
index c824f10b1ae6a5fa5c84002a3498b784aa99b51c..d59baccde2dd648ba021e779dc4c3672219d11b4 100755
--- a/mojo/devtools/common/mojo_test
+++ b/mojo/devtools/common/mojo_test
@@ -36,6 +36,8 @@ variable, containing entries of the following form:
"test-args": ["--an_arg", "another_arg"],
# Optional shell arguments.
"shell-args": ["--some-flag-for-the-shell", "--another-flag"],
+ # Optional timeout in seconds, 60 by default.
+ "timeout": 120,
}
|test_list_file| may reference the |target_os| global that will be any of
@@ -77,6 +79,7 @@ def main():
test_type = test_dict.get("type", "gtest")
test_args = test_dict.get("test-args", [])
shell_args = test_dict.get("shell-args", []) + common_shell_args
+ timeout = test_dict.get("timeout", 60)
_logger.info("Will start: %s" % test_name)
print "Running %s...." % test_name,
@@ -84,13 +87,15 @@ def main():
if test_type == "dart":
apptest_result = apptest_dart.run_dart_apptest(shell, shell_args, test,
- test_args)
+ test_args, timeout)
elif test_type == "gtest":
apptest_result = apptest_gtest.run_gtest_apptest(shell, shell_args, test,
- test_args, False)
+ test_args, timeout,
+ False)
elif test_type == "gtest_isolated":
apptest_result = apptest_gtest.run_gtest_apptest(shell, shell_args, test,
- test_args, True)
+ test_args, timeout,
+ True)
else:
apptest_result = False
print "Unrecognized test type in %r" % test_dict
« no previous file with comments | « mojo/devtools/common/devtoolslib/shell.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698