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

Unified Diff: build/android/test_runner.py

Issue 201853007: [Android] Linting the rest of build/android/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 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/symbolize_test.py ('k') | build/android/tombstones.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/test_runner.py
diff --git a/build/android/test_runner.py b/build/android/test_runner.py
index 335f1662aa110ee93765cca00ba27d6c0632a13f..45df772c2f40b198e514c4f8c303d1ffaaf42b9c 100755
--- a/build/android/test_runner.py
+++ b/build/android/test_runner.py
@@ -14,7 +14,6 @@ import shutil
import signal
import sys
import threading
-import traceback
from pylib import android_commands
from pylib import constants
@@ -187,7 +186,7 @@ def AddJavaTestOptions(option_parser):
'chromium build directory.'))
-def ProcessJavaTestOptions(options, error_func):
+def ProcessJavaTestOptions(options):
"""Processes options/arguments and populates |options| with defaults."""
if options.annotation_str:
@@ -246,7 +245,7 @@ def ProcessInstrumentationOptions(options, error_func):
instrumentation tests.
"""
- ProcessJavaTestOptions(options, error_func)
+ ProcessJavaTestOptions(options)
if options.java_only and options.python_only:
error_func('Options java_only (-j) and python_only (-p) '
@@ -324,7 +323,7 @@ def ProcessUIAutomatorOptions(options, error_func):
uiautomator tests.
"""
- ProcessJavaTestOptions(options, error_func)
+ ProcessJavaTestOptions(options)
if not options.package:
error_func('--package is required.')
@@ -490,7 +489,7 @@ def ProcessPerfTestOptions(options, args, error_func):
single_step)
-def _RunGTests(options, error_func, devices):
+def _RunGTests(options, devices):
"""Subcommand of RunTestsCommands which runs gtests."""
ProcessGTestOptions(options)
@@ -528,7 +527,7 @@ def _RunGTests(options, error_func, devices):
return exit_code
-def _RunLinkerTests(options, error_func, devices):
+def _RunLinkerTests(options, devices):
"""Subcommand of RunTestsCommands which runs linker tests."""
runner_factory, tests = linker_setup.Setup(options, devices)
@@ -716,9 +715,9 @@ def RunTestsCommand(command, options, args, option_parser):
raise Exception('Failed to reset test server port.')
if command == 'gtest':
- return _RunGTests(options, option_parser.error, devices)
+ return _RunGTests(options, devices)
elif command == 'linker':
- return _RunLinkerTests(options, option_parser.error, devices)
+ return _RunLinkerTests(options, devices)
elif command == 'instrumentation':
return _RunInstrumentationTests(options, option_parser.error, devices)
elif command == 'uiautomator':
@@ -731,13 +730,13 @@ def RunTestsCommand(command, options, args, option_parser):
raise Exception('Unknown test type.')
-def HelpCommand(command, options, args, option_parser):
+def HelpCommand(command, _options, args, option_parser):
"""Display help for a certain command, or overall help.
Args:
command: String indicating the command that was received to trigger
this function.
- options: optparse options dictionary.
+ options: optparse options dictionary. unused.
args: List of extra args from optparse.
option_parser: optparse.OptionParser object.
@@ -793,12 +792,12 @@ VALID_COMMANDS = {
}
-def DumpThreadStacks(signal, frame):
+def DumpThreadStacks(_signal, _frame):
for thread in threading.enumerate():
reraiser_thread.LogThreadStack(thread)
-def main(argv):
+def main():
signal.signal(signal.SIGUSR1, DumpThreadStacks)
option_parser = command_option_parser.CommandOptionParser(
commands_dict=VALID_COMMANDS)
@@ -806,4 +805,4 @@ def main(argv):
if __name__ == '__main__':
- sys.exit(main(sys.argv))
+ sys.exit(main())
« no previous file with comments | « build/android/symbolize_test.py ('k') | build/android/tombstones.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698