Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 46 additions & 3 deletions itests/tck/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,24 @@

<build>
<plugins>
<!-- copy dependencies to a folder for the bnd indexer to index -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>prepare-package</phase>
<goals><goal>copy-dependencies</goal></goals>
<configuration>
<outputDirectory>${project.build.directory}/dependency</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<!-- create an index from the dependencies folder that will be used
both for the resolve below and for the 'latest' version in the
second container's bundles property -->
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-indexer-maven-plugin</artifactId>
Expand All @@ -258,12 +276,37 @@
<executions>
<execution>
<id>index</id>
<goals>
<goal>index</goal>
</goals>
<phase>package</phase>
<goals><goal>local-index</goal></goals>
<configuration>
<inputDir>${project.build.directory}/dependency</inputDir>
<outputFile>${project.build.directory}/index.xml</outputFile>
</configuration>
</execution>
</executions>
</plugin>
<!-- resolve the runrequires list in the bndrun files and update the
runbundles list automatically with the appropriate bundles and versions -->
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-resolver-maven-plugin</artifactId>
<version>${bnd.version}</version>
<executions>
<execution>
<id>resolve</id>
<goals><goal>resolve</goal></goals>
<phase>package</phase>
</execution>
</executions>
<configuration>
<failOnChanges>false</failOnChanges>
<bndruns>
<bndrun>tck-tcp-tcp.bndrun</bndrun>
<bndrun>tck-zookeeper-fastbin.bndrun</bndrun>
</bndruns>
</configuration>
</plugin>
<!-- run the tests via the bndrun files -->
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-testing-maven-plugin</artifactId>
Expand Down
142 changes: 89 additions & 53 deletions itests/tck/tck-tcp-tcp.bndrun
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,23 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#-standalone: target/index.xml


# runs the TCK test suite with TCP discovery and TCP distribution provider
#
# The first container's bundles are specified via the runbundles property,
# which the bnd resolve plugin generates/updates based on the runrequires property
# and the dependency index generated by the bnd index plugin. This container is
# where the tests are run.
#
# The second container is configured by the TCK code itself which copies them
# from the first container's org.osgi.test.cases.remoteserviceadmin properties
# to the second container. In particual, it copies the bundles list to install
# in the child container, specified using the repo macro with the latest version
# from the index. This container then runs various tbN.jar bundles from the tests
# to set up and assert the child container for each test.

-standalone: target/index.xml

-runtrace: true

