Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

No Format
java -jar jar/bnd.jar runtests -title osgi.ct <bnd-file>

Since the Felix framework does not fully implement the security-related portions of the OSGi specification, it is normal for it to fail the security-related test suites.

The following two examples show how to edit these files for the Felix framework and other bundle-based subprojects.

Testing the Felix framework

The Felix framework is tested against the core TCK, which includes test suites for:

  • Framework core (mandatory)
  • Framework security (optional)
  • Framework launching (mandatory)
  • Framework launching security (optional)
  • Package Admin (optional)
  • Start Level (optional)
  • URL Handlers (optional)
  • Permission Admin (optional)
  • Conditional Permission Admin (optional)

For each of the associated BND files, the -runpath needs to be edited to refer to the Felix framework; each one should look something like this after editing:

No Format

-runpath = \
    /path/to/felix/framework/org.apache.felix.framework-2.0.2.jar;version=file, \
    jar/com.springsource.junit-3.8.2.jar;version=file;export="junit.framework;version=3.8"

It is not necessary to change anything else in the BND and it is normal that the -runbundles setting is empty, since there are no additional bundles associated with testing the framework. After editing the BND files, run the tests using:

No Format

source runtests

This will run all test suites for all BND files. To run a specific test suite, do the following:

No Format

java -jar jar/bnd.jar runtests -title osgi.ct <bnd-file>

Where <bnd-file> specifies one or more BND files for the associates test suites to run.

...