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

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

Issue 26251003: android: Add 4 new linker tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/android/pylib/linker/test_case.py » ('j') | build/android/pylib/linker/test_case.py » ('J')
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
index 029be05e13cdbcf43792800c7aa68c072bd03aba..5d30cbc29c8ed844ea6d2f0e42c2feff0abf12e5 100644
--- a/build/android/pylib/linker/setup.py
+++ b/build/android/pylib/linker/setup.py
@@ -12,6 +12,12 @@ import types
import test_case
import test_runner
+from pylib import constants
+
+sys.path.insert(0,
+ os.path.join(constants.DIR_SOURCE_ROOT, 'build', 'util', 'lib',
+ 'common'))
+import unittest_util
def Setup(options, devices):
"""Creates a list of test cases and a runner factory.
@@ -19,12 +25,20 @@ def Setup(options, devices):
Returns:
A tuple of (TestRunnerFactory, tests).
"""
-
all_tests = [
- test_case.LinkerTestCase('ForRegularDevice',
- is_low_memory=False),
- test_case.LinkerTestCase('ForLowMemoryDevice',
- is_low_memory=True) ]
+ test_case.LinkerLibraryAddressTest(is_low_memory=False),
+ test_case.LinkerLibraryAddressTest(is_low_memory=True),
+ test_case.LinkerSharedRelroTest(is_low_memory=False),
+ test_case.LinkerSharedRelroTest(is_low_memory=True),
+ test_case.LinkerRandomizationTest(is_low_memory=False),
bulach 2013/10/07 16:49:44 probably less readable, but: test_cases = [ test
digit1 2013/10/07 20:31:58 I see, good idea, but I think I've found something
+ test_case.LinkerRandomizationTest(is_low_memory=True)]
+
+ if options.test_filter:
+ all_test_names = [ test.qualified_name for test in all_tests ]
+ filtered_test_names = unittest_util.FilterTestNames(all_test_names,
+ options.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(
« no previous file with comments | « no previous file | build/android/pylib/linker/test_case.py » ('j') | build/android/pylib/linker/test_case.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698