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

Side by Side Diff: mojo/devtools/common/devtoolslib/apptest_dart.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, 4 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 unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Apptest runner specific to the particular Dart apptest framework in 5 """Apptest runner specific to the particular Dart apptest framework in
6 /mojo/dart/apptests, built on top of the general apptest runner.""" 6 /mojo/dart/apptests, built on top of the general apptest runner."""
7 7
8 import logging 8 import logging
9 import re 9 import re
10 10
11 _logging = logging.getLogger() 11 _logging = logging.getLogger()
12 12
13 from devtoolslib.apptest import run_apptest 13 from devtoolslib.apptest import run_apptest
14 14
15 SUCCESS_PATTERN = re.compile('^.+ .+: All tests passed!', re.MULTILINE) 15 SUCCESS_PATTERN = re.compile('^.+ .+: All tests passed!', re.MULTILINE)
16 16
17
17 def _dart_apptest_output_test(output): 18 def _dart_apptest_output_test(output):
18 return SUCCESS_PATTERN.search(output) != None 19 return SUCCESS_PATTERN.search(output) is not None
19 20
20 21
21 # TODO(erg): Support android, launched services and fixture isolation. 22 # TODO(erg): Support android, launched services and fixture isolation.
22 def run_dart_apptest(shell, shell_args, apptest_url, apptest_args): 23 def run_dart_apptest(shell, shell_args, apptest_url, apptest_args, timeout):
23 """Runs a dart apptest. 24 """Runs a dart apptest.
24 25
25 Args: 26 Args:
26 shell_args: The arguments for mojo_shell. 27 shell_args: The arguments for mojo_shell.
27 apptest_url: Url of the apptest app to run. 28 apptest_url: Url of the apptest app to run.
28 apptest_args: Parameters to be passed to the apptest app. 29 apptest_args: Parameters to be passed to the apptest app.
29 30
30 Returns: 31 Returns:
31 True iff the test succeeded, False otherwise. 32 True iff the test succeeded, False otherwise.
32 """ 33 """
33 return run_apptest(shell, shell_args, apptest_url, apptest_args, 34 return run_apptest(shell, shell_args, apptest_url, apptest_args, timeout,
34 _dart_apptest_output_test) 35 _dart_apptest_output_test)
OLDNEW
« no previous file with comments | « mojo/devtools/common/devtoolslib/apptest.py ('k') | mojo/devtools/common/devtoolslib/apptest_gtest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698