Class ExecStdTestOtherJVMCmd


public class ExecStdTestOtherJVMCmd extends ProcessCommand
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 Details

    • ExecStdTestOtherJVMCmd

      public ExecStdTestOtherJVMCmd()
  • Method Details

    • 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 using status.exit().
      Overrides:
      getStatus in class ProcessCommand
      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 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.
      Returns:
      If 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).