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

Unified Diff: build/android/pylib/linker/setup.py

Issue 2101243005: Add a snapshot of flutter/engine/src/build to our sdk (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: add README.dart Created 4 years, 6 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/__init__.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
new file mode 100644
index 0000000000000000000000000000000000000000..5776f5af33555bcab98cc9150fc3b6e5e02770e6
--- /dev/null
+++ b/build/android/pylib/linker/setup.py
@@ -0,0 +1,45 @@
+# 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 os
+import sys
+
+from pylib import constants
+from pylib.linker import test_case
+from pylib.linker import test_runner
+
+sys.path.insert(0,
+ os.path.join(constants.DIR_SOURCE_ROOT, 'build', 'util', 'lib',
+ 'common'))
+import unittest_util # pylint: disable=F0401
+
+def Setup(args, _devices):
+ """Creates a list of test cases and a runner factory.
+
+ Args:
+ args: an argparse.Namespace object.
+ Returns:
+ A tuple of (TestRunnerFactory, tests).
+ """
+ test_cases = [
+ test_case.LinkerLibraryAddressTest,
+ test_case.LinkerSharedRelroTest,
+ test_case.LinkerRandomizationTest]
+
+ low_memory_modes = [False, True]
+ all_tests = [t(is_low_memory=m) for t in test_cases for m in low_memory_modes]
+
+ 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/__init__.py ('k') | build/android/pylib/linker/test_case.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698