public class ExecStdTestOtherJVMCmd extends ProcessCommand
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 and Description |
---|
ExecStdTestOtherJVMCmd() |
Modifier and Type | Method and 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 using
status.exit() . |
exec, getExecDir, main, run, setDefaultStatus, setExecDir, setStatusForExit
getClassLoader, setClassLoader
protected Status getStatus(int exitCode, Status logStatus)
status.exit()
.getStatus
in class ProcessCommand
exitCode
- The exit code from the command that was executed.logStatus
- If the command that was executed was a test program
and exited by calling status.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.logStatus
is not null, it will
be used as the result; this will normally correspond
to the status for which the test called
status.exit();
.
If logStatus
is null, that means
that for some reason the test did not successfully
call status.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 is
Status.failed("exit without status, exception assumed")
.
In other cases, the result is simply
Status.failed("exit code" + exitCode)
.
Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.