8219714: [testbug] com/sun/jdi/RedefineNestmateAttr/TestNestmateAttr.java must pass classpath to subprocess
authorgoetz
Thu, 28 Feb 2019 13:53:38 +0100
changeset 53952 3ccf7e10ba07
parent 53951 56089cf6152c
child 53953 235b0e817c32
8219714: [testbug] com/sun/jdi/RedefineNestmateAttr/TestNestmateAttr.java must pass classpath to subprocess Reviewed-by: dholmes, dcubed
test/jdk/com/sun/jdi/RedefineNestmateAttr/TestNestmateAttr.java
--- a/test/jdk/com/sun/jdi/RedefineNestmateAttr/TestNestmateAttr.java	Tue Feb 26 05:46:02 2019 -0800
+++ b/test/jdk/com/sun/jdi/RedefineNestmateAttr/TestNestmateAttr.java	Thu Feb 28 13:53:38 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 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
@@ -212,6 +212,8 @@
     protected void startUp(String targetName) {
         List<String> argList = new ArrayList<>(Arrays.asList(args));
         argList.add(0, targetName); // pre-pend so it becomes the first "app" arg
+        // We need the class path that contains the path to jdk.test.lib.Asserts.
+        argList.add(0, " -cp " + System.getProperty("test.class.path"));
         println("run args: " + argList);
         connect((String[]) argList.toArray(args));
         waitForVMStart();