Class OptionsParser.SuppliedOptions

  • Enclosing class:
    OptionsParser

    public final class OptionsParser.SuppliedOptions
    extends Object
    Description of the command-line options supplied.
    • Field Detail

      • exitCode

        public int exitCode
        Zero if no error occurred, 1 otherwise.
      • out

        public final PrintStream out
        Stream used to display messages.
      • err

        public final PrintStream err
        Stream used to display errors.
      • stopAtFirstError

        public boolean stopAtFirstError
        If true execution stops at the first encountered error.
      • doNotExecute

        public boolean doNotExecute
        If true tests are not executed.
      • executor

        public String executor
        Name of the test executor to invoke.
      • bugsFile

        public String bugsFile
        Optional name of the file that contains statements and queries that are expected to fail.
      • verbosity

        public int verbosity
        A higher value causes execution to display more information.
    • Method Detail

      • getDirectories

        public List<String> getDirectories()
        Get the list of directories or files that contain tests to be executed.
      • readBugsFile

        public Set<String> readBugsFile()
                                 throws IOException
        Read the list of statements and queries to skip from a file. The file can contain comments on lines starting with // Everything else is interpreted as a one-line statement (or query).
        Throws:
        IOException
      • message

        public void message​(String message,
                            int importance)
        Report a message to the user.
        Parameters:
        message - Message to report.
        importance - Importance. Higher means less important.
      • registerExecutor

        public void registerExecutor​(String executorName,
                                     Supplier<SqlSltTestExecutor> executor)
        Register a new executor.
        Parameters:
        executorName - Name that identifies the executor as a command-line option.
        executor - Executor that can run tests.
      • getExecutorByName

        public @Nullable SqlSltTestExecutor getExecutorByName​(String executor)
        Returns:
        The executor associated with the specified name or null if there isn't any such executor.
      • getExecutor

        public @Nullable SqlSltTestExecutor getExecutor()
        Get the executor indicated by the command-line options.
      • error

        public void error​(Throwable ex)
        Function used to display an error message on the screen.