1#!/usr/bin/env python3 2# -*- coding: utf-8 -*- 3# 4# Copyright 2020 The ChromiumOS Authors 5# Use of this source code is governed by a BSD-style license that can be 6# found in the LICENSE file. 7 8"""Timeout test for command_executer.""" 9 10 11__author__ = "asharif@google.com (Ahmad Sharif)" 12 13import argparse 14import sys 15 16from cros_utils import command_executer 17 18 19def Usage(parser, message): 20 print("ERROR: %s" % message) 21 parser.print_help() 22 sys.exit(0) 23 24 25def Main(argv): 26 parser = argparse.ArgumentParser() 27 _ = parser.parse_args(argv) 28 29 command = "sleep 1000" 30 ce = command_executer.GetCommandExecuter() 31 ce.RunCommand(command, command_timeout=1) 32 return 0 33 34 35if __name__ == "__main__": 36 Main(sys.argv[1:]) 37