1 #!/usr/bin/python2 2 # 3 # Copyright 2010 Google Inc. All Rights Reserved. 4 """Timeout test for command_executer.""" 5 6 from __future__ import print_function 7 8 __author__ = 'asharif (at] google.com (Ahmad Sharif)' 9 10 import argparse 11 import sys 12 13 from cros_utils import command_executer 14 15 16 def Usage(parser, message): 17 print('ERROR: %s' % message) 18 parser.print_help() 19 sys.exit(0) 20 21 22 def Main(argv): 23 parser = argparse.ArgumentParser() 24 _ = parser.parse_args(argv) 25 26 command = 'sleep 1000' 27 ce = command_executer.GetCommandExecuter() 28 ce.RunCommand(command, command_timeout=1) 29 return 0 30 31 32 if __name__ == '__main__': 33 Main(sys.argv[1:]) 34