Fri, 26 Jul 2013 13:50:52 +0200
8020719: Run tests with reduced splitter threshold
Reviewed-by: lagergren, sundar, jlaskey
1.1 --- a/make/build.xml Thu Jul 25 20:10:48 2013 +0530 1.2 +++ b/make/build.xml Fri Jul 26 13:50:52 2013 +0200 1.3 @@ -47,10 +47,10 @@ 1.4 <!-- check if testng.jar is avaiable --> 1.5 <available property="testng.available" file="${file.reference.testng.jar}"/> 1.6 1.7 - <!-- enable/disable make code coverage --> 1.8 - <condition property="cc.enabled"> 1.9 - <istrue value="${make.code.coverage}" /> 1.10 - </condition> 1.11 + <!-- enable/disable make code coverage --> 1.12 + <condition property="cc.enabled"> 1.13 + <istrue value="${make.code.coverage}" /> 1.14 + </condition> 1.15 1.16 <!-- exclude tests in exclude lists --> 1.17 <condition property="exclude.list" value="./exclude/exclude_list_cc.txt" else="./exclude/exclude_list.txt"> 1.18 @@ -60,9 +60,9 @@ 1.19 1.20 <target name="init" depends="init-conditions, init-cc"> 1.21 1.22 - <!-- extends jvm args --> 1.23 - <property name="run.test.jvmargs" value="${run.test.jvmargs.main} ${run.test.cc.jvmargs}"/> 1.24 - <property name="run.test.jvmargs.octane" value="${run.test.jvmargs.octane.main} ${run.test.cc.jvmargs}" /> 1.25 + <!-- extends jvm args --> 1.26 + <property name="run.test.jvmargs" value="${run.test.jvmargs.main} ${run.test.cc.jvmargs}"/> 1.27 + <property name="run.test.jvmargs.octane" value="${run.test.jvmargs.octane.main} ${run.test.cc.jvmargs}" /> 1.28 1.29 <echo message="run.test.jvmargs=${run.test.jvmargs}"/> 1.30 <echo message="run.test.jvmargs.octane=${run.test.jvmargs.octane}"/> 1.31 @@ -294,19 +294,6 @@ 1.32 </target> 1.33 1.34 <target name="test" depends="jar, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available"> 1.35 - <java classname="${nashorn.shell.tool}" fork="true" dir="${test.script.dir}/representations" output="${build.dir}/output1.log" error="${build.dir}/err.log"> 1.36 - <jvmarg line="${ext.class.path}"/> 1.37 - <jvmarg line="-Dnashorn.fields.dual=true"/> 1.38 - <arg value="NASHORN-592a.js"/> 1.39 - </java> 1.40 - <java classname="${nashorn.shell.tool}" fork="true" dir="${test.script.dir}/representations" output="${build.dir}/output2.log" error="${build.dir}/err.log"> 1.41 - <jvmarg line="${ext.class.path}"/> 1.42 - <arg value="NASHORN-592a.js"/> 1.43 - </java> 1.44 - <condition property="representation-ok"> 1.45 - <filesmatch file1="${build.dir}/output1.log" file2="${build.dir}/output2.log"/> 1.46 - </condition> 1.47 - <fail unless="representation-ok">Representation test failed - output differs!</fail> 1.48 <fileset id="test.classes" dir="${build.test.classes.dir}"> 1.49 <include name="**/api/javaaccess/*Test.class"/> 1.50 <include name="**/api/scripting/*Test.class"/>
2.1 --- a/make/project.properties Thu Jul 25 20:10:48 2013 +0530 2.2 +++ b/make/project.properties Fri Jul 26 13:50:52 2013 +0200 2.3 @@ -223,7 +223,6 @@ 2.4 run.test.user.country=TR 2.5 2.6 # -XX:+PrintCompilation -XX:+UnlockDiagnosticVMOptions -XX:+PrintNMethods 2.7 -# add '-Dtest.js.outofprocess' to run each test in a new sub-process 2.8 run.test.jvmargs.main=-server -Xmx${run.test.xmx} -XX:+TieredCompilation -ea -Dfile.encoding=UTF-8 -Duser.language=${run.test.user.language} -Duser.country=${run.test.user.country} 2.9 2.10 #-XX:+HeapDumpOnOutOfMemoryError -XX:-UseCompressedKlassPointers -XX:+PrintHeapAtGC -XX:ClassMetaspaceSize=300M
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/test/script/basic/NASHORN-592-dual.js Fri Jul 26 13:50:52 2013 +0200 3.3 @@ -0,0 +1,34 @@ 3.4 +/* 3.5 + * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. 3.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3.7 + * 3.8 + * This code is free software; you can redistribute it and/or modify it 3.9 + * under the terms of the GNU General Public License version 2 only, as 3.10 + * published by the Free Software Foundation. 3.11 + * 3.12 + * This code is distributed in the hope that it will be useful, but WITHOUT 3.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3.14 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3.15 + * version 2 for more details (a copy is included in the LICENSE file that 3.16 + * accompanied this code). 3.17 + * 3.18 + * You should have received a copy of the GNU General Public License version 3.19 + * 2 along with this work; if not, write to the Free Software Foundation, 3.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3.21 + * 3.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3.23 + * or visit www.oracle.com if you need additional information or have any 3.24 + * questions. 3.25 + */ 3.26 + 3.27 +/** 3.28 + * NASHORN-592-dual: test all combos of field types and getters and setters 3.29 + * This time use dual field representation 3.30 + * 3.31 + * @test 3.32 + * @option -Dnashorn.fields.dual=true 3.33 + * @fork 3.34 + * @run/ignore-std-error 3.35 + */ 3.36 + 3.37 +load(__DIR__ + 'NASHORN-592.js');
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/test/script/basic/NASHORN-592-dual.js.EXPECTED Fri Jul 26 13:50:52 2013 +0200 4.3 @@ -0,0 +1,44 @@ 4.4 +0 4.5 +0 4.6 +NaN 4.7 +undefinedhej! 4.8 +17 4.9 +8 4.10 +34 4.11 +17hej! 4.12 +17 4.13 +8 4.14 +34.9422 4.15 +17.4711hej! 4.16 +0 4.17 +0 4.18 +NaN 4.19 +Fame and fortune Salamander Yahoo!hej! 4.20 +24 4.21 +11111 4.22 +23.23 4.23 +23 4.24 +23 4.25 +Have some pie! 4.26 +4711.17 4.27 +17172 4.28 +23 4.29 +23.23 4.30 +23 4.31 +23 4.32 +Have some pie! 4.33 +4711.17 4.34 +23 4.35 +111 4.36 +4711.16 4.37 +I like cake! 4.38 +0 4.39 +NaN 4.40 +0 4.41 +I like cake! 4.42 +17 4.43 +17.4711 4.44 +salamander 4.45 +4711.17 4.46 +axolotl 4.47 +lizard
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 5.2 +++ b/test/script/basic/compile-octane-splitter.js Fri Jul 26 13:50:52 2013 +0200 5.3 @@ -0,0 +1,32 @@ 5.4 +/* 5.5 + * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. 5.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 5.7 + * 5.8 + * This code is free software; you can redistribute it and/or modify it 5.9 + * under the terms of the GNU General Public License version 2 only, as 5.10 + * published by the Free Software Foundation. 5.11 + * 5.12 + * This code is distributed in the hope that it will be useful, but WITHOUT 5.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 5.14 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 5.15 + * version 2 for more details (a copy is included in the LICENSE file that 5.16 + * accompanied this code). 5.17 + * 5.18 + * You should have received a copy of the GNU General Public License version 5.19 + * 2 along with this work; if not, write to the Free Software Foundation, 5.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 5.21 + * 5.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 5.23 + * or visit www.oracle.com if you need additional information or have any 5.24 + * questions. 5.25 + */ 5.26 + 5.27 +/** 5.28 + * @test 5.29 + * @option -Dnashorn.compiler.splitter.threshold=1000 5.30 + * @fork 5.31 + * @runif external.octane 5.32 + */ 5.33 + 5.34 +compile_only = true; 5.35 +load(__DIR__ + 'run-octane.js');
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 6.2 +++ b/test/script/basic/compile-octane-splitter.js.EXPECTED Fri Jul 26 13:50:52 2013 +0200 6.3 @@ -0,0 +1,13 @@ 6.4 +Compiled OK: box2d 6.5 +Compiled OK: code-load 6.6 +Compiled OK: crypto 6.7 +Compiled OK: deltablue 6.8 +Compiled OK: earley-boyer 6.9 +Compiled OK: gbemu 6.10 +Compiled OK: mandreel 6.11 +Compiled OK: navier-stokes 6.12 +Compiled OK: pdfjs 6.13 +Compiled OK: raytrace 6.14 +Compiled OK: regexp 6.15 +Compiled OK: richards 6.16 +Compiled OK: splay
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 7.2 +++ b/test/script/basic/splitter.js Fri Jul 26 13:50:52 2013 +0200 7.3 @@ -0,0 +1,36 @@ 7.4 +/* 7.5 + * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. 7.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 7.7 + * 7.8 + * This code is free software; you can redistribute it and/or modify it 7.9 + * under the terms of the GNU General Public License version 2 only, as 7.10 + * published by the Free Software Foundation. 7.11 + * 7.12 + * This code is distributed in the hope that it will be useful, but WITHOUT 7.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 7.14 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 7.15 + * version 2 for more details (a copy is included in the LICENSE file that 7.16 + * accompanied this code). 7.17 + * 7.18 + * You should have received a copy of the GNU General Public License version 7.19 + * 2 along with this work; if not, write to the Free Software Foundation, 7.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 7.21 + * 7.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 7.23 + * or visit www.oracle.com if you need additional information or have any 7.24 + * questions. 7.25 + */ 7.26 + 7.27 +/** 7.28 + * Test various scripts with low splitter threshold 7.29 + * 7.30 + * @test 7.31 + * @option -Dnashorn.compiler.splitter.threshold=200 7.32 + * @run 7.33 + * @fork 7.34 + */ 7.35 + 7.36 +load(__DIR__ + 'prototype.js'); 7.37 +load(__DIR__ + 'yui.js'); 7.38 +load(__DIR__ + 'NASHORN-689.js'); 7.39 +load(__DIR__ + 'NASHORN-58.js');
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 8.2 +++ b/test/script/basic/splitter.js.EXPECTED Fri Jul 26 13:50:52 2013 +0200 8.3 @@ -0,0 +1,76 @@ 8.4 +parsed and compiled ok prototype.js 8.5 +parsed and compiled ok yui-min.js 8.6 +parsed and compiled ok yui.js 8.7 +a=10 8.8 +a=9 8.9 +a=8 8.10 +a=7 8.11 +a=6 8.12 +a=5 8.13 +a=4 8.14 +a=3 8.15 +a=2 8.16 +a=1 8.17 +a=0 8.18 +10 8.19 +a=0 8.20 +a=1 8.21 +a=2 8.22 +a=3 8.23 +a=4 8.24 +a=5 8.25 +a=6 8.26 +a=7 8.27 +a=8 8.28 +a=9 8.29 +a=10 8.30 +ok 8.31 +a=0 8.32 +a=1 8.33 +a=2 8.34 +a=3 8.35 +a=4 8.36 +a=5 8.37 +a=6 8.38 +a=7 8.39 +a=8 8.40 +a=9 8.41 +a=10 8.42 +done 8.43 +no arg 8.44 +x=0 8.45 +x=1 8.46 +x=2 8.47 +x=3 8.48 +x=4 8.49 +x=5 8.50 +x=6 8.51 +x=7 8.52 +x=8 8.53 +x=9 8.54 +x=10 8.55 +ok 8.56 +done 8.57 +try 8.58 +finally 8.59 +3 8.60 +try 8.61 +finally 8.62 +2 8.63 +3 8.64 +1 8.65 +2 8.66 +3 8.67 +4 8.68 +5 8.69 +5 8.70 +6 8.71 +6 8.72 +1 8.73 +2 8.74 +3 8.75 +4 8.76 +6 8.77 +Error: testing 8.78 +finally 8.79 +SUCCESS
9.1 --- a/test/script/representations/NASHORN-592a.js Thu Jul 25 20:10:48 2013 +0530 9.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 9.3 @@ -1,122 +0,0 @@ 9.4 -/* 9.5 - * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. 9.6 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 9.7 - * 9.8 - * This code is free software; you can redistribute it and/or modify it 9.9 - * under the terms of the GNU General Public License version 2 only, as 9.10 - * published by the Free Software Foundation. 9.11 - * 9.12 - * This code is distributed in the hope that it will be useful, but WITHOUT 9.13 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 9.14 - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 9.15 - * version 2 for more details (a copy is included in the LICENSE file that 9.16 - * accompanied this code). 9.17 - * 9.18 - * You should have received a copy of the GNU General Public License version 9.19 - * 2 along with this work; if not, write to the Free Software Foundation, 9.20 - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 9.21 - * 9.22 - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 9.23 - * or visit www.oracle.com if you need additional information or have any 9.24 - * questions. 9.25 - */ 9.26 - 9.27 -/** 9.28 - * NASHORN-592a: test all combos of field types and getters and setters 9.29 - * This time use dual field representation 9.30 - * 9.31 - * @test 9.32 - * @option --dual-fields 9.33 - * @run 9.34 - */ 9.35 - 9.36 -//fortype undefined 9.37 -var a; 9.38 - 9.39 -print(a & 0xff); 9.40 -print(a >>> 1); 9.41 -print(a * 2); 9.42 -print(a + "hej!"); 9.43 - 9.44 -var b; 9.45 -b = 17; //set undefined->int 9.46 - 9.47 -print(b & 0xff); 9.48 -print(b >>> 1); 9.49 -print(b * 2); 9.50 -print(b + "hej!"); 9.51 - 9.52 -var c; 9.53 -c = 17.4711 //set undefined->double 9.54 - 9.55 -print(c & 0xff); 9.56 -print(c >>> 1); 9.57 -print(c * 2); 9.58 -print(c + "hej!"); 9.59 - 9.60 -var d; // set undefined->double 9.61 -d = "Fame and fortune Salamander Yahoo!"; 9.62 - 9.63 -print(d & 0xff); 9.64 -print(d >>> 1); 9.65 -print(d * 2); 9.66 -print(d + "hej!"); 9.67 - 9.68 -// now we have exhausted all getters and undefined->everything setters. 9.69 - 9.70 - 9.71 -var e = 23; // int to everything setters, 9.72 -e = 24; //int to int 9.73 -print(e); 9.74 -e = (22222 >>> 1); //int to long; 9.75 -print(e); 9.76 -e = 23.23; //int to double 9.77 -print(e); 9.78 -e = 23; //double to int - still double 9.79 -print(e); 9.80 -print(e & 0xff); 9.81 -e = "Have some pie!" //double to string 9.82 -print(e); 9.83 -e = 4711.17; 9.84 -print(e); //still an object not a double 9.85 - 9.86 - 9.87 -var f = (23222 >>> 1); // long to everything setters, 9.88 -f = 34344 >>> 1; //long to long 9.89 -print(f); 9.90 -f = 23; //long to int - still long 9.91 -print(f); 9.92 -f = 23.23; //long to double 9.93 -print(f); 9.94 -f = 23; //double to int - still double 9.95 -print(f); 9.96 -print(f & 0xff); 9.97 -f = "Have some pie!" //double to string 9.98 -print(f); 9.99 -f = 4711.17; 9.100 -print(f); //still an object not a double 9.101 - 9.102 -var g = 4811.16; 9.103 -g = 23; //still double 9.104 -print(g); 9.105 -g = (222 >>> 1); //still double 9.106 -print(g); 9.107 -g = 4711.16; //double->double 9.108 -print(g); 9.109 -g = "I like cake!"; 9.110 -print(g); //object to various 9.111 -print(g & 0xff); 9.112 -print(g * 2); 9.113 -print(g >>> 2); 9.114 -print(g); 9.115 - 9.116 -var h = {x:17, y:17.4711, z:"salamander"}; 9.117 -print(h.x); 9.118 -print(h.y); 9.119 -print(h.z); 9.120 -h.x = 4711.17; 9.121 -h.y = "axolotl"; 9.122 -h.z = "lizard"; 9.123 -print(h.x); 9.124 -print(h.y); 9.125 -print(h.z);
10.1 --- a/test/src/jdk/nashorn/internal/test/framework/AbstractScriptRunnable.java Thu Jul 25 20:10:48 2013 +0530 10.2 +++ b/test/src/jdk/nashorn/internal/test/framework/AbstractScriptRunnable.java Fri Jul 26 13:50:52 2013 +0200 10.3 @@ -29,6 +29,7 @@ 10.4 import static jdk.nashorn.internal.test.framework.TestConfig.OPTIONS_COMPARE; 10.5 import static jdk.nashorn.internal.test.framework.TestConfig.OPTIONS_EXPECT_COMPILE_FAIL; 10.6 import static jdk.nashorn.internal.test.framework.TestConfig.OPTIONS_EXPECT_RUN_FAIL; 10.7 +import static jdk.nashorn.internal.test.framework.TestConfig.OPTIONS_FORK; 10.8 import static jdk.nashorn.internal.test.framework.TestConfig.OPTIONS_IGNORE_STD_ERROR; 10.9 import static jdk.nashorn.internal.test.framework.TestConfig.OPTIONS_RUN; 10.10 import static jdk.nashorn.internal.test.framework.TestConfig.TEST_JS_FAIL_LIST; 10.11 @@ -68,6 +69,8 @@ 10.12 protected final boolean checkCompilerMsg; 10.13 // .EXPECTED file compared for this or test? 10.14 protected final boolean compare; 10.15 + // should test run in a separate process? 10.16 + protected final boolean fork; 10.17 // ignore stderr output? 10.18 protected final boolean ignoreStdError; 10.19 // Foo.js.OUTPUT file where test stdout messages go 10.20 @@ -98,6 +101,7 @@ 10.21 this.checkCompilerMsg = testOptions.containsKey(OPTIONS_CHECK_COMPILE_MSG); 10.22 this.ignoreStdError = testOptions.containsKey(OPTIONS_IGNORE_STD_ERROR); 10.23 this.compare = testOptions.containsKey(OPTIONS_COMPARE); 10.24 + this.fork = testOptions.containsKey(OPTIONS_FORK); 10.25 10.26 final String testName = testFile.getName(); 10.27 this.outputFileName = buildDir + File.separator + testName + ".OUTPUT";
11.1 --- a/test/src/jdk/nashorn/internal/test/framework/ScriptRunnable.java Thu Jul 25 20:10:48 2013 +0530 11.2 +++ b/test/src/jdk/nashorn/internal/test/framework/ScriptRunnable.java Fri Jul 26 13:50:52 2013 +0200 11.3 @@ -43,6 +43,8 @@ 11.4 import java.util.Arrays; 11.5 import java.util.List; 11.6 import java.util.Map; 11.7 + 11.8 +import jdk.nashorn.tools.Shell; 11.9 import org.testng.Assert; 11.10 import org.testng.ITest; 11.11 import org.testng.annotations.Test; 11.12 @@ -53,9 +55,6 @@ 11.13 * corresponding .EXPECTED file. 11.14 */ 11.15 public final class ScriptRunnable extends AbstractScriptRunnable implements ITest { 11.16 - // when test is run in a separate process, this is the command line 11.17 - protected final ArrayList<String> separateProcessArgs; 11.18 - 11.19 public ScriptRunnable(final String framework, final File testFile, final List<String> engineOptions, final Map<String, String> testOptions, final List<String> scriptArguments) { 11.20 super(framework, testFile, engineOptions, testOptions, scriptArguments); 11.21 11.22 @@ -63,9 +62,6 @@ 11.23 // add --dump-on-error option always so that we can get detailed error msg. 11.24 engineOptions.add("-doe"); 11.25 } 11.26 - 11.27 - final String separateProcess = System.getProperty("test.js.separateprocess"); 11.28 - this.separateProcessArgs = separateProcess == null ? null : new ArrayList<>(Arrays.asList(separateProcess.split(" "))); 11.29 } 11.30 11.31 @Override 11.32 @@ -81,7 +77,7 @@ 11.33 11.34 @Override 11.35 protected void execute() { 11.36 - if (separateProcessArgs != null) { 11.37 + if (fork) { 11.38 executeInNewProcess(); 11.39 } else { 11.40 executeInThisProcess(); 11.41 @@ -172,15 +168,21 @@ 11.42 } 11.43 11.44 private void executeInNewProcess() { 11.45 - final List<String> args = separateProcessArgs; 11.46 + 11.47 + final String separator = System.getProperty("file.separator"); 11.48 + final List<String> cmd = new ArrayList<>(); 11.49 + 11.50 + cmd.add(System.getProperty("java.home") + separator + "bin" + separator + "java"); 11.51 + cmd.add("-Djava.ext.dirs=dist"); 11.52 + cmd.add(Shell.class.getName()); 11.53 // now add the rest of the "in process" runtime arguments 11.54 - args.addAll(getRuntimeArgs()); 11.55 + cmd.addAll(getRuntimeArgs()); 11.56 11.57 final File outputFileHandle = new File(outputFileName); 11.58 final File errorFileHandle = new File(errorFileName); 11.59 11.60 try { 11.61 - final ProcessBuilder pb = new ProcessBuilder(args); 11.62 + final ProcessBuilder pb = new ProcessBuilder(cmd); 11.63 pb.redirectOutput(outputFileHandle); 11.64 pb.redirectError(errorFileHandle); 11.65 final Process process = pb.start();
12.1 --- a/test/src/jdk/nashorn/internal/test/framework/TestConfig.java Thu Jul 25 20:10:48 2013 +0530 12.2 +++ b/test/src/jdk/nashorn/internal/test/framework/TestConfig.java Fri Jul 26 13:50:52 2013 +0200 12.3 @@ -36,6 +36,7 @@ 12.4 public static final String OPTIONS_EXPECT_RUN_FAIL = "expect-run-fail"; 12.5 public static final String OPTIONS_IGNORE_STD_ERROR = "ignore-std-error"; 12.6 public static final String OPTIONS_COMPARE = "compare"; 12.7 + public static final String OPTIONS_FORK = "fork"; 12.8 12.9 // System property names used for various test configurations 12.10
13.1 --- a/test/src/jdk/nashorn/internal/test/framework/TestFinder.java Thu Jul 25 20:10:48 2013 +0530 13.2 +++ b/test/src/jdk/nashorn/internal/test/framework/TestFinder.java Fri Jul 26 13:50:52 2013 +0200 13.3 @@ -29,6 +29,7 @@ 13.4 import static jdk.nashorn.internal.test.framework.TestConfig.OPTIONS_COMPARE; 13.5 import static jdk.nashorn.internal.test.framework.TestConfig.OPTIONS_EXPECT_COMPILE_FAIL; 13.6 import static jdk.nashorn.internal.test.framework.TestConfig.OPTIONS_EXPECT_RUN_FAIL; 13.7 +import static jdk.nashorn.internal.test.framework.TestConfig.OPTIONS_FORK; 13.8 import static jdk.nashorn.internal.test.framework.TestConfig.OPTIONS_IGNORE_STD_ERROR; 13.9 import static jdk.nashorn.internal.test.framework.TestConfig.OPTIONS_RUN; 13.10 import static jdk.nashorn.internal.test.framework.TestConfig.TEST_FAILED_LIST_FILE; 13.11 @@ -208,6 +209,7 @@ 13.12 boolean checkCompilerMsg = false; 13.13 boolean noCompare = false; 13.14 boolean ignoreStdError = false; 13.15 + boolean fork = false; 13.16 13.17 final List<String> engineOptions = new ArrayList<>(); 13.18 final List<String> scriptArguments = new ArrayList<>(); 13.19 @@ -284,6 +286,9 @@ 13.20 case "@option": 13.21 engineOptions.add(scanner.next()); 13.22 break; 13.23 + case "@fork": 13.24 + fork = true; 13.25 + break; 13.26 } 13.27 13.28 // negative tests are expected to fail at runtime only 13.29 @@ -324,6 +329,9 @@ 13.30 if (ignoreStdError) { 13.31 testOptions.put(OPTIONS_IGNORE_STD_ERROR, "true"); 13.32 } 13.33 + if (fork) { 13.34 + testOptions.put(OPTIONS_FORK, "true"); 13.35 + } 13.36 13.37 tests.add(factory.createTest(framework, testFile.toFile(), engineOptions, testOptions, scriptArguments)); 13.38 } else if (!isNotTest) {