# HG changeset patch # User psomashe # Date 1518808973 28800 # Node ID 1ecb986334cb123fb093338acc04cacc9e02fa3d # Parent d777541fceba1637b049a2944fb458cb7ccb9774 4916621: Update those still using JDIScaffold to use TestScaffold instead. Summary: update remaining tests using JDIScaffold to using TestScaffold instead. Reviewed-by: sspitsyn, cjplummer diff -r d777541fceba -r 1ecb986334cb test/jdk/com/sun/jdi/LaunchCommandLine.java --- a/test/jdk/com/sun/jdi/LaunchCommandLine.java Thu Feb 15 11:39:42 2018 -0800 +++ b/test/jdk/com/sun/jdi/LaunchCommandLine.java Fri Feb 16 11:22:53 2018 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2018, 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 @@ -27,7 +27,7 @@ * @summary Test launcher command line construction * @author Gordon Hirsch * - * @run build JDIScaffold VMConnection + * @run build TestScaffold VMConnection * @run compile -g HelloWorld.java * @run build LaunchCommandLine * @@ -39,14 +39,14 @@ import java.util.List; -public class LaunchCommandLine extends JDIScaffold { +public class LaunchCommandLine extends TestScaffold { public static void main(String args[]) throws Exception { new LaunchCommandLine(args).startTests(); } LaunchCommandLine(String args[]) { // args are set in code below - super(); + super(args); } protected void runTests() throws Exception { @@ -96,7 +96,7 @@ } // Allow application to complete - resumeToVMDeath(); + resumeToVMDisconnect(); } } diff -r d777541fceba -r 1ecb986334cb test/jdk/com/sun/jdi/ModificationWatchpoints.java --- a/test/jdk/com/sun/jdi/ModificationWatchpoints.java Thu Feb 15 11:39:42 2018 -0800 +++ b/test/jdk/com/sun/jdi/ModificationWatchpoints.java Fri Feb 16 11:22:53 2018 -0800 @@ -26,9 +26,9 @@ * @bug 4409582 * @summary Test all info returned by modification watchpoints * @author Daniel Prusa (or someone in the FFJ group) - * @author Robert Field (modified to JDIScaffold) + * @author Robert Field * - * @run build JDIScaffold VMConnection + * @run build TestScaffold VMConnection * @run compile -g ModificationWatchpoints.java * @run driver ModificationWatchpoints */ diff -r d777541fceba -r 1ecb986334cb test/jdk/com/sun/jdi/UnpreparedByName.java --- a/test/jdk/com/sun/jdi/UnpreparedByName.java Thu Feb 15 11:39:42 2018 -0800 +++ b/test/jdk/com/sun/jdi/UnpreparedByName.java Fri Feb 16 11:22:53 2018 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2018, 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 @@ -28,7 +28,7 @@ * won't be returned by classesByName. * @author Robert Field * - * @run build JDIScaffold VMConnection + * @run build TestScaffold VMConnection * @run compile -g InnerTarg.java * @run build UnpreparedByName * @@ -41,22 +41,18 @@ import java.util.List; import java.util.Iterator; -public class UnpreparedByName extends JDIScaffold { - final String[] args; +public class UnpreparedByName extends TestScaffold { public static void main(String args[]) throws Exception { new UnpreparedByName(args).startTests(); } UnpreparedByName(String args[]) throws Exception { - super(); - this.args = args; + super(args); } protected void runTests() throws Exception { - connect(args); - waitForVMStart(); - resumeTo("InnerTarg", "go", "()V"); + startTo("InnerTarg", "go", "()V"); List classes = vm().classesByName("InnerTarg$TheInner"); if (classes.size() == 0) { @@ -75,6 +71,6 @@ } // Allow application to complete - resumeToVMDeath(); + resumeToVMDisconnect(); } } diff -r d777541fceba -r 1ecb986334cb test/jdk/com/sun/jdi/UnpreparedClasses.java --- a/test/jdk/com/sun/jdi/UnpreparedClasses.java Thu Feb 15 11:39:42 2018 -0800 +++ b/test/jdk/com/sun/jdi/UnpreparedClasses.java Fri Feb 16 11:22:53 2018 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2018, 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 @@ -28,7 +28,7 @@ * loaded class list are prepared classes. * @author Robert Field * - * @run build JDIScaffold VMConnection + * @run build TestScaffold VMConnection * @run compile -g InnerTarg.java * @run build UnpreparedClasses * @@ -41,22 +41,18 @@ import java.util.List; import java.util.Iterator; -public class UnpreparedClasses extends JDIScaffold { - final String[] args; +public class UnpreparedClasses extends TestScaffold { public static void main(String args[]) throws Exception { new UnpreparedClasses(args).startTests(); } UnpreparedClasses(String args[]) throws Exception { - super(); - this.args = args; + super(args); } protected void runTests() throws Exception { - connect(args); - waitForVMStart(); - resumeTo("InnerTarg", "go", "()V"); + startTo("InnerTarg", "go", "()V"); List all = vm().allClasses(); for (Iterator it = all.iterator(); it.hasNext(); ) { @@ -73,6 +69,6 @@ } // Allow application to complete - resumeToVMDeath(); + resumeToVMDisconnect(); } } diff -r d777541fceba -r 1ecb986334cb test/jdk/com/sun/jdi/Vars.java --- a/test/jdk/com/sun/jdi/Vars.java Thu Feb 15 11:39:42 2018 -0800 +++ b/test/jdk/com/sun/jdi/Vars.java Fri Feb 16 11:22:53 2018 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2018, 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 @@ -26,7 +26,7 @@ * @summary Test Method.variables() and the like. * @author Robert Field * - * @run build JDIScaffold VMConnection + * @run build TestScaffold VMConnection * @run compile -g Vars.java * @run driver Vars */ @@ -68,14 +68,12 @@ /* * "Vars" test runs TestVars and makes LocalVariable queries */ -public class Vars extends JDIScaffold { - final String[] args; +public class Vars extends TestScaffold { boolean failed = false; Vars(String args[]) { - super(); - this.args = args; + super(args); } public static void main(String[] args) throws Exception { @@ -144,16 +142,10 @@ } protected void runTests() throws Exception { - List argList = new ArrayList(Arrays.asList(args)); - argList.add("TestVars"); - System.out.println("run args: " + argList); - connect((String[])argList.toArray(args)); - waitForVMStart(); - /* * Get to a point where the classes are loaded. */ - BreakpointEvent bp = resumeTo("TestVars", "hi", "()V"); + BreakpointEvent bp = startTo("TestVars", "hi", "()V"); /* * These classes should have no line numbers, except for @@ -196,7 +188,7 @@ test(method, ARGUMENTS, "normal/arguments", "sh,lo"); // Allow application to complete - resumeToVMDeath(); + resumeToVMDisconnect(); if (failed) { throw new Exception("Vars: failed");