Package edu.odu.cs.zeil.codegrader
Interface TCProcess
-
- All Known Implementing Classes:
ExternalProcess,InternalTestLauncher
public interface TCProcessLaunches external commands.
-
-
Field Summary
Fields Modifier and Type Field Description static booleanIS_WINDOWS
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancrashed()Did the prior execution exit with a non-zero status code?voidexecute()Runs the external command.voidexecute(boolean quiet)Runs the external command.java.lang.StringgetErr()Return the captured error stream.booleangetOnTime()java.lang.StringgetOutput()Return the captured output.intgetStatusCode()intgetTime()Time in seconds of execution.booleantimedOut()Did the prior execution go too long?
-
-
-
Method Detail
-
execute
void execute(boolean quiet)
Runs the external command. Standard out and standard err are captured and available as getOutput() and getErr(). The status code is also available.- Parameters:
quiet- do not log failures to run program
-
execute
void execute()
Runs the external command. Equivalent to execute(false);
-
getOutput
java.lang.String getOutput()
Return the captured output.- Returns:
- captured std out
-
getErr
java.lang.String getErr()
Return the captured error stream.- Returns:
- captured std err
-
getTime
int getTime()
Time in seconds of execution.- Returns:
- time
-
timedOut
boolean timedOut()
Did the prior execution go too long?- Returns:
- true iff execution was killed after exceeding time limit
-
crashed
boolean crashed()
Did the prior execution exit with a non-zero status code?- Returns:
- true iff prior execution failed/crashed
-
getOnTime
boolean getOnTime()
- Returns:
- true iff last test execution finished in an acceptable time.
-
getStatusCode
int getStatusCode()
- Returns:
- status code of last execution (usually 0 if successful)
-
-