8227289: Enable assertions for some shell to java conversion tests after JDK-8218960

Reviewed-by: naoto
This commit is contained in:
Daisy Zhou 2019-07-15 10:21:33 +08:00
parent 159a99ee41
commit 116af970c8
8 changed files with 34 additions and 15 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2019, 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
@ -93,7 +93,9 @@ public class SupplementalJapaneseEraTestRun {
private static void testRun(String property, List<String> javaParam)
throws Throwable{
JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("java");
launcher.addToolArg("-cp")
launcher.addToolArg("-ea")
.addToolArg("-esa")
.addToolArg("-cp")
.addToolArg(Utils.TEST_CLASS_PATH)
.addToolArg("-Djdk.calendar.japanese.supplemental.era=" + property)
.addToolArg("SupplementalJapaneseEraTest");

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2019, 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
@ -85,7 +85,8 @@ public class MissingResourceCauseTestRun {
String cp = Utils.TEST_CLASSES + File.pathSeparator + Utils.TEST_SRC
+ File.pathSeparator + ".";
JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("java");
launcher.addToolArg("-esa")
launcher.addToolArg("-ea")
.addToolArg("-esa")
.addToolArg("-cp")
.addToolArg(cp)
.addToolArg("MissingResourceCauseTest");

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, 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
@ -134,7 +134,9 @@ public class ModuleTestUtil {
public static void runModule(String mp, String mn, List<String> localeList)
throws Throwable {
JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("java");
launcher.addToolArg("-p")
launcher.addToolArg("-ea")
.addToolArg("-esa")
.addToolArg("-p")
.addToolArg(mp)
.addToolArg("-m")
.addToolArg(mn);
@ -160,7 +162,9 @@ public class ModuleTestUtil {
public static void runModuleWithCp(String cp, String mp, String mn,
List<String> localeList, boolean expected) throws Throwable {
JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("java");
launcher.addToolArg("-cp")
launcher.addToolArg("-ea")
.addToolArg("-esa")
.addToolArg("-cp")
.addToolArg(cp)
.addToolArg("-p")
.addToolArg(mp)

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2019, 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
@ -72,7 +72,9 @@ public class LayerTest {
private static void runCmd() throws Throwable {
JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("java");
launcher.addToolArg("-cp")
launcher.addToolArg("-ea")
.addToolArg("-esa")
.addToolArg("-cp")
.addToolArg(Utils.TEST_CLASSES)
.addToolArg("Main")
.addToolArg(Utils.TEST_CLASSES);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2019, 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
@ -74,7 +74,9 @@ public class UnNamedTest {
private static void runCmd() throws Throwable {
// access resource bundles that are exported private unconditionally.
JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("java");
launcher.addToolArg("-cp")
launcher.addToolArg("-ea")
.addToolArg("-esa")
.addToolArg("-cp")
.addToolArg(Utils.TEST_CLASSES)
.addToolArg("--module-path")
.addToolArg(MODS_DIR.toString())
@ -92,7 +94,9 @@ public class UnNamedTest {
// --add-exports can't open resources
launcher = JDKToolLauncher.createUsingTestJDK("java");
launcher.addToolArg("-cp")
launcher.addToolArg("-ea")
.addToolArg("-esa")
.addToolArg("-cp")
.addToolArg(Utils.TEST_CLASSES)
.addToolArg("--module-path")
.addToolArg(MODS_DIR.toString())

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2019, 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
@ -329,6 +329,8 @@ public class VisibilityTest {
private int runCmd(List<String> argsList) throws Throwable {
JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("java");
launcher.addToolArg("-ea")
.addToolArg("-esa");
argsList.forEach(launcher::addToolArg);
return ProcessTools.executeCommand(launcher.getCommand()).getExitValue();

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2019, 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
@ -51,6 +51,8 @@ public class Bug8066652Run {
JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("java");
//Setting invalid TimeZone using VM option
launcher.addToolArg("-Duser.timezone=Foo/Bar")
.addToolArg("-ea")
.addToolArg("-esa")
.addToolArg("-cp")
.addToolArg(cp)
.addToolArg("Bug8066652");

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2009, 2019, 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
@ -69,6 +69,8 @@ public class TimeZoneDatePermissionCheckRun {
JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("java");
launcher.addToolArg("-Djava.security.manager")
.addToolArg("-Djava.security.debug=access,failure,policy")
.addToolArg("-ea")
.addToolArg("-esa")
.addToolArg("-cp")
.addToolArg(jarPath)
.addToolArg("TimeZoneDatePermissionCheck");