diff options
author | Caroline Tice <cmtice@google.com> | 2016-01-13 09:48:29 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-01-22 19:30:55 +0000 |
commit | 88272d479f2761cc1906fea564c73033f77a6270 (patch) | |
tree | 4da9c114d64522f59494a908cf9a85b09c994d32 /remote_kill_test.py | |
parent | 439f2b77c86987362f53bd4f6e39896aa6d77f66 (diff) | |
download | toolchain-utils-88272d479f2761cc1906fea564c73033f77a6270.tar.gz |
Fix cros lint errors.
Also move deprecated scripts to the 'deprecated' directory.
BUG=chromiumos:570464
TEST=tested scripts to make sure they still work.
Change-Id: I3442a86d898104591233a0849ea0bafb52ecf1f7
Reviewed-on: https://chrome-internal-review.googlesource.com/244221
Commit-Ready: Caroline Tice <cmtice@google.com>
Tested-by: Caroline Tice <cmtice@google.com>
Reviewed-by: Yunlian Jiang <yunlian@google.com>
Diffstat (limited to 'remote_kill_test.py')
-rwxr-xr-x | remote_kill_test.py | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/remote_kill_test.py b/remote_kill_test.py index 88aaf15d..71a66907 100755 --- a/remote_kill_test.py +++ b/remote_kill_test.py @@ -1,44 +1,45 @@ -#!/usr/bin/python +#!/usr/bin/python2 # # Copyright 2010 Google Inc. All Rights Reserved. """Script to wrap test_that script. Run this script and kill it. Then run ps -ef to see if sleep -is still running,. +is still running,. """ +from __future__ import print_function + __author__ = 'asharif@google.com (Ahmad Sharif)' -import optparse +import argparse import os -import re import sys -import subprocess -from utils import command_executer +from cros_utils import command_executer def Usage(parser, message): - print 'ERROR: ' + message + print('ERROR: %s' % message) parser.print_help() sys.exit(0) def Main(argv): - parser = optparse.OptionParser() - parser.add_option('-c', - '--chromeos_root', - dest='chromeos_root', - help='ChromeOS root checkout directory') - parser.add_option('-r', - '--remote', - dest='remote', - help='Remote chromeos device.') - options = parser.parse_args(argv)[0] + parser = argparse.ArgumentParser() + parser.add_argument('-c', + '--chromeos_root', + dest='chromeos_root', + help='ChromeOS root checkout directory') + parser.add_argument('-r', + '--remote', + dest='remote', + help='Remote chromeos device.') + + _ = parser.parse_args(argv) ce = command_executer.GetCommandExecuter() ce.RunCommand('ls; sleep 10000', machine=os.uname()[1]) return 0 if __name__ == '__main__': - Main(sys.argv) + Main(sys.argv[1:]) |