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

Unified Diff: build/android/pylib/base/test_dispatcher.py

Issue 1315743004: [Android] Add a custom pylintrc for build/android/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix appurify_sanitized import-errors Created 5 years, 3 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/provision_devices.py ('k') | build/android/pylib/base/test_dispatcher_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/base/test_dispatcher.py
diff --git a/build/android/pylib/base/test_dispatcher.py b/build/android/pylib/base/test_dispatcher.py
index b10fdec0ae37923ac44d8d9ff60da0b3cd12ef07..797f55c4c3885932215730d826f474f2279fab6f 100644
--- a/build/android/pylib/base/test_dispatcher.py
+++ b/build/android/pylib/base/test_dispatcher.py
@@ -171,7 +171,7 @@ def _RunAllTests(runners, test_collection_factory, num_retries, timeout=None,
Returns:
A tuple of (TestRunResults object, exit code)
"""
- logging.warning('Running tests with %s test runners.' % (len(runners)))
+ logging.warning('Running tests with %s test runners.', len(runners))
results = []
exit_code = 0
run_results = base_test_result.TestRunResults()
@@ -198,7 +198,7 @@ def _RunAllTests(runners, test_collection_factory, num_retries, timeout=None,
logging.exception('Device became unreachable.')
if not all((len(tc) == 0 for tc in test_collections)):
- logging.error('Only ran %d tests (all devices are likely offline).' %
+ logging.error('Only ran %d tests (all devices are likely offline).',
len(results))
for tc in test_collections:
run_results.AddResults(base_test_result.BaseTestResult(
@@ -226,7 +226,7 @@ def _CreateRunners(runner_factory, devices, timeout=None):
Returns:
A list of TestRunner objects.
"""
- logging.warning('Creating %s test runners.' % len(devices))
+ logging.warning('Creating %s test runners.', len(devices))
runners = []
counter = _ThreadSafeCounter()
threads = reraiser_thread.ReraiserThreadGroup(
@@ -331,5 +331,5 @@ def RunTests(tests, runner_factory, devices, shard=True,
_TearDownRunners(runners, setup_timeout)
except device_errors.DeviceUnreachableError as e:
logging.warning('Device unresponsive during TearDown: [%s]', e)
- except Exception as e:
- logging.error('Unexpected exception caught during TearDown: %s' % str(e))
+ except Exception: # pylint: disable=broad-except
+ logging.exception('Unexpected exception caught during TearDown')
« no previous file with comments | « build/android/provision_devices.py ('k') | build/android/pylib/base/test_dispatcher_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698