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

Unified 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, 12 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/pylib/base/test_run_factory.py ('k') | build/android/pylib/linker/setup.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/linker/linker_test_instance.py
diff --git a/build/android/pylib/linker/linker_test_instance.py b/build/android/pylib/linker/linker_test_instance.py
new file mode 100644
index 0000000000000000000000000000000000000000..ce696f25d215dc410f59de94f304f612942fff26
--- /dev/null
+++ b/build/android/pylib/linker/linker_test_instance.py
@@ -0,0 +1,56 @@
+# Copyright 2016 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+from pylib.base import test_instance
+from pylib.constants import host_paths
+from pylib.linker import test_case
+
+with host_paths.SysPath(host_paths.BUILD_COMMON_PATH):
+ import unittest_util
+
+_MODERN_LINKER_MINIMUM_SDK_INT = 23
+
+class LinkerTestInstance(test_instance.TestInstance):
+
+ def __init__(self, args):
+ super(LinkerTestInstance, self).__init__()
+ self._test_apk = args.test_apk
+ self._test_filter = args.test_filter
+
+ @property
+ def test_apk(self):
+ return self._test_apk
+
+ @property
+ def test_filter(self):
+ return self._test_filter
+
+ def GetTests(self, min_device_sdk):
+ tests = [
+ test_case.LinkerSharedRelroTest(is_modern_linker=False,
+ is_low_memory=False),
+ test_case.LinkerSharedRelroTest(is_modern_linker=False,
+ is_low_memory=True)
+ ]
+ if min_device_sdk >= _MODERN_LINKER_MINIMUM_SDK_INT:
+ tests.append(test_case.LinkerSharedRelroTest(is_modern_linker=True))
+
+ if self._test_filter:
+ filtered_names = unittest_util.FilterTestNames(
+ (t.qualified_name for t in tests), self._test_filter)
+ tests = [
+ t for t in tests
+ if t.qualified_name in filtered_names]
+
+ return tests
+
+ def SetUp(self):
+ pass
+
+ def TearDown(self):
+ pass
+
+ def TestType(self):
+ return 'linker'
+
« 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