Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 # Use of this source code is governed by a BSD-style license that can be | |
| 3 # found in the LICENSE file. | |
| 4 | |
| 5 from pylib.base import test_instance | |
| 6 from pylib.constants import host_paths | |
| 7 from pylib.linker import test_case | |
| 8 | |
| 9 with host_paths.SysPath(host_paths.BUILD_COMMON_PATH): | |
| 10 import unittest_util | |
| 11 | |
| 12 _MODERN_LINKER_MINIMUM_SDK_INT = 23 | |
| 13 | |
| 14 class LinkerTestInstance(test_instance.TestInstance): | |
| 15 | |
| 16 def __init__(self, args): | |
| 17 super(LinkerTestInstance, self).__init__() | |
| 18 self._test_apk = args.test_apk | |
| 19 self._test_filter = args.test_filter | |
| 20 | |
| 21 @property | |
| 22 def test_apk(self): | |
| 23 return self._test_apk | |
| 24 | |
| 25 @property | |
| 26 def test_filter(self): | |
| 27 return self._test_filter | |
| 28 | |
| 29 def GetTests(self, min_device_sdk): | |
| 30 tests = [ | |
| 31 test_case.LinkerSharedRelroTest(is_modern_linker=False, | |
| 32 is_low_memory=False), | |
| 33 test_case.LinkerSharedRelroTest(is_modern_linker=False, | |
| 34 is_low_memory=True) | |
| 35 ] | |
| 36 if min_device_sdk > _MODERN_LINKER_MINIMUM_SDK_INT: | |
|
mikecase (-- gone --)
2017/01/03 16:12:49
>= ?
jbudorick
2017/01/03 23:37:05
Good catch. Done.
| |
| 37 tests.append(test_case.LinkerSharedRelroTest(is_modern_linker=True)) | |
| 38 | |
| 39 if self._test_filter: | |
| 40 filtered_names = unittest_util.FilterTestNames( | |
| 41 (t.qualified_name for t in tests), self._test_filter) | |
| 42 tests = [ | |
| 43 t for t in tests | |
| 44 if t.qualified_name in filtered_names] | |
| 45 | |
| 46 return tests | |
| 47 | |
| 48 def SetUp(self): | |
| 49 pass | |
| 50 | |
| 51 def TearDown(self): | |
| 52 pass | |
| 53 | |
| 54 def TestType(self): | |
| 55 return 'linker' | |
| 56 | |
| OLD | NEW |