JDWP: allow to set debuggee classpath
Adds property 'jpda.settings.debuggeeClasspath' to override the
classpath set for the debuggee (by default, this is the classpath
of the process starting the debuggee).
This is a convenient way to run the junit tests with java runtime
(in an IDE for instance) while the debuggee still runs on ART
runtime.
Bug: 36712802
Test: manual
Change-Id: I30c94bf8c8fed7ddc8adb9f04b528522268eb5ff
diff --git a/jdwp/src/test/java/org/apache/harmony/jpda/tests/framework/TestOptions.java b/jdwp/src/test/java/org/apache/harmony/jpda/tests/framework/TestOptions.java
index 59f3282..3070dd9 100644
--- a/jdwp/src/test/java/org/apache/harmony/jpda/tests/framework/TestOptions.java
+++ b/jdwp/src/test/java/org/apache/harmony/jpda/tests/framework/TestOptions.java
@@ -47,6 +47,8 @@
* - name of agent native library
* <li><code>jpda.settings.debuggeeAgentExtraOptions</code>
* - extra options for agent
+ * <li><code>jpda.settings.debuggeeClasspath</code>
+ * - classpath to run debuggee with
* <li><code>jpda.settings.debuggeeClassName</code>
* - full name of class to run debuggee with
* <li><code>jpda.settings.debuggeeVMExtraOptions</code>
@@ -221,10 +223,11 @@
/**
* Returns VM classpath value to run debuggee with.
*
- * @return system property "java.class.path" by default.
+ * @return option "jpda.settings.debuggeeClasspath" or system property "java.class.path" by
+ * default.
*/
public String getDebuggeeClassPath() {
- return getProperty("java.class.path", null);
+ return getProperty("jpda.settings.debuggeeClasspath", getProperty("java.class.path", null));
}
/**