Expand All @@ -39,28 +51,28 @@
junit.framework",\
org.osgi.test.cases.remoteserviceadmin.serverconfig="service.exported.configs",\
org.osgi.test.cases.remoteserviceadmin.bundles="\
${repo;org.ops4j.pax.logging.pax-logging-api;2.3.3},\
${repo;org.ops4j.pax.logging.pax-logging-log4j2;2.3.3},\
${repo;org.osgi.service.component;1.5.1},\
${repo;org.osgi.util.function;1.2.0},\
${repo;org.osgi.util.promise;1.3.0},\
${repo;org.apache.felix.scr;2.2.18},\
${repo;org.apache.felix.fileinstall;3.7.4},\
${repo;org.apache.felix.configadmin;1.9.26},\
${repo;org.apache.felix.eventadmin;1.6.4},\
${repo;org.glassfish.hk2.osgi-resource-locator;3.0.0},\
${repo;org.apache.servicemix.bundles.junit;4.13.2},\
${repo;jakarta.activation-api;2.1.4},\
${repo;jakarta.xml.bind-api;4.0.5},\
${repo;com.sun.xml.bind.jaxb-core;4.0.8},\
${repo;com.sun.xml.bind.jaxb-impl;4.0.8},\
${repo;com.sun.istack.commons-runtime;4.2.0},\
${repo;org.apache.aries.rsa.spi;2.0.0.SNAPSHOT},\
${repo;org.apache.aries.rsa.discovery.local;2.0.0.SNAPSHOT},\
${repo;org.apache.aries.rsa.discovery.tcp;2.0.0.SNAPSHOT},\
${repo;org.apache.aries.rsa.provider.tcp;2.0.0.SNAPSHOT},\
${repo;org.apache.aries.rsa.core;2.0.0.SNAPSHOT},\
${repo;org.apache.aries.rsa.topology-manager;2.0.0.SNAPSHOT}",\
${repo;org.ops4j.pax.logging.pax-logging-api;latest},\
${repo;org.ops4j.pax.logging.pax-logging-log4j2;latest},\
${repo;org.osgi.service.component;latest},\
${repo;org.osgi.util.function;latest},\
${repo;org.osgi.util.promise;latest},\
${repo;org.apache.felix.scr;latest},\
${repo;org.apache.felix.fileinstall;latest},\
${repo;org.apache.felix.configadmin;latest},\
${repo;org.apache.felix.eventadmin;latest},\
${repo;org.glassfish.hk2.osgi-resource-locator;latest},\
${repo;org.apache.servicemix.bundles.junit;latest},\
${repo;jakarta.activation-api;latest},\
${repo;jakarta.xml.bind-api;latest},\
${repo;com.sun.xml.bind.jaxb-core;latest},\
${repo;com.sun.xml.bind.jaxb-impl;latest},\
${repo;com.sun.istack.commons-runtime;latest},\
${repo;org.apache.aries.rsa.spi;latest},\
${repo;org.apache.aries.rsa.discovery.local;latest},\
${repo;org.apache.aries.rsa.discovery.tcp;latest},\
${repo;org.apache.aries.rsa.provider.tcp;latest},\
${repo;org.apache.aries.rsa.core;latest},\
${repo;org.apache.aries.rsa.topology-manager;latest}",\
felix.fileinstall.dir=${.}/configs/framework1,\
felix.fileinstall.noInitialDelay=true,\
org.apache.aries.rsa.bridge=true,\
Expand All @@ -80,35 +92,59 @@
javax.xml.stream.util; version=1.0
-runfw: org.eclipse.osgi;version='[3.24.100,3.24.101)'
-runee: JavaSE-${java.specification.version}
-runrequires:\
osgi.identity;filter:='(osgi.identity=org.osgi.test.cases.remoteserviceadmin)',\
osgi.identity;filter:='(osgi.identity=org.apache.aries.rsa.topology-manager)',\
osgi.identity;filter:='(osgi.identity=org.ops4j.pax.logging.pax-logging-log4j2)'
-runblacklist:\
osgi.identity;filter:='(osgi.identity=osgi.cmpn)'
-runbundles:\
org.ops4j.pax.logging.pax-logging-api;version='[2.3.3,2.3.4)',\
org.ops4j.pax.logging.pax-logging-log4j2;version='[2.3.3,2.3.4)',\
org.osgi.service.component;version='[1.5.1,1.5.2)',\
org.osgi.util.function;version='[1.2.0,1.2.1)',\
org.osgi.util.promise;version='[1.3.0,1.3.1)',\
org.apache.felix.scr;version='[2.2.18,2.2.19)',\
org.apache.felix.fileinstall;version='[3.7.4,3.7.5)',\
org.apache.felix.configadmin;version='[1.9.26,1.9.27)',\
org.apache.felix.eventadmin;version='[1.6.4,1.6.5)',\
org.glassfish.hk2.osgi-resource-locator;version='[3.0.0,3.0.1)',\
org.apache.servicemix.bundles.junit;version='[4.13.2,4.13.3)',\
assertj-core;version='[3.27.7,3.27.8)',\
net.bytebuddy.byte-buddy;version='[1.18.8,1.18.9)',\
jakarta.activation-api;version='[2.1.4,2.1.5)',\
jakarta.xml.bind-api;version='[4.0.5,4.0.6)',\
com.sun.xml.bind.jaxb-core;version='[4.0.8,4.0.9)',\
com.sun.xml.bind.jaxb-impl;version='[4.0.8,4.0.9)',\
com.sun.istack.commons-runtime;version='[4.2.0,4.2.1)',\
org.apache.aries.rsa.spi;version='[2.0.0,2.0.1)',\
org.apache.aries.rsa.discovery.local;version='[2.0.0,2.0.1)',\
org.apache.aries.rsa.discovery.tcp;version='[2.0.0,2.0.1)',\
org.apache.aries.rsa.provider.tcp;version='[2.0.0,2.0.1)',\
org.apache.aries.rsa.core;version='[2.0.0,2.0.1)',\
org.apache.aries.rsa.topology-manager;version='[2.0.0,2.0.1)',\
org.osgi.test.cases.remoteserviceadmin;version='[8.1.0,8.1.1)'

