aboutsummaryrefslogtreecommitdiffstats
path: root/plugin/icedteanp
diff options
context:
space:
mode:
authorJiri Vanek <[email protected]>2012-12-11 20:32:26 +0100
committerJiri Vanek <[email protected]>2012-12-11 20:32:26 +0100
commit9f073ba18f90391ac45ca8f8f8df1ae7516b90f9 (patch)
treece4654016af42b3dc4e6447c16c75ddb8ce32bab /plugin/icedteanp
parent8bbf9daa0e72001d56ae9fd9aa50cc92e1643695 (diff)
Added jacoco code coverage support
Note - in time of this commit one needs custom build of jacoco containing the xboot.patch form approving discussion: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121127/ba8f6a1e/xboot-0001.patch The tracking of upstraming can be found on jacoco page.
Diffstat (limited to 'plugin/icedteanp')
-rw-r--r--plugin/icedteanp/IcedTeaNPPlugin.cc55
1 files changed, 24 insertions, 31 deletions
diff --git a/plugin/icedteanp/IcedTeaNPPlugin.cc b/plugin/icedteanp/IcedTeaNPPlugin.cc
index 48678f5..763120d 100644
--- a/plugin/icedteanp/IcedTeaNPPlugin.cc
+++ b/plugin/icedteanp/IcedTeaNPPlugin.cc
@@ -1594,20 +1594,28 @@ plugin_start_appletviewer (ITNPPluginData* data)
gchar** environment = NULL;
std::vector<std::string*>* jvm_args = get_jvm_args();
- if (plugin_debug)
+ // Construct command line parameters
+
+ command_line.push_back(appletviewer_executable);
+
+ //Add JVM args to command_line
+ for (int i = 0; i < jvm_args->size(); i++)
{
- command_line.push_back(appletviewer_executable);
+ command_line.push_back(*jvm_args->at(i));
+ }
- //Add JVM args to command_line
- for (int i = 0; i < jvm_args->size(); i++)
- {
- command_line.push_back(*jvm_args->at(i));
- }
+ command_line.push_back(PLUGIN_BOOTCLASSPATH);
+ // set the classpath to avoid using the default (cwd).
+ command_line.push_back("-classpath");
+ command_line.push_back(ICEDTEA_WEB_JRE "/lib/rt.jar");
+
+ // Enable coverage agent if we are running instrumented plugin
+#ifdef COVERAGE_AGENT
+ command_line.push_back(COVERAGE_AGENT);
+#endif
- command_line.push_back(PLUGIN_BOOTCLASSPATH);
- // set the classpath to avoid using the default (cwd).
- command_line.push_back("-classpath");
- command_line.push_back(ICEDTEA_WEB_JRE "/lib/rt.jar");
+ if (plugin_debug)
+ {
command_line.push_back("-Xdebug");
command_line.push_back("-Xnoagent");
@@ -1615,28 +1623,13 @@ plugin_start_appletviewer (ITNPPluginData* data)
std::string debug_flags = "-Xrunjdwp:transport=dt_socket,address=8787,server=y,";
debug_flags += plugin_debug_suspend ? "suspend=y" : "suspend=n";
command_line.push_back(debug_flags);
+ }
- command_line.push_back("sun.applet.PluginMain");
- command_line.push_back(out_pipe_name);
- command_line.push_back(in_pipe_name);
- } else
- {
- command_line.push_back(std::string(appletviewer_executable));
-
- //Add JVM args to command_line
- for (int i = 0; i < jvm_args->size(); i++)
- {
- command_line.push_back(*jvm_args->at(i));
- }
-
- command_line.push_back(PLUGIN_BOOTCLASSPATH);
- command_line.push_back("-classpath");
- command_line.push_back(ICEDTEA_WEB_JRE "/lib/rt.jar");
- command_line.push_back("sun.applet.PluginMain");
- command_line.push_back(out_pipe_name);
- command_line.push_back(in_pipe_name);
+ command_line.push_back("sun.applet.PluginMain");
+ command_line.push_back(out_pipe_name);
+ command_line.push_back(in_pipe_name);
- }
+ // Finished command line parameters
environment = plugin_filter_environment();
std::vector<gchar*> vector_gchar = IcedTeaPluginUtilities::vectorStringToVectorGchar(&command_line);