DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
...
The OSGi Alliance now provides access to Apache committers access to its Compliance Tests (CT). This page describes how to get access to the CTs and how to use run Felix subprojects against the CTthem with Felix subprojects.
Gaining Access to OSGi CTs
The general process is to send a request to the jcp-open@apache.org mailing requesting access. Since redistributing the OSGi CTs is not allowed, you will need to submit an NDA to be granted access to the SVN repo containing the binaries.
OSGi CT Overview
The CT is delivered as two JAR files, one for the core CT and one for the compendium CT. Each JAR file is comprised composed of several other JAR files, which are the actual compliance tests. Typically, there is one JAR per specification, except for the OSGi framework. The CT uses BND as its testing harness, which in turn uses the OSGi R4.2 framework launching and embedding API to configure, launch, and install test bundles. Each test JAR file has an associated BND file which supplies the configuration BND needs to run the associated tests.
...
Modifying the BND files is fairly straightforward, if not tedious. A typical BND file looks like this:
...
| 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 Typically, it is not necessary to change anything else in the BND files and it is normal that the -runbundles setting is empty, since there are no additional bundles associated with testing the framework. The exception to this is for the framework test suites for security. To test with security enabled, you will need to add the framework security provider in -runbundles like this:
| No Format |
|---|
-runbundles = \ /path/to/felix/framework.security/org.apache.felix.framework.security-1.0.0.jar.jar;version=file |
After editing the BND files, run the tests using:
...
| Note | ||
|---|---|---|
| ||
Tests for native code loading will fail on Java 6, so do not use this JDK for testing the framework. Also, 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. |
Reports for the tests suites are generated in the reports/ subdirectory and are named after the appropriate test suite.
...
Extract the compendium CT JAR file to access the individual test suites. Since most compendium service specification test suites require security, it is necessary to use a framework implementation that supports security to run these tests. To test with felix and security enabled. For the Felix framework, you will have to add the security provider to the -runbundles (see the below example). to enable security.
To test a bundle, the -runbundles setting must be modified to refer to the bundle or bundles being tested. For example, to test Felix' Event Admin implementationbundle, edit the -runbundles setting in org.osgi.test.cases.event.bnd to look something like this:
| No Format |
|---|
-runbundles = \
/path/to/felix/eventadmin/org.apache.felix.eventadmin-1.0.0.jar;version=file,\
/path/to/felix/framework.security/org.apache.felix.framework.security-1.0.0.jar.jar;version=file
|
After editing the BND files to refer to the appropriate bundles, run the tests using:
...