-runrequires:\
osgi.identity;filter:='(osgi.identity=org.ops4j.pax.logging.pax-logging-api)',\
osgi.identity;filter:='(osgi.identity=org.ops4j.pax.logging.pax-logging-log4j2)',\
osgi.identity;filter:='(osgi.identity=org.osgi.service.component)',\
osgi.identity;filter:='(osgi.identity=org.osgi.util.function)',\
osgi.identity;filter:='(osgi.identity=org.osgi.util.promise)',\
osgi.identity;filter:='(osgi.identity=org.apache.felix.scr)',\
osgi.identity;filter:='(osgi.identity=org.apache.felix.fileinstall)',\
osgi.identity;filter:='(osgi.identity=org.apache.felix.configadmin)',\
osgi.identity;filter:='(osgi.identity=org.apache.felix.eventadmin)',\
osgi.identity;filter:='(osgi.identity=org.glassfish.hk2.osgi-resource-locator)',\
osgi.identity;filter:='(osgi.identity=org.apache.servicemix.bundles.junit)',\
osgi.identity;filter:='(osgi.identity=assertj-core)',\
osgi.identity;filter:='(osgi.identity=net.bytebuddy.byte-buddy)',\
osgi.identity;filter:='(osgi.identity=jakarta.activation-api)',\
osgi.identity;filter:='(osgi.identity=jakarta.xml.bind-api)',\
osgi.identity;filter:='(osgi.identity=com.sun.xml.bind.jaxb-core)',\
osgi.identity;filter:='(osgi.identity=com.sun.xml.bind.jaxb-impl)',\
osgi.identity;filter:='(osgi.identity=com.sun.istack.commons-runtime)',\
osgi.identity;filter:='(osgi.identity=org.apache.aries.rsa.spi)',\
osgi.identity;filter:='(osgi.identity=org.apache.aries.rsa.discovery.local)',\
osgi.identity;filter:='(osgi.identity=org.apache.aries.rsa.discovery.tcp)',\
osgi.identity;filter:='(osgi.identity=org.apache.aries.rsa.provider.tcp)',\
osgi.identity;filter:='(osgi.identity=org.apache.aries.rsa.core)',\
osgi.identity;filter:='(osgi.identity=org.apache.aries.rsa.topology-manager)',\
osgi.identity;filter:='(osgi.identity=org.osgi.test.cases.remoteserviceadmin)'

-runbundles: \
assertj-core;version='[3.27.7,3.27.8)',\
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we set here less strict versions? I mean [major.minor,major+1] - this file needs also changes when depdnency version is updated so it may make the update less fragile
also the same in the next file

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if it works as expected, the runbundles property is rewritten by the bnd maven plugin with the versions from the pom - there shouldn't be any need to change versions manually.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I tested locally - when you set the new version

-        <jaxb.version>4.0.8</jaxb.version>
+        <jaxb.version>4.0.9</jaxb.version>

as in #125
then bndrun files are indeed rewritten, but those are not committed:

diff --git i/itests/tck/tck-tcp-tcp.bndrun w/itests/tck/tck-tcp-tcp.bndrun
index c6b68bf1..9052378b 100644
--- i/itests/tck/tck-tcp-tcp.bndrun
+++ w/itests/tck/tck-tcp-tcp.bndrun
@@ -125,8 +125,6 @@
 -runbundles: \
        assertj-core;version='[3.27.7,3.27.8)',\
        com.sun.istack.commons-runtime;version='[4.2.0,4.2.1)',\
- com.sun.xml.bind.jaxb-core;version='[4.0.8,4.0.9)',\
- com.sun.xml.bind.jaxb-impl;version='[4.0.8,4.0.9)',\
        jakarta.activation-api;version='[2.1.4,2.1.5)',\
        jakarta.xml.bind-api;version='[4.0.5,4.0.6)',\
        net.bytebuddy.byte-buddy;version='[1.18.8,1.18.9)',\
@@ -147,4 +145,6 @@
        org.osgi.service.component;version='[1.5.1,1.5.2)',\
        org.osgi.test.cases.remoteserviceadmin;version='[8.1.0,8.1.1)',\
        org.osgi.util.function;version='[1.2.0,1.2.1)',\
