summaryrefslogtreecommitdiffstats
path: root/build/android
diff options
context:
space:
mode:
authorjbudorick@chromium.org <jbudorick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-12 09:43:50 +0000
committerjbudorick@chromium.org <jbudorick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-12 09:43:50 +0000
commit7e6969961c3121f8c6eff12bec3342c42b6a562d (patch)
treea023f351f73e15f48def8610d7163981c2dd58ee /build/android
parente4150e967804ae5f220fb45467a1cb0adcec8693 (diff)
downloadchromium_src-7e6969961c3121f8c6eff12bec3342c42b6a562d.zip
chromium_src-7e6969961c3121f8c6eff12bec3342c42b6a562d.tar.gz
chromium_src-7e6969961c3121f8c6eff12bec3342c42b6a562d.tar.bz2
[Android] Lint pylib/gtest.
BUG=168518 Review URL: https://codereview.chromium.org/137283007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@250668 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/android')
-rw-r--r--build/android/pylib/gtest/setup.py17
-rw-r--r--build/android/pylib/gtest/test_package.py8
-rw-r--r--build/android/pylib/gtest/test_package_apk.py5
-rw-r--r--build/android/pylib/gtest/test_package_exe.py6
4 files changed, 17 insertions, 19 deletions
diff --git a/build/android/pylib/gtest/setup.py b/build/android/pylib/gtest/setup.py
index 5d3c2c7..3f2340f 100644
--- a/build/android/pylib/gtest/setup.py
+++ b/build/android/pylib/gtest/setup.py
@@ -3,6 +3,7 @@
# found in the LICENSE file.
"""Generates test runner factory and tests for GTests."""
+# pylint: disable=W0212
import fnmatch
import glob
@@ -14,16 +15,14 @@ import sys
from pylib import android_commands
from pylib import cmd_helper
from pylib import constants
-from pylib import ports
-
-import test_package_apk
-import test_package_exe
-import test_runner
+from pylib.gtest import test_package_apk
+from pylib.gtest import test_package_exe
+from pylib.gtest import test_runner
sys.path.insert(0,
os.path.join(constants.DIR_SOURCE_ROOT, 'build', 'util', 'lib',
'common'))
-import unittest_util
+import unittest_util # pylint: disable=F0401
_ISOLATE_FILE_PATHS = {
@@ -63,8 +62,8 @@ _WEBRTC_ISOLATE_FILE_PATHS = {
}
# Append the WebRTC tests with the full path from Chromium's src/ root.
-for test, isolate_path in _WEBRTC_ISOLATE_FILE_PATHS.items():
- _ISOLATE_FILE_PATHS[test] = 'third_party/webrtc/%s' % isolate_path
+for webrtc_test, isolate_path in _WEBRTC_ISOLATE_FILE_PATHS.items():
+ _ISOLATE_FILE_PATHS[webrtc_test] = 'third_party/webrtc/%s' % isolate_path
# Used for filtering large data deps at a finer grain than what's allowed in
# isolate files since pushing deps to devices is expensive.
@@ -300,7 +299,7 @@ def Setup(test_options, devices):
_GenerateDepsDirUsingIsolate(test_options.suite_name)
# Constructs a new TestRunner with the current options.
- def TestRunnerFactory(device, shard_index):
+ def TestRunnerFactory(device, _shard_index):
return test_runner.TestRunner(
test_options,
device,
diff --git a/build/android/pylib/gtest/test_package.py b/build/android/pylib/gtest/test_package.py
index ce07f4f..f82d029 100644
--- a/build/android/pylib/gtest/test_package.py
+++ b/build/android/pylib/gtest/test_package.py
@@ -3,8 +3,7 @@
# found in the LICENSE file.
"""Base class representing GTest test packages."""
-
-import logging
+# pylint: disable=R0201
class TestPackage(object):
@@ -43,7 +42,7 @@ class TestPackage(object):
"""
raise NotImplementedError('Method must be overriden.')
- def GetGTestReturnCode(self, adb):
+ def GetGTestReturnCode(self, _adb):
return None
def SpawnTestProcess(self, adb):
@@ -65,7 +64,8 @@ class TestPackage(object):
"""
raise NotImplementedError('Method must be overriden.')
- def _ParseGTestListTests(self, raw_list):
+ @staticmethod
+ def _ParseGTestListTests(raw_list):
"""Parses a raw test list as provided by --gtest_list_tests.
Args:
diff --git a/build/android/pylib/gtest/test_package_apk.py b/build/android/pylib/gtest/test_package_apk.py
index 5aa473e..1d39e4d 100644
--- a/build/android/pylib/gtest/test_package_apk.py
+++ b/build/android/pylib/gtest/test_package_apk.py
@@ -3,6 +3,7 @@
# found in the LICENSE file.
"""Defines TestPackageApk to help run APK-based native tests."""
+# pylint: disable=W0212
import logging
import os
@@ -12,12 +13,10 @@ import tempfile
import time
from pylib import android_commands
-from pylib import cmd_helper
from pylib import constants
from pylib import pexpect
from pylib.android_commands import errors
-
-from test_package import TestPackage
+from pylib.gtest.test_package import TestPackage
class TestPackageApk(TestPackage):
diff --git a/build/android/pylib/gtest/test_package_exe.py b/build/android/pylib/gtest/test_package_exe.py
index d9d18d8..2fc1005 100644
--- a/build/android/pylib/gtest/test_package_exe.py
+++ b/build/android/pylib/gtest/test_package_exe.py
@@ -12,8 +12,7 @@ import tempfile
from pylib import cmd_helper
from pylib import constants
from pylib import pexpect
-
-from test_package import TestPackage
+from pylib.gtest.test_package import TestPackage
class TestPackageExecutable(TestPackage):
@@ -52,7 +51,8 @@ class TestPackageExecutable(TestPackage):
ret = 1
return ret
- def _AddNativeCoverageExports(self, adb):
+ @staticmethod
+ def _AddNativeCoverageExports(adb):
# export GCOV_PREFIX set the path for native coverage results
# export GCOV_PREFIX_STRIP indicates how many initial directory
# names to strip off the hardwired absolute paths.