Package randoop.execution
Class RunCommand
- java.lang.Object
-
- randoop.execution.RunCommand
-
public class RunCommand extends Object
Class providing therun(List, Path, long)
method to run a command in a separate process with a timeout.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RunCommand.CommandException
Exception representing an error that occured while running a process withrun(List, Path, long)
.static class
RunCommand.Status
Represents the status of a process that has been executed.
-
Constructor Summary
Constructors Constructor Description RunCommand()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static RunCommand.Status
run(List<String> command, Path workingDirectory, long timeoutMillis)
Runs the given command synchronously in the given directory using the given timeout.
-
-
-
Method Detail
-
run
static RunCommand.Status run(List<String> command, Path workingDirectory, long timeoutMillis) throws RunCommand.CommandException
Runs the given command synchronously in the given directory using the given timeout. If the command completes normally, returns aRunCommand.Status
object capturing the command, exit status, and output from the process.- Parameters:
command
- the command to be run in the processworkingDirectory
- the working directory for the commandtimeoutMillis
- the timeout in milliseconds for executing the process- Returns:
- the
RunCommand.Status
capturing the outcome of executing the command - Throws:
RunCommand.CommandException
- if there is an error running the command
-
-