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

Side by Side Diff: mojo/devtools/common/pylib/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
« no previous file with comments | « mojo/devtools/common/pylib/apptest.py ('k') | mojo/devtools/common/pylib/apptest_gtest.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 # found in the LICENSE file.
4
5 """Apptest runner specific to the particular Dart apptest framework in
6 /mojo/dart/apptests, built on top of the general apptest runner."""
7
8 import logging
9
10 _logging = logging.getLogger()
11
12 from pylib.apptest import run_apptest
13
14
15 def _dart_apptest_output_test(output):
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.
18 # Check output instead of exit codes because mojo_shell always exits with 0.
19 if (not output or
20 '\nFAIL: ' in output or
21 '\nERROR: ' in output or
22 '\nPASS: ' not in output):
23 return False
24 return True
25
26
27 # TODO(erg): Support android, launched services and fixture isolation.
28 def run_dart_apptest(shell, shell_args, apptest_url, apptest_args):
29 """Runs a dart apptest.
30
31 Args:
32 shell_args: The arguments for mojo_shell.
33 apptest_url: Url of the apptest app to run.
34 apptest_args: Parameters to be passed to the apptest app.
35
36 Returns:
37 True iff the test succeeded, False otherwise.
38 """
39 return run_apptest(shell, shell_args, apptest_url, apptest_args,
40 _dart_apptest_output_test)
OLDNEW
« no previous file with comments | « mojo/devtools/common/pylib/apptest.py ('k') | mojo/devtools/common/pylib/apptest_gtest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698