# HG changeset patch # User sundar # Date 1410171687 -19800 # Node ID 7caec82669a440017868b7ae4e23b69e2de4ecad # Parent b7a2db4de2545740ff31f50cee090ef2461c4c11 8057742: ant clean test should not fail if one or more external test suites are missing Reviewed-by: lagergren, hannesw diff -r b7a2db4de254 -r 7caec82669a4 test/script/basic/JDK-8048079_1.js --- a/test/script/basic/JDK-8048079_1.js Thu Sep 04 18:47:18 2014 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/** - * JDK-8048079: Persistent code store is broken after optimistic types merge - * - * @test - * @run - * @option -pcc - * @option -Dnashorn.persistent.code.cache=build/nashorn_code_cache - * @fork - */ - -load(__DIR__ + 'prototype.js'); -load(__DIR__ + 'yui.js'); diff -r b7a2db4de254 -r 7caec82669a4 test/script/basic/JDK-8048079_1.js.EXPECTED --- a/test/script/basic/JDK-8048079_1.js.EXPECTED Thu Sep 04 18:47:18 2014 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -parsed and compiled ok prototype.js -parsed and compiled ok yui-min.js -parsed and compiled ok yui.js diff -r b7a2db4de254 -r 7caec82669a4 test/script/basic/JDK-8048079_1a.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/script/basic/JDK-8048079_1a.js Mon Sep 08 15:51:27 2014 +0530 @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * JDK-8048079: Persistent code store is broken after optimistic types merge + * + * @test + * @runif external.prototype + * @option -pcc + * @option -Dnashorn.persistent.code.cache=build/nashorn_code_cache + * @fork + */ + +load(__DIR__ + 'prototype.js'); diff -r b7a2db4de254 -r 7caec82669a4 test/script/basic/JDK-8048079_1a.js.EXPECTED --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/script/basic/JDK-8048079_1a.js.EXPECTED Mon Sep 08 15:51:27 2014 +0530 @@ -0,0 +1,1 @@ +parsed and compiled ok prototype.js diff -r b7a2db4de254 -r 7caec82669a4 test/script/basic/JDK-8048079_1b.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/script/basic/JDK-8048079_1b.js Mon Sep 08 15:51:27 2014 +0530 @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * JDK-8048079: Persistent code store is broken after optimistic types merge + * + * @test + * @runif external.yui + * @option -pcc + * @option -Dnashorn.persistent.code.cache=build/nashorn_code_cache + * @fork + */ + +load(__DIR__ + 'yui.js'); diff -r b7a2db4de254 -r 7caec82669a4 test/script/basic/JDK-8048079_1b.js.EXPECTED --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/script/basic/JDK-8048079_1b.js.EXPECTED Mon Sep 08 15:51:27 2014 +0530 @@ -0,0 +1,2 @@ +parsed and compiled ok yui-min.js +parsed and compiled ok yui.js diff -r b7a2db4de254 -r 7caec82669a4 test/script/basic/JDK-8048079_2.js --- a/test/script/basic/JDK-8048079_2.js Thu Sep 04 18:47:18 2014 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/** - * JDK-8048079: Persistent code store is broken after optimistic types merge - * - * @test - * @run - * @option -pcc - * @option -Dnashorn.persistent.code.cache=build/nashorn_code_cache - * @fork - */ - -load(__DIR__ + 'prototype.js'); -load(__DIR__ + 'yui.js'); diff -r b7a2db4de254 -r 7caec82669a4 test/script/basic/JDK-8048079_2.js.EXPECTED --- a/test/script/basic/JDK-8048079_2.js.EXPECTED Thu Sep 04 18:47:18 2014 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -parsed and compiled ok prototype.js -parsed and compiled ok yui-min.js -parsed and compiled ok yui.js diff -r b7a2db4de254 -r 7caec82669a4 test/script/basic/JDK-8048079_2a.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/script/basic/JDK-8048079_2a.js Mon Sep 08 15:51:27 2014 +0530 @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * JDK-8048079: Persistent code store is broken after optimistic types merge. + * Same script as JDK-8048079_1a.js to exercise code cache. + * @test + * @runif external.prototype + * @option -pcc + * @option -Dnashorn.persistent.code.cache=build/nashorn_code_cache + * @fork + */ + +load(__DIR__ + 'prototype.js'); diff -r b7a2db4de254 -r 7caec82669a4 test/script/basic/JDK-8048079_2a.js.EXPECTED --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/script/basic/JDK-8048079_2a.js.EXPECTED Mon Sep 08 15:51:27 2014 +0530 @@ -0,0 +1,1 @@ +parsed and compiled ok prototype.js diff -r b7a2db4de254 -r 7caec82669a4 test/script/basic/JDK-8048079_2b.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/script/basic/JDK-8048079_2b.js Mon Sep 08 15:51:27 2014 +0530 @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * JDK-8048079: Persistent code store is broken after optimistic types merge + * Same script as JDK-8048079_1b.js to exercise code cache again. + * @test + * @runif external.yui + * @option -pcc + * @option -Dnashorn.persistent.code.cache=build/nashorn_code_cache + * @fork + */ + +load(__DIR__ + 'yui.js'); diff -r b7a2db4de254 -r 7caec82669a4 test/script/basic/JDK-8048079_2b.js.EXPECTED --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/script/basic/JDK-8048079_2b.js.EXPECTED Mon Sep 08 15:51:27 2014 +0530 @@ -0,0 +1,2 @@ +parsed and compiled ok yui-min.js +parsed and compiled ok yui.js diff -r b7a2db4de254 -r 7caec82669a4 test/script/basic/splitter.js --- a/test/script/basic/splitter.js Thu Sep 04 18:47:18 2014 +0200 +++ b/test/script/basic/splitter.js Mon Sep 08 15:51:27 2014 +0530 @@ -30,7 +30,5 @@ * @fork */ -load(__DIR__ + 'prototype.js'); -load(__DIR__ + 'yui.js'); load(__DIR__ + 'NASHORN-689.js'); load(__DIR__ + 'NASHORN-58.js'); diff -r b7a2db4de254 -r 7caec82669a4 test/script/basic/splitter.js.EXPECTED --- a/test/script/basic/splitter.js.EXPECTED Thu Sep 04 18:47:18 2014 +0200 +++ b/test/script/basic/splitter.js.EXPECTED Mon Sep 08 15:51:27 2014 +0530 @@ -1,6 +1,3 @@ -parsed and compiled ok prototype.js -parsed and compiled ok yui-min.js -parsed and compiled ok yui.js a=10 a=9 a=8 diff -r b7a2db4de254 -r 7caec82669a4 test/script/basic/splitter_prototype.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/script/basic/splitter_prototype.js Mon Sep 08 15:51:27 2014 +0530 @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test various scripts with low splitter threshold + * + * @test + * @option -Dnashorn.compiler.splitter.threshold=200 + * @runif external.prototype + * @fork + */ + +load(__DIR__ + 'prototype.js'); diff -r b7a2db4de254 -r 7caec82669a4 test/script/basic/splitter_prototype.js.EXPECTED --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/script/basic/splitter_prototype.js.EXPECTED Mon Sep 08 15:51:27 2014 +0530 @@ -0,0 +1,1 @@ +parsed and compiled ok prototype.js diff -r b7a2db4de254 -r 7caec82669a4 test/script/basic/splitter_yui.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/script/basic/splitter_yui.js Mon Sep 08 15:51:27 2014 +0530 @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test various scripts with low splitter threshold + * + * @test + * @option -Dnashorn.compiler.splitter.threshold=200 + * @runif external.yui + * @fork + */ + +load(__DIR__ + 'yui.js'); diff -r b7a2db4de254 -r 7caec82669a4 test/script/basic/splitter_yui.js.EXPECTED --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/script/basic/splitter_yui.js.EXPECTED Mon Sep 08 15:51:27 2014 +0530 @@ -0,0 +1,2 @@ +parsed and compiled ok yui-min.js +parsed and compiled ok yui.js diff -r b7a2db4de254 -r 7caec82669a4 test/src/jdk/nashorn/internal/test/framework/TestFinder.java --- a/test/src/jdk/nashorn/internal/test/framework/TestFinder.java Thu Sep 04 18:47:18 2014 +0200 +++ b/test/src/jdk/nashorn/internal/test/framework/TestFinder.java Mon Sep 08 15:51:27 2014 +0530 @@ -261,14 +261,17 @@ isTest = false; isNotTest = true; break; - case "@runif": - if (System.getProperty(scanner.next()) != null) { + case "@runif": { + final String prop = scanner.next(); + if (System.getProperty(prop) != null) { shouldRun = true; } else { + factory.log("WARNING: (" + prop + ") skipping " + testFile); isTest = false; isNotTest = true; } break; + } case "@run": shouldRun = true; break;