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

Side by Side Diff: build/android/pylib/linker/linker_test_instance.py

Issue 2605793002: [android] Convert linker tests to platform mode. (Closed)
Patch Set: mikecase comment Created 3 years, 11 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
« no previous file with comments | « build/android/pylib/base/test_run_factory.py ('k') | build/android/pylib/linker/setup.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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:
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
OLDNEW
« no previous file with comments | « build/android/pylib/base/test_run_factory.py ('k') | build/android/pylib/linker/setup.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698