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

Side by Side Diff: build/android/pylib/instrumentation/test_jar.py

Issue 812543002: Update from https://crrev.com/308331 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 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 """Helper class for instrumenation test jar.""" 5 """Helper class for instrumenation test jar."""
6 # pylint: disable=W0702 6 # pylint: disable=W0702
7 7
8 import logging 8 import logging
9 import os 9 import os
10 import pickle 10 import pickle
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 # Filters 'class.test' names and populates |tests| with the corresponding 208 # Filters 'class.test' names and populates |tests| with the corresponding
209 # 'package.path.class#test' names. 209 # 'package.path.class#test' names.
210 tests = [ 210 tests = [
211 sanitized_test_names[t] for t in unittest_util.FilterTestNames( 211 sanitized_test_names[t] for t in unittest_util.FilterTestNames(
212 sanitized_test_names.keys(), test_filter.replace('#', '.'))] 212 sanitized_test_names.keys(), test_filter.replace('#', '.'))]
213 else: 213 else:
214 tests = available_tests 214 tests = available_tests
215 215
216 # Filter out any tests with SDK level requirements that don't match the set 216 # Filter out any tests with SDK level requirements that don't match the set
217 # of attached devices. 217 # of attached devices.
218 sdk_versions = [ 218 devices = device_utils.DeviceUtils.parallel()
219 int(v) for v in 219 min_sdk_version = min(devices.build_version_sdk.pGet(None))
220 device_utils.DeviceUtils.parallel().GetProp(
221 'ro.build.version.sdk').pGet(None)]
222 tests = [t for t in tests 220 tests = [t for t in tests
223 if self._IsTestValidForSdkRange(t, min(sdk_versions))] 221 if self._IsTestValidForSdkRange(t, min_sdk_version)]
224 222
225 return tests 223 return tests
226 224
227 @staticmethod 225 @staticmethod
228 def IsHostDrivenTest(test): 226 def IsHostDrivenTest(test):
229 return 'pythonDrivenTests' in test 227 return 'pythonDrivenTests' in test
OLDNEW
« no previous file with comments | « build/android/pylib/gtest/gtest_test_instance.py ('k') | build/android/pylib/instrumentation/test_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698