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

Unified Diff: build/android/pylib/linker/setup.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/linker/linker_test_instance.py ('k') | build/android/pylib/linker/test_case.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/linker/setup.py
diff --git a/build/android/pylib/linker/setup.py b/build/android/pylib/linker/setup.py
deleted file mode 100644
index 3f380ead80d3a7d3a587e28d0c4dc98b755b384a..0000000000000000000000000000000000000000
--- a/build/android/pylib/linker/setup.py
+++ /dev/null
@@ -1,60 +0,0 @@
-# Copyright 2013 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.
-
-"""Setup for linker tests."""
-
-import logging
-
-from pylib.constants import host_paths
-from pylib.linker import test_case
-from pylib.linker import test_runner
-
-with host_paths.SysPath(host_paths.BUILD_COMMON_PATH):
- import unittest_util # pylint: disable=import-error
-
-# ModernLinker requires Android M (API level 23) or later.
-_VERSION_SDK_PROPERTY = 'ro.build.version.sdk'
-_MODERN_LINKER_MINIMUM_SDK_INT = 23
-
-def Setup(args, devices):
- """Creates a list of test cases and a runner factory.
-
- Args:
- args: an argparse.Namespace object.
- devices: an iterable of available devices.
- Returns:
- A tuple of (TestRunnerFactory, tests).
- """
- legacy_linker_tests = [
- test_case.LinkerSharedRelroTest(is_modern_linker=False,
- is_low_memory=False),
- test_case.LinkerSharedRelroTest(is_modern_linker=False,
- is_low_memory=True),
- ]
- modern_linker_tests = [
- test_case.LinkerSharedRelroTest(is_modern_linker=True),
- ]
-
- min_sdk_int = 1 << 31
- for device in devices:
- min_sdk_int = min(min_sdk_int, device.build_version_sdk)
-
- if min_sdk_int >= _MODERN_LINKER_MINIMUM_SDK_INT:
- all_tests = legacy_linker_tests + modern_linker_tests
- else:
- all_tests = legacy_linker_tests
- logging.warn('Not running LinkerModern tests (requires API %d, found %d)',
- _MODERN_LINKER_MINIMUM_SDK_INT, min_sdk_int)
-
- if args.test_filter:
- all_test_names = [test.qualified_name for test in all_tests]
- filtered_test_names = unittest_util.FilterTestNames(all_test_names,
- args.test_filter)
- all_tests = [t for t in all_tests \
- if t.qualified_name in filtered_test_names]
-
- def TestRunnerFactory(device, _shard_index):
- return test_runner.LinkerTestRunner(device, args.tool)
-
- return (TestRunnerFactory, all_tests)
« no previous file with comments | « build/android/pylib/linker/linker_test_instance.py ('k') | build/android/pylib/linker/test_case.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698