Loading OSGI modules into GitHub CI build process to run iTests?

Please excuse if the following is a bit garbled, but this is the first time that I am facing any challenges concerning OSGI module loading / iTests / and the GitHub CI build process.

I am doing some work on the Hue binding to add support for the Hue CLIP 2 API. The new code depends on the following two OSGI modules that are loaded by the OH core. And it works fine when the binding jar is running inside an OH operative system.

  • an implementation of the ClientBuilder interface as defined in javax.ws.rs.client
  • an implementation of the SseEventSourceFactory interface as defined in org.osgi.service.jaxrs.client

The Hue binding includes some iTests, and when I push my code to GitHub as an OH PR, the CI builder process complains something about lacking implementations of these interfaces that must be loaded in order to run the iTests.

I think I need to add some module names to the iTest .bndrun files in order to load those missing implementation modules, so that the iTests can run. ?? Is that correct? And if so, which are the modules that OH core would use (so that the iTests can use the same modules as OH runtime actually uses itself).

Probably. You can add -DwithResolver to your maven command line and the itest bundles will be resolved automatically. Usually you do not need to add anything to the bndrun file manually.

1 Like

Many thanks for the suggestion. I tried it, but there is still something wrong. Perhaps it is not an issue with the module resolver after all. (??) When I include the Hue iTest folder in the PR push, then the CI Build process seems to freeze (at least it takes over one hour before I gave up). However when I delete the iTest folder contents, the CI Build finishes in about 10 minutes, with a ‘green’ result. I am not sure what would be in the iTest that might cause CI Build to freeze…

Can you tag me in the PR? Thanks.

1 Like