1#!/usr/bin/env python2 2# 3# Copyright 2010 Google Inc. All Rights Reserved. 4"""Timeout test for command_executer.""" 5 6from __future__ import print_function 7 8__author__ = 'asharif@google.com (Ahmad Sharif)' 9 10import argparse 11import sys 12 13from cros_utils import command_executer 14 15 16def Usage(parser, message): 17 print('ERROR: %s' % message) 18 parser.print_help() 19 sys.exit(0) 20 21 22def 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 32if __name__ == '__main__': 33 Main(sys.argv[1:]) 34