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

Side by Side Diff: mojo/devtools/common/devtoolslib/apptest_dart.py

Issue 1128153002: Rename the devtools library: pylib -> devtoolslib. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Address offline comments/ devtools_lib -> devtoolslib. Created 5 years, 7 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 9
10 _logging = logging.getLogger() 10 _logging = logging.getLogger()
11 11
12 from pylib.apptest import run_apptest 12 from devtoolslib.apptest import run_apptest
13 13
14 14
15 def _dart_apptest_output_test(output): 15 def _dart_apptest_output_test(output):
16 # Fail on output with dart unittests' "FAIL:"/"ERROR:" or a lack of "PASS:". 16 # Fail on output with dart unittests' "FAIL:"/"ERROR:" or a lack of "PASS:".
17 # The latter condition ensures failure on broken command lines or output. 17 # The latter condition ensures failure on broken command lines or output.
18 # Check output instead of exit codes because mojo_shell always exits with 0. 18 # Check output instead of exit codes because mojo_shell always exits with 0.
19 if (not output or 19 if (not output or
20 '\nFAIL: ' in output or 20 '\nFAIL: ' in output or
21 '\nERROR: ' in output or 21 '\nERROR: ' in output or
22 '\nPASS: ' not in output): 22 '\nPASS: ' not in output):
23 return False 23 return False
24 return True 24 return True
25 25
26 26
27 # TODO(erg): Support android, launched services and fixture isolation. 27 # TODO(erg): Support android, launched services and fixture isolation.
28 def run_dart_apptest(shell, shell_args, apptest_url, apptest_args): 28 def run_dart_apptest(shell, shell_args, apptest_url, apptest_args):
29 """Runs a dart apptest. 29 """Runs a dart apptest.
30 30
31 Args: 31 Args:
32 shell_args: The arguments for mojo_shell. 32 shell_args: The arguments for mojo_shell.
33 apptest_url: Url of the apptest app to run. 33 apptest_url: Url of the apptest app to run.
34 apptest_args: Parameters to be passed to the apptest app. 34 apptest_args: Parameters to be passed to the apptest app.
35 35
36 Returns: 36 Returns:
37 True iff the test succeeded, False otherwise. 37 True iff the test succeeded, False otherwise.
38 """ 38 """
39 return run_apptest(shell, shell_args, apptest_url, apptest_args, 39 return run_apptest(shell, shell_args, apptest_url, apptest_args,
40 _dart_apptest_output_test) 40 _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