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

Unified Diff: trunk/src/build/android/pylib/browsertests/dispatch.py

Issue 18732002: Revert 210035 "Creates a new test running script test_runner.py" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 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 | « trunk/src/build/android/adb_install_apk.py ('k') | trunk/src/build/android/pylib/gtest/dispatch.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/build/android/pylib/browsertests/dispatch.py
===================================================================
--- trunk/src/build/android/pylib/browsertests/dispatch.py (revision 210250)
+++ trunk/src/build/android/pylib/browsertests/dispatch.py (working copy)
@@ -2,8 +2,6 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-"""Dispatches content_browsertests."""
-
import logging
import os
import sys
@@ -19,12 +17,10 @@
sys.path.insert(0,
os.path.join(constants.DIR_SOURCE_ROOT, 'build', 'util', 'lib'))
+
from common import unittest_util
-
def Dispatch(options):
- """Dispatches all content_browsertests."""
-
attached_devices = []
if options.test_device:
attached_devices = [options.test_device]
@@ -65,9 +61,9 @@
# Get tests and split them up based on the number of devices.
all_enabled = gtest_dispatch.GetAllEnabledTests(RunnerFactory,
attached_devices)
- if options.test_filter:
+ if options.gtest_filter:
all_tests = unittest_util.FilterTestNames(all_enabled,
- options.test_filter)
+ options.gtest_filter)
else:
all_tests = _FilterTests(all_enabled)
@@ -88,22 +84,17 @@
flakiness_server=options.flakiness_dashboard_server)
report_results.PrintAnnotation(test_results)
- return len(test_results.GetNotPass())
-
-
def _FilterTests(all_enabled_tests):
"""Filters out tests and fixtures starting with PRE_ and MANUAL_."""
return [t for t in all_enabled_tests if _ShouldRunOnBot(t)]
-
def _ShouldRunOnBot(test):
fixture, case = test.split('.', 1)
- if _StartsWith(fixture, case, 'PRE_'):
+ if _StartsWith(fixture, case, "PRE_"):
return False
- if _StartsWith(fixture, case, 'MANUAL_'):
+ if _StartsWith(fixture, case, "MANUAL_"):
return False
return True
-
def _StartsWith(a, b, prefix):
return a.startswith(prefix) or b.startswith(prefix)
« no previous file with comments | « trunk/src/build/android/adb_install_apk.py ('k') | trunk/src/build/android/pylib/gtest/dispatch.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698