Fix sonar integration test reporting
[ovsdb.git] / openstack / net-virt-it / src / test / java / org / opendaylight / ovsdb / openstack / netvirt / it / NetvirtIT.java
index 9d8cab55e70c7495006d1891a895e212004ebd80..43fbb78ef9f7a7774e635453ece2139a7204aaec 100644 (file)
@@ -10,6 +10,7 @@ package org.opendaylight.ovsdb.openstack.netvirt.it;
 import static org.junit.Assert.fail;
 import static org.ops4j.pax.exam.CoreOptions.composite;
 import static org.ops4j.pax.exam.CoreOptions.maven;
+import static org.ops4j.pax.exam.CoreOptions.vmOption;
 import static org.ops4j.pax.exam.CoreOptions.when;
 import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFilePut;
 import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.features;
@@ -114,12 +115,22 @@ public class NetvirtIT extends AbstractMdsalTestBase {
                 // Works only if we don't specify the feature repo and name
                 getLoggingOption()};
         Option[] propertyOptions = getPropertiesOptions();
-        Option[] combinedOptions = new Option[options.length + propertyOptions.length];
+        Option[] otherOptions = getOtherOptions();
+        Option[] combinedOptions = new Option[options.length + propertyOptions.length + otherOptions.length];
         System.arraycopy(options, 0, combinedOptions, 0, options.length);
         System.arraycopy(propertyOptions, 0, combinedOptions, options.length, propertyOptions.length);
+        System.arraycopy(otherOptions, 0, combinedOptions, options.length + propertyOptions.length,
+                otherOptions.length);
         return combinedOptions;
     }
 
+    private Option[] getOtherOptions() {
+        return new Option[] {
+                vmOption("-javaagent:../jars/org.jacoco.agent.jar=destfile=../../jacoco-it.exec"),
+                keepRuntimeFolder()
+        };
+    }
+
     @Override
     public String getKarafDistro() {
         return maven()