Package com.sun.javatest.lib
Class ExecStdTestOtherJVMCmd
- java.lang.Object
-
- com.sun.javatest.Command
-
- com.sun.javatest.lib.ProcessCommand
-
- com.sun.javatest.lib.ExecStdTestOtherJVMCmd
-
public class ExecStdTestOtherJVMCmd extends ProcessCommand
This is a modification ofProcessCommand
suitable for executing standard tests in a separate JVM. When run in a separate process, these tests report their exit status by callingStatus.exit()
.
-
-
Constructor Summary
Constructors Constructor Description ExecStdTestOtherJVMCmd()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Status
getStatus(int exitCode, Status logStatus)
Generate a status for the command, based upon the command's exit code and a status that may have been passed from the command by usingstatus.exit()
.-
Methods inherited from class com.sun.javatest.lib.ProcessCommand
exec, getExecDir, main, run, setDefaultStatus, setExecDir, setStatusForExit
-
Methods inherited from class com.sun.javatest.Command
getClassLoader, setClassLoader
-
-
-
-
Method Detail
-
getStatus
protected Status getStatus(int exitCode, Status logStatus)
Generate a status for the command, based upon the command's exit code and a status that may have been passed from the command by usingstatus.exit()
.- Overrides:
getStatus
in classProcessCommand
- Parameters:
exitCode
- The exit code from the command that was executed.logStatus
- If the command that was executed was a test program and exited by callingstatus.exit()
, then logStatus will be set to `status'. Otherwise, it will be null. The value of the status is passed from the command by writing it as the last line to stdout before exiting the process. If it is not received as the last line, the value will be lost.- Returns:
- If
logStatus
is not null, it will be used as the result; this will normally correspond to the status for which the test calledstatus.exit();
.If
logStatus
is null, that means that for some reason the test did not successfully callstatus.exit()
and the test is deemed to have failed. If the exit code is zero, a likely possibility is that the test raised an exception which caused the JVM to dump the stack and exit. In this case, the result isStatus.failed("exit without status, exception assumed")
. In other cases, the result is simplyStatus.failed("exit code" + exitCode)
.
-
-