1 /*
   2  * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package jdk.nashorn.internal.test.framework;
  27 
  28 /**
  29  * Configuration info for script tests.
  30  */
  31 @SuppressWarnings("javadoc")
  32 public interface TestConfig {
  33     // Test options inferred from various test @foo tags and passed to test factory.
  34     public static final String   OPTIONS_RUN                 = "run";
  35     public static final String   OPTIONS_EXPECT_COMPILE_FAIL = "expect-compile-fail";
  36     public static final String   OPTIONS_CHECK_COMPILE_MSG   = "check-compile-msg";
  37     public static final String   OPTIONS_EXPECT_RUN_FAIL     = "expect-run-fail";
  38     public static final String   OPTIONS_IGNORE_STD_ERROR    = "ignore-std-error";
  39     public static final String   OPTIONS_COMPARE             = "compare";
  40     public static final String   OPTIONS_FORK                = "fork";
  41 
  42     // System property names used for various test configurations
  43 
  44     // A list of test directories under which to look for the TEST_JS_INCLUDES
  45     // patterns
  46     static final String  TEST_JS_ROOTS                       = "test.js.roots";
  47 
  48     // A pattern of tests to include under the TEST_JS_ROOTS
  49     static final String TEST_JS_INCLUDES                    = "test.js.includes";
  50 
  51     // explicit list of tests specified to run
  52     static final String TEST_JS_LIST                        = "test.js.list";
  53 
  54     // framework script that runs before the test scripts
  55     static final String TEST_JS_FRAMEWORK                   = "test.js.framework";
  56 
  57     // test directory to skip
  58     static final String TEST_JS_EXCLUDE_DIR                 = "test.js.exclude.dir";
  59 
  60     // test directory where everything should be run
  61     static final String TEST_JS_UNCHECKED_DIR               = "test.js.unchecked.dir";
  62 
  63     // specific tests to skip
  64     static final String TEST_JS_EXCLUDE_LIST                = "test.js.exclude.list";
  65 
  66     // file containing list of tests to skip
  67     static final String TEST_JS_EXCLUDES_FILE               = "test.js.excludes.file";
  68 
  69     // strict mode or not
  70     static final String TEST_JS_ENABLE_STRICT_MODE          = "test.js.enable.strict.mode";
  71 
  72     // always fail test list
  73     static final String TEST_JS_FAIL_LIST                   = "test.js.fail.list";
  74 
  75     // shared context mode or not
  76     static final String TEST_JS_SHARED_CONTEXT              = "test.js.shared.context";
  77 
  78     static final String TEST_FORK_JVM_OPTIONS               = "test.fork.jvm.options";
  79 
  80     // file for storing last run's failed tests
  81     static final String TEST_FAILED_LIST_FILE = "test.failed.list.file";
  82 }