diff options
author | Caroline Tice <cmtice@google.com> | 2017-04-06 17:16:05 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-04-08 19:40:20 -0700 |
commit | f6ef4395fe1896ba68c80e52cb24763b0fcfe7f8 (patch) | |
tree | 7612123711db98f0746e56b66368d16b388192bd /test_gdb_dejagnu.py | |
parent | 8c18be1425c8a4ecfc059a7c637fc93f33edab1f (diff) | |
download | toolchain-utils-f6ef4395fe1896ba68c80e52cb24763b0fcfe7f8.tar.gz |
[toolchain-utils] Fix remaining lint errors in toolchain-utils.
In addition to fixing the lint errors, this also fixes the Python
formatting issues (ran tc_pyformat on nearly all the files).
BUG=chromium:570450
TEST=Ran all crosperf & bisect tool unit tests.
Ran afe_lock_machine.py (check machine status)
Ran full crosperf test (octane, speedometer, BootPerf) on alex.
Change-Id: Ic86f9192801ac67769f3de30f1c5f0d203ce0831
Reviewed-on: https://chromium-review.googlesource.com/471886
Commit-Ready: Caroline Tice <cmtice@chromium.org>
Tested-by: Caroline Tice <cmtice@chromium.org>
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
Diffstat (limited to 'test_gdb_dejagnu.py')
-rwxr-xr-x | test_gdb_dejagnu.py | 75 |
1 files changed, 41 insertions, 34 deletions
diff --git a/test_gdb_dejagnu.py b/test_gdb_dejagnu.py index 4f44527f..c2a4ba9a 100755 --- a/test_gdb_dejagnu.py +++ b/test_gdb_dejagnu.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2 +#!/usr/bin/env python2 """Script adapter used by automation client for testing dejagnu. This is not intended to be run on command line. @@ -28,8 +28,10 @@ class DejagnuAdapter(object): self._cmd_exec = command_executer.GetCommandExecuter() def SetupChromeOS(self): - cmd = [setup_chromeos.__file__, '--dir=' + self._chromeos_root, - '--minilayout', '--jobs=8'] + cmd = [ + setup_chromeos.__file__, '--dir=' + self._chromeos_root, '--minilayout', + '--jobs=8' + ] ret = setup_chromeos.Main(cmd) if ret: raise RuntimeError('Failed to checkout chromeos') @@ -41,16 +43,17 @@ class DejagnuAdapter(object): def SetupBoard(self): cmd = './setup_board --board=' + self._board - ret = self._cmd_exec.ChrootRunCommand(self._chromeos_root, - cmd, - terminated_timeout=4000) + ret = self._cmd_exec.ChrootRunCommand( + self._chromeos_root, cmd, terminated_timeout=4000) if ret: raise RuntimeError('Failed to setup board.') def CheckGDB(self): - args = [gdb_dejagnu.__file__, '--board=' + self._board, - '--chromeos_root=' + self._chromeos_root, - '--mount=' + self._gdb_dir, '--remote=' + self._remote] + args = [ + gdb_dejagnu.__file__, '--board=' + self._board, + '--chromeos_root=' + self._chromeos_root, '--mount=' + self._gdb_dir, + '--remote=' + self._remote + ] if self._cleanup: args.append('--cleanup=' + self._cleanup) return gdb_dejagnu.Main(args) @@ -98,8 +101,7 @@ def EmailResult(result): # email exception? Just log it on console. print('Sending email failed - {0}' 'Subject: {1}' - 'Text: {2}').format( - str(e), subject, email_text) + 'Text: {2}').format(str(e), subject, email_text) def ProcessArguments(argv): @@ -108,29 +110,34 @@ def ProcessArguments(argv): description=('This script is used by nightly client to test gdb. ' 'DO NOT run it unless you know what you are doing.'), usage='test_gdb_dejagnu.py options') - parser.add_argument('-b', - '--board', - dest='board', - help=('Required. Specify board type. For example ' - '\'lumpy\' and \'daisy\'')) - parser.add_argument('-r', - '--remote', - dest='remote', - help=('Required. Specify remote board address')) - parser.add_argument('-g', - '--gdb_dir', - dest='gdb_dir', - default='', - help=('Optional. Specify gdb checkout directory.')) - parser.add_argument('-c', - '--chromeos_root', - dest='chromeos_root', - default='chromeos.live', - help=('Optional. Specify chromeos checkout directory.')) - parser.add_argument('--cleanup', - dest='cleanup', - default=None, - help=('Optional. Do cleanup after the test.')) + parser.add_argument( + '-b', + '--board', + dest='board', + help=('Required. Specify board type. For example ' + '\'lumpy\' and \'daisy\'')) + parser.add_argument( + '-r', + '--remote', + dest='remote', + help=('Required. Specify remote board address')) + parser.add_argument( + '-g', + '--gdb_dir', + dest='gdb_dir', + default='', + help=('Optional. Specify gdb checkout directory.')) + parser.add_argument( + '-c', + '--chromeos_root', + dest='chromeos_root', + default='chromeos.live', + help=('Optional. Specify chromeos checkout directory.')) + parser.add_argument( + '--cleanup', + dest='cleanup', + default=None, + help=('Optional. Do cleanup after the test.')) options = parser.parse_args(argv) |