Closed jcommand closed 2 years ago
I don't see the description of a bug in Bnd anywhere in here. You seem to be asking for help to make your build work.
Usage questions should be asked in the Bnd Discourse Group. See https://github.com/bndtools/bnd#feedback.
A couple of things. The bnd.bnd
file should not be including a bndrun
file. The bnd.bnd
file is the instructions to make the project's bundles while bndrun
files are for executions. They are separate and both inherit from the workspace. So the bndrun
file should not be including from cnf/ext
since the workspace already includes those files.
The bug is that one BND definition in two tools lead to different results (deterministic behavior?). The question is, is it the BND Eclipse plugin or the Gradle plugin that has a bug. My guess is the Gradle plugin.
I will move the other info to the user group.
Maybe I have misunderstood. But I thought the /cnf/build.bnd is the default build file. And if I want to include another one I have to include it.
The Gradle plugin always uses the bnd.bnd for the task build. So that the Run/Integration Test Config does not have to be stored in the bnd.bnd file, I have swapped it out into a bndrun file and then included it in the bnd.bnd file.
Thanks and greetings Frank
But I thought the /cnf/build.bnd is the default build file.
cnf
configures the Workspace from which all Projects and bndruns inherit. The Workspace is useful for defining the repositories and common properties and instructions for all projects.
If you have a specific bndrun file you want the testOSGi
task to use, then you will need to configure that in the project's gradle script. For example, https://github.com/osgi/osgi-test/blob/main/examples/osgi-test-example-bndworkspace/org.osgi.test.example.player.test/build.gradle
See https://github.com/osgi/osgi-test/tree/main/examples/osgi-test-example-bndworkspace for a complete working example of a Bnd Workspace which uses a bndrun file to do OSGi testing.
Closing as no issue evident. If you have other usage questions, they should be asked in the Bnd Discourse Group. See https://github.com/bndtools/bnd#feedback.
When converting an old project from bnd 4.2 and osgi 5 to bnd 6.3.1 and osgi 7, I am unable to run the integration tests using Gradle. In Eclipse the execution of the integration tests works.
I use the Gradle BND Workspace plugin. In Eclipse I import the projects using the BND Workspace project. The tests are executed using bnd.bnd test, which in turn includes a jcommand.bndrun.
When running "./gradlew build" the OSGi instance is started (testOSGi). All bundles are started. Once all bundles are started and the gogo shell offers a console, all bundles are stopped again. Shortly before the end either an interrupt exception is thrown or a test is executed which fails because the service to be tested is no longer available.
When running the same bnd.bnd file in Eclipse with the BndTools 6.3.1 the tests are executed correctly and then the bundles are stopped.
settings.gradle
bnd.bnd
jcommand.bndrun
${workspace}/cnf/includes/jdt.bnd
${workspace}/cnf/ext/test.bnd