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

Unified Diff: build/android/pylib/host_driven/test_case.py

Issue 153743008: Revert of Enable presubmit pylint in build/android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merging with changes to pylib/linker/test_case.py. Created 6 years, 10 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 | « build/android/pylib/host_driven/setup.py ('k') | build/android/pylib/host_driven/test_info_collection.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/host_driven/test_case.py
diff --git a/build/android/pylib/host_driven/test_case.py b/build/android/pylib/host_driven/test_case.py
index e914b6717ae44eb064ad57c0429d33e2d5c0664d..8ff94083a395f7595357c96029838a39a99c74d9 100644
--- a/build/android/pylib/host_driven/test_case.py
+++ b/build/android/pylib/host_driven/test_case.py
@@ -25,6 +25,7 @@ import os
import time
from pylib import android_commands
+from pylib import constants
from pylib import forwarder
from pylib import valgrind_tools
from pylib.base import base_test_result
@@ -48,28 +49,21 @@ class HostDrivenTestCase(object):
test_name: The name of the method to run as the test.
instrumentation_options: An InstrumentationOptions object.
"""
+ self.test_name = test_name
class_name = self.__class__.__name__
- self.adb = None
- self.cleanup_test_files = False
- self.device_id = ''
- self.has_forwarded_ports = False
- self.instrumentation_options = instrumentation_options
- self.ports_to_forward = []
- self.push_deps = False
- self.shard_index = 0
-
+ self.qualified_name = '%s.%s' % (class_name, self.test_name)
# Use tagged_name when creating results, so that we can identify host-driven
# tests in the overall results.
- self.test_name = test_name
- self.qualified_name = '%s.%s' % (class_name, self.test_name)
self.tagged_name = '%s_%s' % (self._HOST_DRIVEN_TAG, self.qualified_name)
+ self.instrumentation_options = instrumentation_options
+ self.ports_to_forward = []
+ self.has_forwarded_ports = False
+
# TODO(bulach): make ports_to_forward not optional and move the Forwarder
# mapping here.
def SetUp(self, device, shard_index, push_deps,
- cleanup_test_files, ports_to_forward=None):
- if not ports_to_forward:
- ports_to_forward = []
+ cleanup_test_files, ports_to_forward=[]):
self.device_id = device
self.shard_index = shard_index
self.adb = android_commands.AndroidCommands(self.device_id)
@@ -81,13 +75,17 @@ class HostDrivenTestCase(object):
def TearDown(self):
pass
+ # TODO(craigdh): Remove GetOutDir once references have been removed
+ # downstream.
+ def GetOutDir(self):
+ return constants.GetOutDirectory()
+
def Run(self):
logging.info('Running host-driven test: %s', self.tagged_name)
# Get the test method on the derived class and execute it
return getattr(self, self.test_name)()
- @staticmethod
- def __GetHostForwarderLog():
+ def __GetHostForwarderLog(self):
return ('-- Begin Full HostForwarder log\n'
'%s\n'
'--End Full HostForwarder log\n' % forwarder.Forwarder.GetHostLog())
@@ -153,7 +151,7 @@ class HostDrivenTestCase(object):
start_ms = int(time.time()) * 1000
done = False
for test_filter in test_filters:
- tests = test_pkg.GetAllMatchingTests(None, None, test_filter)
+ tests = test_pkg._GetAllMatchingTests(None, None, test_filter)
# Filters should always result in >= 1 test.
if len(tests) == 0:
raise Exception('Java test filter "%s" returned no tests.'
« no previous file with comments | « build/android/pylib/host_driven/setup.py ('k') | build/android/pylib/host_driven/test_info_collection.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698