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

Unified Diff: mojo/tools/mopy/dart_apptest.py

Issue 1144673003: Fix and cleanup Mojo and Mandoline python scripts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update comments. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/tools/mopy/config.py ('k') | mojo/tools/mopy/gn.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/tools/mopy/dart_apptest.py
diff --git a/mojo/tools/mopy/dart_apptest.py b/mojo/tools/mopy/dart_apptest.py
deleted file mode 100644
index 5e12b17417f376e050de51fb6c0f4969ba8b9e48..0000000000000000000000000000000000000000
--- a/mojo/tools/mopy/dart_apptest.py
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import logging
-
-_logging = logging.getLogger()
-
-from mopy import test_util
-from mopy.print_process_error import print_process_error
-
-
-# TODO(erg): Support android, launched services and fixture isolation.
-def run_test(config, shell, apptest_dict, shell_args, apps_and_args=None):
- """Runs a command line and checks the output for signs of gtest failure.
-
- Args:
- config: The mopy.config.Config object for the build.
- shell_args: The arguments for mojo_shell.
- apps_and_args: A Dict keyed by application URL associated to the
- application's specific arguments.
- """
- apps_and_args = apps_and_args or {}
- output = test_util.try_run_test(config, shell, shell_args, apps_and_args)
- # Fail on output with dart unittests' "FAIL:"/"ERROR:" or a lack of "PASS:".
- # The latter condition ensures failure on broken command lines or output.
- # Check output instead of exit codes because mojo_shell always exits with 0.
- if (not output or
- '\nFAIL: ' in output or
- '\nERROR: ' in output or
- '\nPASS: ' not in output):
- print "Failed test:"
- print_process_error(
- test_util.build_command_line(config, shell_args, apps_and_args),
- output)
- return "Failed test(s) in %r" % apptest_dict
- _logging.debug("Succeeded with output:\n%s" % output)
- return "Succeeded"
« no previous file with comments | « mojo/tools/mopy/config.py ('k') | mojo/tools/mopy/gn.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698