- org.osgi.util.promise;version='[1.3.0,1.3.1)'
\ No newline at end of file
+       org.osgi.util.promise;version='[1.3.0,1.3.1)',\
+       com.sun.xml.bind.jaxb-core;version='[4.0.9,4.0.10)',\
+       com.sun.xml.bind.jaxb-impl;version='[4.0.9,4.0.10)'
diff --git i/itests/tck/tck-zookeeper-fastbin.bndrun w/itests/tck/tck-zookeeper-fastbin.bndrun
index ade772c5..a99f443f 100644
--- i/itests/tck/tck-zookeeper-fastbin.bndrun
+++ w/itests/tck/tck-zookeeper-fastbin.bndrun
@@ -161,8 +161,6 @@
        net.bytebuddy.byte-buddy;version='[1.18.8,1.18.9)',\
        jakarta.activation-api;version='[2.1.4,2.1.5)',\
        jakarta.xml.bind-api;version='[4.0.5,4.0.6)',\
- com.sun.xml.bind.jaxb-core;version='[4.0.8,4.0.9)',\
- com.sun.xml.bind.jaxb-impl;version='[4.0.8,4.0.9)',\
        com.sun.istack.commons-runtime;version='[4.2.0,4.2.1)',\
        org.fusesource.hawtbuf.hawtbuf;version='[1.11.0,1.11.1)',\
        org.fusesource.hawtdispatch.hawtdispatch;version='[1.22.0,1.22.1)',\
@@ -181,4 +179,6 @@
        org.apache.aries.rsa.core;version='[2.0.0,2.0.1)',\
        org.apache.aries.rsa.topology-manager;version='[2.0.0,2.0.1)',\
        org.osgi.test.cases.remoteserviceadmin;version='[8.1.0,8.1.1)',\
- org.xerial.snappy.snappy-java;version='[1.1.10,1.1.11)'
+       org.xerial.snappy.snappy-java;version='[1.1.10,1.1.11)',\
+       com.sun.xml.bind.jaxb-core;version='[4.0.9,4.0.10)',\
+       com.sun.xml.bind.jaxb-impl;version='[4.0.9,4.0.10)'

I think we can live with it.
When you merge I will update #125 and #111
You can close after reading

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ultimately it's up to a human to make sure the build passes before committing/pushing and to review the diff of changes and decide what goes in. I think dependabot does update bndrun so you should see it there as well. Also maybe u can add a CI instruction to check if the build modified any source files (i.e. the commit failed to include the auto-modified files).

com.sun.istack.commons-runtime;version='[4.2.0,4.2.1)',\
com.sun.xml.bind.jaxb-core;version='[4.0.8,4.0.9)',\
com.sun.xml.bind.jaxb-impl;version='[4.0.8,4.0.9)',\
jakarta.activation-api;version='[2.1.4,2.1.5)',\
jakarta.xml.bind-api;version='[4.0.5,4.0.6)',\
net.bytebuddy.byte-buddy;version='[1.18.8,1.18.9)',\
org.apache.aries.rsa.core;version='[2.0.0,2.0.1)',\
org.apache.aries.rsa.discovery.local;version='[2.0.0,2.0.1)',\
org.apache.aries.rsa.discovery.tcp;version='[2.0.0,2.0.1)',\
org.apache.aries.rsa.provider.tcp;version='[2.0.0,2.0.1)',\
org.apache.aries.rsa.spi;version='[2.0.0,2.0.1)',\
org.apache.aries.rsa.topology-manager;version='[2.0.0,2.0.1)',\
org.apache.felix.configadmin;version='[1.9.26,1.9.27)',\
org.apache.felix.eventadmin;version='[1.6.4,1.6.5)',\
org.apache.felix.fileinstall;version='[3.7.4,3.7.5)',\
org.apache.felix.scr;version='[2.2.18,2.2.19)',\
org.apache.servicemix.bundles.junit;version='[4.13.2,4.13.3)',\
org.glassfish.hk2.osgi-resource-locator;version='[3.0.0,3.0.1)',\
org.ops4j.pax.logging.pax-logging-api;version='[2.3.3,2.3.4)',\
org.ops4j.pax.logging.pax-logging-log4j2;version='[2.3.3,2.3.4)',\
org.osgi.service.component;version='[1.5.1,1.5.2)',\
org.osgi.test.cases.remoteserviceadmin;version='[8.1.0,8.1.1)',\
org.osgi.util.function;version='[1.2.0,1.2.1)',\
org.osgi.util.promise;version='[1.3.0,1.3.1)'
Loading