| Index: mojo/devtools/common/devtoolslib/shell.py
|
| diff --git a/mojo/devtools/common/devtoolslib/shell.py b/mojo/devtools/common/devtoolslib/shell.py
|
| index bb22ea41ca90917ed2a6054f78376a55bc6d6835..16f4669cd22b56f812cadd66dd8dd5ac7752bfd8 100644
|
| --- a/mojo/devtools/common/devtoolslib/shell.py
|
| +++ b/mojo/devtools/common/devtoolslib/shell.py
|
| @@ -44,16 +44,20 @@ class Shell(object):
|
| """
|
| raise NotImplementedError()
|
|
|
| - def RunAndGetOutput(self, arguments):
|
| + def RunAndGetOutput(self, arguments, timeout=None):
|
| """Runs the shell with given arguments until shell exits and returns the
|
| output.
|
|
|
| Args:
|
| arguments: list of arguments for the shell
|
| + timeout: maximum running time in seconds, after which the shell will be
|
| + terminated
|
|
|
| Returns:
|
| - A tuple of (return_code, output). |return_code| is the exit code returned
|
| - by the shell or None if the exit code cannot be retrieved. |output| is the
|
| - stdout mingled with the stderr produced by the shell.
|
| + A tuple of (return_code, output, did_time_out). |return_code| is the exit
|
| + code returned by the shell or None if the exit code cannot be retrieved.
|
| + |output| is the stdout mingled with the stderr produced by the shell.
|
| + |did_time_out| is True iff the shell was terminated because it exceeded
|
| + the |timeout| and False otherwise.
|
| """
|
| raise NotImplementedError()
|
|
|