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

Unified Diff: build/android/pylib/base_test_sharder.py

Issue 11269036: Support HTTP test-server based net unit tests on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Clang build + sync Created 8 years, 1 month 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
Index: build/android/pylib/base_test_sharder.py
diff --git a/build/android/pylib/base_test_sharder.py b/build/android/pylib/base_test_sharder.py
index b8d03c8300dd170c6a9b46b17c1af16504feacf5..fa05abec4e202b77d422fd2a29bcd5f20dfe996d 100644
--- a/build/android/pylib/base_test_sharder.py
+++ b/build/android/pylib/base_test_sharder.py
@@ -8,6 +8,7 @@ import logging
import multiprocessing
from android_commands import errors
+from forwarder import Forwarder
from test_result import TestResults
@@ -24,6 +25,7 @@ def _ShardedTestRunnable(test):
except SystemExit:
return TestResults()
+
def SetTestsContainer(tests_container):
"""Sets tests container.
@@ -42,12 +44,13 @@ class BaseTestSharder(object):
# See more in SetTestsContainer.
tests_container = None
- def __init__(self, attached_devices):
+ def __init__(self, attached_devices, build_type='Debug'):
self.attached_devices = attached_devices
# Worst case scenario: a device will drop offline per run, so we need
# to retry until we're out of devices.
self.retries = len(self.attached_devices)
self.tests = []
+ self.build_type = build_type
def CreateShardedTestRunner(self, device, index):
"""Factory function to create a suite-specific test runner.
@@ -63,11 +66,11 @@ class BaseTestSharder(object):
def SetupSharding(self, tests):
"""Called before starting the shards."""
- pass
+ Forwarder.KillHost(self.build_type)
def OnTestsCompleted(self, test_runners, test_results):
"""Notifies that we completed the tests."""
- pass
+ Forwarder.KillHost(self.build_type)
def RunShardedTests(self):
"""Runs the tests in all connected devices.

Powered by Google App Engine
This is Rietveld 408576698