Mike Frysinger | c7f1593 | 2013-03-20 13:43:35 -0400 | [diff] [blame] | 1 | #!/usr/bin/python |
asharif | 3af6d11 | 2013-02-15 05:15:45 +0000 | [diff] [blame] | 2 | # |
| 3 | # Copyright 2010 Google Inc. All Rights Reserved. |
| 4 | |
cmtice | d96e457 | 2015-05-19 16:19:25 -0700 | [diff] [blame] | 5 | """Script to wrap test_that script. |
asharif | 3af6d11 | 2013-02-15 05:15:45 +0000 | [diff] [blame] | 6 | |
| 7 | Run this script and kill it. Then run ps -ef to see if sleep |
| 8 | is still running,. |
| 9 | """ |
| 10 | |
| 11 | __author__ = "asharif@google.com (Ahmad Sharif)" |
| 12 | |
| 13 | import optparse |
| 14 | import os |
| 15 | import re |
| 16 | import sys |
| 17 | import subprocess |
kbaclawski | 20082a0 | 2013-02-16 02:12:57 +0000 | [diff] [blame] | 18 | |
asharif | 3af6d11 | 2013-02-15 05:15:45 +0000 | [diff] [blame] | 19 | from utils import command_executer |
asharif | 3af6d11 | 2013-02-15 05:15:45 +0000 | [diff] [blame] | 20 | |
| 21 | |
| 22 | def Usage(parser, message): |
| 23 | print "ERROR: " + message |
| 24 | parser.print_help() |
| 25 | sys.exit(0) |
| 26 | |
| 27 | def Main(argv): |
| 28 | parser = optparse.OptionParser() |
| 29 | parser.add_option("-c", "--chromeos_root", dest="chromeos_root", |
| 30 | help="ChromeOS root checkout directory") |
| 31 | parser.add_option("-r", "--remote", dest="remote", |
| 32 | help="Remote chromeos device.") |
| 33 | options = parser.parse_args(argv)[0] |
| 34 | ce = command_executer.GetCommandExecuter() |
raymes | 85ef5db | 2013-02-15 05:20:49 +0000 | [diff] [blame] | 35 | ce.RunCommand("ls; sleep 10000", |
asharif | 3af6d11 | 2013-02-15 05:15:45 +0000 | [diff] [blame] | 36 | machine=os.uname()[1]) |
| 37 | return 0 |
| 38 | |
| 39 | |
| 40 | if __name__ == "__main__": |
| 41 | Main(sys.argv) |