forked from openhab/openhab-addons
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[modbus] Modbus osgi tests (openhab#6669)
* [modbus] itests for modbus - [modbus] OSGIfied tests - [modbus] bump itest snapshot version - [modbus] copyright -[modbus] plain assert converted to junit Assert - bump snapshot version in itest and resolve dependencies Signed-off-by: Sami Salonen <ssalonen@gmail.com>
- Loading branch information
1 parent
2fceb86
commit 7535a3b
Showing
11 changed files
with
670 additions
and
660 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" output="target/classes" path="src/main/java"> | ||
<attributes> | ||
<attribute name="optional" value="true"/> | ||
<attribute name="maven.pomderived" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="src" output="target/test-classes" path="src/test/java"> | ||
<attributes> | ||
<attribute name="optional" value="true"/> | ||
<attribute name="maven.pomderived" value="true"/> | ||
<attribute name="test" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"> | ||
<attributes> | ||
<attribute name="maven.pomderived" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> | ||
<attributes> | ||
<attribute name="maven.pomderived" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="output" path="target/classes"/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>org.openhab.binding.modbus.tests</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.m2e.core.maven2Builder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
<nature>org.eclipse.m2e.core.maven2Nature</nature> | ||
</natures> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
This content is produced and maintained by the openHAB project. | ||
|
||
* Project home: https://www.openhab.org | ||
|
||
== Declared Project Licenses | ||
|
||
This program and the accompanying materials are made available under the terms | ||
of the Eclipse Public License 2.0 which is available at | ||
https://www.eclipse.org/legal/epl-2.0/. | ||
|
||
== Source Code | ||
|
||
https://github.com/openhab/openhab2-addons |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
-include: ../itest-common.bndrun | ||
|
||
Bundle-SymbolicName: ${project.artifactId} | ||
Fragment-Host: org.openhab.binding.modbus | ||
|
||
-runrequires: \ | ||
bnd.identity;id='org.openhab.binding.modbus.tests',\ | ||
bnd.identity;id='org.openhab.core.binding.xml',\ | ||
bnd.identity;id='org.openhab.core.thing.xml',\ | ||
bnd.identity;id='ch.qos.logback.core',\ | ||
bnd.identity;id='ch.qos.logback.classic' | ||
|
||
# 1) We would like to use the "volatile" storage only, drop other storage | ||
# 2) We use logback (see logback.xml), drop others logging implementation | ||
# to avoid conflicts | ||
-runblacklist: \ | ||
bnd.identity;id='org.openhab.core.storage.json',\ | ||
bnd.identity;id='org.openhab.core.storage.mapdb',\ | ||
bnd.identity;id='slf4j.simple',\ | ||
bnd.identity;id='org.apache.log4j' | ||
|
||
-runproperties: \ | ||
logback.configurationFile=file:${.}/logback.xml | ||
|
||
# | ||
# done | ||
# | ||
-runbundles: \ | ||
javax.measure.unit-api;version='[1.0.0,1.0.1)',\ | ||
org.apache.commons.io;version='[2.2.0,2.2.1)',\ | ||
org.apache.commons.lang;version='[2.6.0,2.6.1)',\ | ||
org.apache.felix.configadmin;version='[1.9.8,1.9.9)',\ | ||
org.apache.felix.scr;version='[2.1.10,2.1.11)',\ | ||
org.eclipse.equinox.event;version='[1.4.300,1.4.301)',\ | ||
org.osgi.service.event;version='[1.4.0,1.4.1)',\ | ||
osgi.enroute.hamcrest.wrapper;version='[1.3.0,1.3.1)',\ | ||
osgi.enroute.junit.wrapper;version='[4.12.0,4.12.1)',\ | ||
org.openhab.core;version='[2.5.0,2.5.1)',\ | ||
org.openhab.core.config.core;version='[2.5.0,2.5.1)',\ | ||
org.objenesis;version='[2.6.0,2.6.1)',\ | ||
org.openhab.core.config.discovery;version='[2.5.0,2.5.1)',\ | ||
org.openhab.core.io.console;version='[2.5.0,2.5.1)',\ | ||
org.openhab.core.thing;version='[2.5.0,2.5.1)',\ | ||
slf4j.api;version='[1.7.25,1.7.26)',\ | ||
com.google.gson;version='[2.8.2,2.8.3)',\ | ||
org.apache.servicemix.specs.activation-api-1.1;version='[2.9.0,2.9.1)',\ | ||
org.apache.servicemix.specs.jaxb-api-2.2;version='[2.9.0,2.9.1)',\ | ||
org.apache.servicemix.specs.stax-api-1.2;version='[2.9.0,2.9.1)',\ | ||
tec.uom.lib.uom-lib-common;version='[1.0.3,1.0.4)',\ | ||
tec.uom.se;version='[1.0.10,1.0.11)',\ | ||
org.apache.servicemix.bundles.jaxb-impl;version='[2.2.11,2.2.12)',\ | ||
net.bytebuddy.byte-buddy;version='[1.9.10,1.9.11)',\ | ||
net.bytebuddy.byte-buddy-agent;version='[1.9.10,1.9.11)',\ | ||
org.mockito.mockito-core;version='[3.1.0,3.1.1)',\ | ||
com.neuronrobotics.nrjavaserial;version='[3.15.0,3.15.1)',\ | ||
org.apache.commons.pool2;version='[2.4.3,2.4.4)',\ | ||
org.openhab.core.transform;version='[2.5.0,2.5.1)',\ | ||
org.apache.felix.http.servlet-api;version='[1.1.2,1.1.3)',\ | ||
org.eclipse.jetty.http;version='[9.4.20,9.4.21)',\ | ||
org.eclipse.jetty.io;version='[9.4.20,9.4.21)',\ | ||
org.eclipse.jetty.security;version='[9.4.20,9.4.21)',\ | ||
org.eclipse.jetty.server;version='[9.4.20,9.4.21)',\ | ||
org.eclipse.jetty.servlet;version='[9.4.20,9.4.21)',\ | ||
org.eclipse.jetty.util;version='[9.4.20,9.4.21)',\ | ||
org.openhab.core.test;version='[2.5.0,2.5.1)',\ | ||
org.apache.servicemix.bundles.xstream;version='[1.4.7,1.4.8)',\ | ||
org.openhab.core.binding.xml;version='[2.5.0,2.5.1)',\ | ||
org.openhab.core.config.xml;version='[2.5.0,2.5.1)',\ | ||
org.openhab.core.thing.xml;version='[2.5.0,2.5.1)',\ | ||
ch.qos.logback.core;version='[1.2.3,1.2.4)',\ | ||
ch.qos.logback.classic;version='[1.2.3,1.2.4)',\ | ||
org.openhab.binding.modbus;version='[2.5.3,2.5.4)',\ | ||
org.openhab.binding.modbus.tests;version='[2.5.3,2.5.4)',\ | ||
org.openhab.io.transport.modbus;version='[2.5.3,2.5.4)' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<configuration debug="true"> | ||
|
||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> | ||
<encoder> | ||
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> | ||
</encoder> | ||
</appender> | ||
|
||
<logger name="org.openhab.binding.modbus" level="trace" /> | ||
<logger name="org.openhab.binding.modbus.tests" level="trace" /> | ||
<logger name="org.openhab.io.transport.modbus" level="trace" /> | ||
<logger name="net.wimpi.modbus" level="trace" /> | ||
<logger name="org.eclipse.smarthome.core.internal.items.ItemUpdater" level="trace" /> | ||
<logger name="org.eclipse.smarthome.core.internal.items.ItemStateConverterImpl" level="debug" /> | ||
|
||
<root level="info"> | ||
<appender-ref ref="STDOUT" /> | ||
</root> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<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.openhab.addons.itests</groupId> | ||
<artifactId>org.openhab.addons.reactor.itests</artifactId> | ||
<version>2.5.3-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>org.openhab.binding.modbus.tests</artifactId> | ||
|
||
<name>openHAB Add-ons :: Integration Tests :: Modbus Binding Tests</name> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.openhab.addons.bundles</groupId> | ||
<artifactId>org.openhab.binding.modbus</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.openhab.addons.bundles</groupId> | ||
<artifactId>org.openhab.io.transport.modbus</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
</project> |
Oops, something went wrong.