Package com.sun.javatest.lib
Class ExecStdTestOtherJVMCmd
java.lang.Object
com.sun.javatest.Command
com.sun.javatest.lib.ProcessCommand
com.sun.javatest.lib.ExecStdTestOtherJVMCmd
This is a modification of
ProcessCommand
suitable
for executing standard tests in a separate JVM. When run in a
separate process, these tests report their exit status by calling
Status.exit()
.-
Constructor Summary
Constructors -
Method Summary
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
-
Constructor Details
-
ExecStdTestOtherJVMCmd
public ExecStdTestOtherJVMCmd()
-
-
Method Details
-
getStatus
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)
.
-