4916621: Update those still using JDIScaffold to use TestScaffold instead.
authorpsomashe
Fri, 16 Feb 2018 11:22:53 -0800
changeset 49009 1ecb986334cb
parent 49008 d777541fceba
child 49010 9010e596f391
4916621: Update those still using JDIScaffold to use TestScaffold instead. Summary: update remaining tests using JDIScaffold to using TestScaffold instead. Reviewed-by: sspitsyn, cjplummer
test/jdk/com/sun/jdi/LaunchCommandLine.java
test/jdk/com/sun/jdi/ModificationWatchpoints.java
test/jdk/com/sun/jdi/UnpreparedByName.java
test/jdk/com/sun/jdi/UnpreparedClasses.java
test/jdk/com/sun/jdi/Vars.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();
     }
 
 }
--- 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
  */
--- 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();
     }
 }
--- 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();
     }
 }
--- 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");