--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright (C) 2015 Red Hat, Inc. and others. All rights reserved.
+
+This program and the accompanying materials are made available under the
+terms of the Eclipse Public License v1.0 which accompanies this distribution,
+and is available at http://www.eclipse.org/legal/epl-v10.html
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>mdsal-it-parent</artifactId>
+ <version>1.3.0-SNAPSHOT</version>
+ <relativePath/>
+ </parent>
+
+ <groupId>org.opendaylight.ovsdb</groupId>
+ <artifactId>it</artifactId>
+ <version>1.2.1-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <description>The OVSDB Plugin integration project is a project for OpenDaylight that will implement the Open vSwitch Database RFC 7047 management protocol allowing the Southbound configuration of vSwitches and a network virtualization implementation.</description>
+ <url>https://wiki.opendaylight.org/view/OVSDB_Integration:Main</url>
+ <licenses>
+ <license>
+ <name>Eclipse Public License v1.0</name>
+ <url>http://www.eclipse.org/legal/epl-v10.html</url>
+ </license>
+ </licenses>
+ <developers>
+ <developer>
+ <name>Sam Hague</name>
+ <email>shague@gmail.com</email>
+ <url>https://github.com/shague</url>
+ </developer>
+ </developers>
+ <scm>
+ <connection>scm:git:ssh://git.opendaylight.org:29418/ovsdb.git</connection>
+ <developerConnection>scm:git:ssh://git.opendaylight.org:29418/ovsdb.git</developerConnection>
+ <tag>HEAD</tag>
+ <url>https://wiki.opendaylight.org/view/OVSDB_Integration:Main</url>
+ </scm>
+
+ <prerequisites>
+ <maven>3.1.1</maven>
+ </prerequisites>
+
+ <profiles>
+ <profile>
+ <id>default</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <properties>
+ <skipITs>true</skipITs>
+ </properties>
+ </profile>
+ <profile>
+ <id>integrationtest</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <properties>
+ <skipITs>false</skipITs>
+ </properties>
+ </profile>
+ </profiles>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.codehaus.sonar-plugins.java</groupId>
+ <artifactId>sonar-jacoco-listeners</artifactId>
+ <version>${sonar-jacoco-listeners.version}</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <configuration>
+ <properties>
+ <property>
+ <name>listener</name>
+ <value>org.sonar.java.jacoco.JUnitListener</value>
+ </property>
+ </properties>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>prep-jacoco-agent</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target>
+ <copy file="${settings.localRepository}/org/jacoco/org.jacoco.agent/${jacoco.version}/org.jacoco.agent-${jacoco.version}-runtime.jar"
+ tofile="target/exam/jars/org.jacoco.agent.jar" />
+ </target>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
</prerequisites>
<modules>
<module>parent</module>
+ <module>it</module>
</modules>
</project>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>mdsal-it-parent</artifactId>
- <version>1.3.0-SNAPSHOT</version>
- <relativePath/>
+ <groupId>org.opendaylight.ovsdb</groupId>
+ <artifactId>it</artifactId>
+ <version>1.2.1-SNAPSHOT</version>
+ <relativePath>../../commons/it</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.opendaylight.ovsdb</groupId>
<tag>HEAD</tag>
<url>https://wiki.opendaylight.org/view/OVSDB_Integration:Main</url>
</scm>
- <properties>
- <sonar-jacoco-listeners.version>2.4</sonar-jacoco-listeners.version>
- <root.directory>${env.PWD}</root.directory>
- <sonar.jacoco.itReportPath>${root.directory}/target/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath>
- </properties>
<dependencyManagement>
<dependencies>
<dependency>
<dependency>
<groupId>org.codehaus.sonar-plugins.java</groupId>
<artifactId>sonar-jacoco-listeners</artifactId>
- <version>${sonar-jacoco-listeners.version}</version>
<scope>test</scope>
</dependency>
<!-- AbstractConfigTestBase::getKarafDistro() needs this to find its version -->
</dependencies>
<build>
<plugins>
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
- <configuration>
- <!-- Specific to generate mapping between tests and covered code -->
- <!--<argLine>${jacoco.agent.it.arg}</argLine>-->
- <properties>
- <property>
- <name>listener</name>
- <value>org.sonar.java.jacoco.JUnitListener</value>
- </property>
- </properties>
- <!-- Let's put failsafe reports with surefire to have access to tests failures/success reports in sonar -->
- <!--<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>-->
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>integration-test</goal>
- <goal>verify</goal>
- </goals>
- <configuration>
- <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
- <skipTests>${skip.integrationtest}</skipTests>
- </configuration>
- </execution>
- </executions>
</plugin>
<!-- Needed if you use versionAsInProject() -->
<plugin>
<excludes>**/yang/</excludes>
</configuration>
</plugin>-->
- <plugin>
- <groupId>org.jacoco</groupId>
- <artifactId>jacoco-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>prepare-ut-agent</id>
- <goals>
- <goal>prepare-agent</goal>
- </goals>
- <configuration>
- <destFile>${sonar.jacoco.reportPath}</destFile>
- </configuration>
- </execution>
- <execution>
- <id>prepare-it-agent</id>
- <goals>
- <goal>prepare-agent-integration</goal>
- </goals>
- <configuration>
- <append>true</append>
- <destFile>${sonar.jacoco.itReportPath}</destFile>
- </configuration>
- </execution>
- <execution>
- <id>default-report</id>
- <goals>
- <goal>report</goal>
- </goals>
- <configuration>
- <dataFile>${sonar.jacoco.reportPath}</dataFile>
- </configuration>
- </execution>
- <execution>
- <id>default-report-integration</id>
- <goals>
- <goal>report-integration</goal>
- </goals>
- <configuration>
- <dataFile>${sonar.jacoco.itReportPath}</dataFile>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <!-- Specific to generate mapping between tests and covered code -->
- <!--<argLine>${jacoco.agent.ut.arg}</argLine>-->
- <properties>
- <property>
- <name>listener</name>
- <value>org.sonar.java.jacoco.JUnitListener</value>
- </property>
- </properties>
- <!-- Let's put failsafe reports with surefire to have access to tests failures/success reports in sonar -->
- <!--<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>-->
- </configuration>
- </plugin>
</plugins>
</build>
<profiles>
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;
// 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()
</scm>
<properties>
+ <liblldp.version>0.10.0-SNAPSHOT</liblldp.version>
<networkconfig.neutron.version>0.6.0-SNAPSHOT</networkconfig.neutron.version>
<openflowjava-nicira.version>0.2.0-SNAPSHOT</openflowjava-nicira.version>
<openflowplugin.version>0.2.0-SNAPSHOT</openflowplugin.version>
<ovsdb.utils.mdsal.openflow.version>1.2.1-SNAPSHOT</ovsdb.utils.mdsal.openflow.version>
<ovsdb.utils.servicehelper.version>1.2.1-SNAPSHOT</ovsdb.utils.servicehelper.version>
<powermock.version>1.5.2</powermock.version>
- <sonar-jacoco-listeners.version>2.4</sonar-jacoco-listeners.version>
- <liblldp.version>0.10.0-SNAPSHOT</liblldp.version>
- <root.directory>${env.PWD}</root.directory>
- <sonar.jacoco.itReportPath>${root.directory}/target/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath>
+ <sonar.jacoco.itReportPath>../net-virt-it/target/jacoco-it.exec</sonar.jacoco.itReportPath>
</properties>
<dependencyManagement>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-failsafe-plugin</artifactId>
- <configuration>
- <!-- Specific to generate mapping between tests and covered code -->
- <!--<argLine>${jacoco.agent.it.arg}</argLine>-->
- <properties>
- <property>
- <name>listener</name>
- <value>org.sonar.java.jacoco.JUnitListener</value>
- </property>
- </properties>
- <!-- Let's put failsafe reports with surefire to have access to tests failures/success reports in sonar -->
- <!--<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>-->
- </configuration>
- </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <!-- Specific to generate mapping between tests and covered code -->
- <!--<argLine>${jacoco.agent.ut.arg}</argLine>-->
<properties>
<property>
<name>listener</name>
<value>org.sonar.java.jacoco.JUnitListener</value>
</property>
</properties>
- <!-- Let's put failsafe reports with surefire to have access to tests failures/success reports in sonar -->
- <!--<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>-->
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>prepare-ut-agent</id>
- <goals>
- <goal>prepare-agent</goal>
- </goals>
- <configuration>
- <destFile>${sonar.jacoco.reportPath}</destFile>
- </configuration>
- </execution>
- <execution>
- <id>prepare-it-agent</id>
- <goals>
- <goal>prepare-agent-integration</goal>
- </goals>
- <configuration>
- <append>true</append>
- <destFile>${sonar.jacoco.itReportPath}</destFile>
- </configuration>
- </execution>
- <execution>
- <id>default-report</id>
- <goals>
- <goal>report</goal>
- </goals>
- <configuration>
- <dataFile>${sonar.jacoco.reportPath}</dataFile>
- </configuration>
- </execution>
- <execution>
- <id>default-report-integration</id>
- <goals>
- <goal>report-integration</goal>
- </goals>
- <configuration>
- <dataFile>${sonar.jacoco.itReportPath}</dataFile>
- </configuration>
- </execution>
- </executions>
</plugin>
</plugins>
</build>
<artifactId>openstack.net-virt-sfc-impl</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>bundle</packaging>
+
+ <properties>
+ <sonar.jacoco.itReportPath>../it/target/jacoco-it.exec</sonar.jacoco.itReportPath>
+ </properties>
+
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
-
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.codehaus.sonar-plugins.java</groupId>
+ <artifactId>sonar-jacoco-listeners</artifactId>
+ <version>${sonar-jacoco-listeners.version}</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <properties>
+ <property>
+ <name>listener</name>
+ <value>org.sonar.java.jacoco.JUnitListener</value>
+ </property>
+ </properties>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
</project>
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>mdsal-it-parent</artifactId>
- <version>1.3.0-SNAPSHOT</version>
- <relativePath/>
+ <groupId>org.opendaylight.ovsdb</groupId>
+ <artifactId>it</artifactId>
+ <version>1.2.1-SNAPSHOT</version>
+ <relativePath>../../../commons/it</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.opendaylight.ovsdb</groupId>
<artifactId>openstack.net-virt-sfc-it</artifactId>
<version>1.0.0-SNAPSHOT</version>
- <packaging>bundle</packaging>
+ <packaging>jar</packaging>
<properties>
- <skipITs>false</skipITs>
<karaf.distro.groupId>org.opendaylight.ovsdb</karaf.distro.groupId>
<karaf.distro.artifactId>openstack.net-virt-sfc-karaf</karaf.distro.artifactId>
<karaf.distro.version>1.0.0-SNAPSHOT</karaf.distro.version>
</properties>
</profile>
</profiles>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+
</project>
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.karaf.options.KarafDistributionOption.editConfigurationFilePut;
+import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.keepRuntimeFolder;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.opendaylight.controller.mdsal.it.base.AbstractMdsalTestBase;
+import org.ops4j.pax.exam.Configuration;
import org.ops4j.pax.exam.Option;
import org.ops4j.pax.exam.junit.PaxExam;
import org.ops4j.pax.exam.karaf.options.LogLevelOption.LogLevel;
return "odl-ovsdb-sfc-ui";
}
+ @Configuration
+ @Override
+ public Option[] config() {
+ Option[] parentOptions = super.config();
+ Option[] otherOptions = getOtherOptions();
+ Option[] options = new Option[parentOptions.length + otherOptions.length];
+ System.arraycopy(parentOptions, 0, options, 0, parentOptions.length);
+ System.arraycopy(otherOptions, 0, options, parentOptions.length, otherOptions.length);
+ return options;
+ }
+
+ private Option[] getOtherOptions() {
+ return new Option[] {
+ vmOption("-javaagent:../jars/org.jacoco.agent.jar=destfile=../../jacoco-it.exec"),
+ keepRuntimeFolder()
+ };
+ }
+
@Override
public Option getLoggingOption() {
Option option = editConfigurationFilePut(ORG_OPS4J_PAX_LOGGING_CFG,
<ovsdb.utils.config.version>1.2.1-SNAPSHOT</ovsdb.utils.config.version>
<ovsdb.utils.servicehelper.version>1.2.1-SNAPSHOT</ovsdb.utils.servicehelper.version>
<powermock.version>1.5.2</powermock.version>
- <sonar-jacoco-listeners.version>2.4</sonar-jacoco-listeners.version>
- <root.directory>${env.PWD}</root.directory>
- <sonar.jacoco.itReportPath>${root.directory}/target/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath>
+ <sonar.jacoco.itReportPath>../net-virt-it/target/jacoco-it.exec</sonar.jacoco.itReportPath>
</properties>
<dependencyManagement>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-failsafe-plugin</artifactId>
- <configuration>
- <!-- Specific to generate mapping between tests and covered code -->
- <!--<argLine>${jacoco.agent.it.arg}</argLine>-->
- <properties>
- <property>
- <name>listener</name>
- <value>org.sonar.java.jacoco.JUnitListener</value>
- </property>
- </properties>
- <!-- Let's put failsafe reports with surefire to have access to tests failures/success reports in sonar -->
- <!--<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>-->
- </configuration>
- </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <!-- Specific to generate mapping between tests and covered code -->
- <!--<argLine>${jacoco.agent.ut.arg}</argLine>-->
<properties>
<property>
<name>listener</name>
<value>org.sonar.java.jacoco.JUnitListener</value>
</property>
</properties>
- <!-- Let's put failsafe reports with surefire to have access to tests failures/success reports in sonar -->
- <!--<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>-->
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>prepare-ut-agent</id>
- <goals>
- <goal>prepare-agent</goal>
- </goals>
- <configuration>
- <destFile>${sonar.jacoco.reportPath}</destFile>
- </configuration>
- </execution>
- <execution>
- <id>prepare-it-agent</id>
- <goals>
- <goal>prepare-agent-integration</goal>
- </goals>
- <configuration>
- <append>true</append>
- <destFile>${sonar.jacoco.itReportPath}</destFile>
- </configuration>
- </execution>
- <execution>
- <id>default-report</id>
- <goals>
- <goal>report</goal>
- </goals>
- <configuration>
- <dataFile>${sonar.jacoco.reportPath}</dataFile>
- </configuration>
- </execution>
- <execution>
- <id>default-report-integration</id>
- <goals>
- <goal>report-integration</goal>
- </goals>
- <configuration>
- <dataFile>${sonar.jacoco.itReportPath}</dataFile>
- </configuration>
- </execution>
- </executions>
</plugin>
</plugins>
</build>
- </project>
+</project>