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

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

Issue 775863004: Revert "[Android] Switch b/a/test_runner.py from optparse to argparse." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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/junit/test_runner.py ('k') | build/android/test_runner.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
index ff21f10b758d77d43dcb83a5bf736d2f84fca230..ebfac87d06c201b2f17d8e1c96eba58da6a1c7ec 100644
--- a/build/android/pylib/linker/setup.py
+++ b/build/android/pylib/linker/setup.py
@@ -16,11 +16,9 @@ sys.path.insert(0,
'common'))
import unittest_util # pylint: disable=F0401
-def Setup(args, _devices):
+def Setup(options, _devices):
"""Creates a list of test cases and a runner factory.
- Args:
- args: an argparse.Namespace object.
Returns:
A tuple of (TestRunnerFactory, tests).
"""
@@ -32,15 +30,15 @@ def Setup(args, _devices):
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:
+ if options.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)
+ 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(
- device, args.tool, args.cleanup_test_files)
+ device, options.tool, options.cleanup_test_files)
return (TestRunnerFactory, all_tests)
« no previous file with comments | « build/android/pylib/junit/test_runner.py ('k') | build/android/test_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698