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

Side by Side Diff: build/android/pylib/gtest/setup.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 unified diff | Download patch
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Generates test runner factory and tests for GTests.""" 5 """Generates test runner factory and tests for GTests."""
6 # pylint: disable=W0212 6 # pylint: disable=W0212
7 7
8 import logging 8 import logging
9 import os 9 import os
10 import sys 10 import sys
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 class TestListerRunner(test_runner.TestRunner): 98 class TestListerRunner(test_runner.TestRunner):
99 def RunTest(self, _test): 99 def RunTest(self, _test):
100 result = TestListResult() 100 result = TestListResult()
101 self.test_package.Install(self.device) 101 self.test_package.Install(self.device)
102 result.test_list = self.test_package.GetAllTests(self.device) 102 result.test_list = self.test_package.GetAllTests(self.device)
103 results = base_test_result.TestRunResults() 103 results = base_test_result.TestRunResults()
104 results.AddResult(result) 104 results.AddResult(result)
105 return results, None 105 return results, None
106 return TestListerRunner(test_options, device, test_package) 106 return TestListerRunner(test_options, device, test_package)
107 107
108 results, _no_retry = test_dispatcher.RunTests( 108 results, _ = test_dispatcher.RunTests(
109 ['gtest_list_tests'], TestListerRunnerFactory, devices) 109 ['gtest_list_tests'], TestListerRunnerFactory, devices)
110 tests = [] 110 tests = []
111 for r in results.GetAll(): 111 for r in results.GetAll():
112 tests.extend(r.test_list) 112 tests.extend(r.test_list)
113 return tests 113 return tests
114 114
115 115
116 def _FilterTestsUsingPrefixes(all_tests, pre=False, manual=False): 116 def _FilterTestsUsingPrefixes(all_tests, pre=False, manual=False):
117 """Removes tests with disabled prefixes. 117 """Removes tests with disabled prefixes.
118 118
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 if test_options.gtest_filter: 220 if test_options.gtest_filter:
221 tests = unittest_util.FilterTestNames(tests, test_options.gtest_filter) 221 tests = unittest_util.FilterTestNames(tests, test_options.gtest_filter)
222 222
223 # Coalesce unit tests into a single test per device 223 # Coalesce unit tests into a single test per device
224 if test_options.suite_name not in gtest_test_instance.BROWSER_TEST_SUITES: 224 if test_options.suite_name not in gtest_test_instance.BROWSER_TEST_SUITES:
225 num_devices = len(devices) 225 num_devices = len(devices)
226 tests = [':'.join(tests[i::num_devices]) for i in xrange(num_devices)] 226 tests = [':'.join(tests[i::num_devices]) for i in xrange(num_devices)]
227 tests = [t for t in tests if t] 227 tests = [t for t in tests if t]
228 228
229 return (TestRunnerFactory, tests) 229 return (TestRunnerFactory, tests)
OLDNEW
« no previous file with comments | « build/android/pylib/gtest/local_device_gtest_run.py ('k') | build/android/pylib/gtest/test_package.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698