Class StdTestScript


  • public class StdTestScript
    extends Script
    A Script to compile/execute a standard test.
    • Field Detail

      • UNKNOWN

        public static final int UNKNOWN
        An integer signifying that the execution mode is unknown.
        See Also:
        Constant Field Values
      • CERTIFY

        public static final int CERTIFY
        An integer signifying that the execution mode is to perform a certification run, executing precompiled classes.
        See Also:
        Constant Field Values
      • PRECOMPILE

        public static final int PRECOMPILE
        An integer signifying that the execution mode is to precompile but not otherwise execute the tests.
        See Also:
        Constant Field Values
      • DEVELOPER

        public static final int DEVELOPER
        An integer signifying that the execution mode is to compile and execute the tests.
        See Also:
        Constant Field Values
    • Constructor Detail

      • StdTestScript

        public StdTestScript()
    • Method Detail

      • run

        public Status run​(java.lang.String[] args,
                          TestDescription td,
                          TestEnvironment env)
        Description copied from class: Script
        The primary method to be provided by Scripts. It is responsible for compiling and executing the test appropiately. Normally, a script should call `init' and then decode any script-specific options it is given in `args'. It should then examine the test description it is given so that it can compile and execute the test as appropriate. Various convenience routines are provided to simplify the task of running the compiler, an interpreter or any other commands, which can be specified in a flexible manner by properties in the TestEnvironment.
        Specified by:
        run in class Script
        Parameters:
        args - Any script-specific options specified in the script property
        td - The test description for the test to be performed
        env - The test environment giving the details of how to run the test
        Returns:
        The result of running the script
        See Also:
        Script.compileIndividually(java.lang.String[]), Script.compileTogether(java.lang.String[]), Script.execute(java.lang.String, java.lang.String), Script.invokeCommand(java.lang.String)
      • getMode

        public int getMode()
        Get the execution mode for this script. The default mode is CERTIFY.
        Returns:
        an integer signifying the execution mode for this script
        See Also:
        setMode(int), UNKNOWN, CERTIFY, PRECOMPILE, DEVELOPER
      • setMode

        public void setMode​(int mode)
        Set the execution mode for this script.
        Parameters:
        mode - an integer signifying the execution mode for this script
        See Also:
        getMode(), UNKNOWN, CERTIFY, PRECOMPILE, DEVELOPER