Package randoop.execution
Class RunCommand.Status
- java.lang.Object
-
- randoop.execution.RunCommand.Status
-
- Enclosing class:
- RunCommand
public static class RunCommand.Status extends Object
Represents the status of a process that has been executed. Captures the command, exit status, and lines written to standard output and error.
-
-
Field Summary
Fields Modifier and Type Field Description List<String>
command
The command executed.List<String>
errorOutputLines
The error output from running the command.int
exitStatus
The exit status of the command.List<String>
standardOutputLines
The output from running the command.boolean
timedOut
Whether the command process timed out.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
describeLines(String source, List<String> lines, StringBuilder sb)
Print to sb the lines, or say how many lines there were.String
toString()
-
-
-
Constructor Detail
-
Status
Status(List<String> command, int exitStatus, boolean timedOut, List<String> standardOutputLines, List<String> errorOutputLines)
Creates aRunCommand.Status
object for the command with captured exit status and output.The output from command execution is captured as a
List
of output lines. This avoids losing output from the command if the process is destroyed.- Parameters:
command
- the commandexitStatus
- the exit statustimedOut
- whether the process timed outstandardOutputLines
- the lines of process output to standard outputerrorOutputLines
- the lines of process output to standard error
-
-
Method Detail
-
describeLines
private void describeLines(String source, List<String> lines, StringBuilder sb)
Print to sb the lines, or say how many lines there were.- Parameters:
source
- the source of the lines, such as "stdout" or "stderr"lines
- the linessb
- where to print the represenation
-
-