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

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

Issue 23717023: Android: Add chrome-specific dynamic linker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update content_tests.gypi Created 7 years, 2 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/gyp/gcc_preprocess.py ('k') | build/android/pylib/linker/test_case.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Setup for linker tests.""" 5 """Setup for linker tests."""
6 6
7 import os 7 import os
8 import sys 8 import sys
9 import types 9 import types
10 10
11 import test_case 11 import test_case
12 import test_runner 12 import test_runner
13 13
14 from pylib import constants 14 from pylib import constants
15 15
16 sys.path.insert(0, 16 sys.path.insert(0,
17 os.path.join(constants.DIR_SOURCE_ROOT, 'build', 'util', 'lib', 17 os.path.join(constants.DIR_SOURCE_ROOT, 'build', 'util', 'lib',
18 'common')) 18 'common'))
19 import unittest_util 19 import unittest_util
20 20
21 def Setup(options, devices): 21 def Setup(options, devices):
22 """Creates a list of test cases and a runner factory. 22 """Creates a list of test cases and a runner factory.
23 23
24 Returns: 24 Returns:
25 A tuple of (TestRunnerFactory, tests). 25 A tuple of (TestRunnerFactory, tests).
26 """ 26 """
27 test_cases = [ 27 test_cases = [
28 test_case.LinkerLibraryAddressTest, 28 test_case.LinkerLibraryAddressTest,
29 test_case.LinkerSharedRelroTest, 29 test_case.LinkerSharedRelroTest,
30 test_case.LinkerRandomizationTest ] 30 test_case.LinkerRandomizationTest,
31 test_case.LinkerLowMemoryThresholdTest ]
31 32
32 low_memory_modes = [False, True] 33 low_memory_modes = [False, True]
33 all_tests = [t(is_low_memory=m) for t in test_cases for m in low_memory_modes] 34 all_tests = [t(is_low_memory=m) for t in test_cases for m in low_memory_modes]
34 35
35 if options.test_filter: 36 if options.test_filter:
36 all_test_names = [ test.qualified_name for test in all_tests ] 37 all_test_names = [ test.qualified_name for test in all_tests ]
37 filtered_test_names = unittest_util.FilterTestNames(all_test_names, 38 filtered_test_names = unittest_util.FilterTestNames(all_test_names,
38 options.test_filter) 39 options.test_filter)
39 all_tests = [t for t in all_tests \ 40 all_tests = [t for t in all_tests \
40 if t.qualified_name in filtered_test_names] 41 if t.qualified_name in filtered_test_names]
41 42
42 def TestRunnerFactory(device, shard_index): 43 def TestRunnerFactory(device, shard_index):
43 return test_runner.LinkerTestRunner( 44 return test_runner.LinkerTestRunner(
44 device, options.tool, options.push_deps, 45 device, options.tool, options.push_deps,
45 options.cleanup_test_files) 46 options.cleanup_test_files)
46 47
47 return (TestRunnerFactory, all_tests) 48 return (TestRunnerFactory, all_tests)
OLDNEW
« no previous file with comments | « build/android/gyp/gcc_preprocess.py ('k') | build/android/pylib/linker/test_case.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698