JBoss Community Archive (Read Only)

JBoss OSGi

R5 TCK Setup

Getting the OSGi TCK

There is no public access to the OSGi TCK.

Getting the TCK from RedHat internal Git

We internally host the TCK here

    git clone git://git.app.eng.bos.redhat.com/org.osgi.tck.git 
    git checkout r5-core-ri-ct-final
    ...
    HEAD is now at 8ae7389... Updated bnd and changes required to build

Getting the OSGi TCK form the OSGi Alliance

You need to have an OSGi Alliance member login.
The OSGi Alliance has a page on Installing and Setting up Git

    git clone https://www.osgi.org/members/git/build org.osgi.build
    git checkout r5-core-ri-ct-final
    ...
    HEAD is now at 8ae7389... Updated bnd and changes required to build

Setup the OSGi TCK

Checkout and build the JBOSGi Framework

git clone git://github.com/jbosgi/jbosgi-framework.git
cd jbosgi-framework; git checkout r5
mvn -Pall clean install

Copy and edit the setup properties

cd tcksetup
cp ant.properties.example ant.properties
vi ant.properties

Running the OSGi TCK against the RI (Equinox)

ant setup.ri
ant run-core-tests
ant test-reports

Running the OSGi TCK against the JBoss OSGi Framework

ant setup.vi
ant run-core-tests
ant test-reports

Other target are:

clean                   Clean the TCK setup
run-core-tests          Run the TCK core tests
setup.ri                Setup the TCK using the RI (Equinox)
setup.vi                Setup the TCK using the Vendor Implemenation
test-reports            Generate the TCK test reports
update-framework        Update the JBoss OSGi Framework

Default target: setup.vi

Installing the Eclipse Bnd plugin

There is a mail from BJ Hargrave on bndtools @ OSGi that describes what needs to be done to make the TCK run in Eclipse

Importing the TCK projects

The layout for the core tests is defined in osgi.ct/layout.bnd.

build.core.tests = \
    org.osgi.test.cases.framework, \
    org.osgi.test.cases.framework.secure, \
    org.osgi.test.cases.framework.launch, \
    org.osgi.test.cases.framework.launch.secure, \
    org.osgi.test.cases.condpermadmin, \
    org.osgi.test.cases.permissionadmin, \
    org.osgi.test.cases.url, \
    org.osgi.test.cases.tracker

Additional to the core test projects, you need to import various other support projects.

images/author/download/attachments/55476542/r5-tck-eclipse-projects.jpg

Additional to that you would also want to import the projects that you want to test (i.e. framework)

Setup the TCK on Jenkins

The following steps need to be done only once to setup the TCK in the static Jenkins build environment.

[tdiesler@tdmac ~] $ ssh dev85.mw.lab.eng.bos.redhat.com
...
[tdiesler@dev85 ~]$ sudo su - hudson
[hudson@dev85 ~]$ git clone git://git.app.eng.bos.redhat.com/org.osgi.tck.git static_build_env/org.osgi.tck
...
[hudson@dev85 ~]$ cd static_build_env/org.osgi.tck
[hudson@dev85 org.osgi.tck]$ git tag
r4v42-enterprise-ri-ct-final
r4v43-core-ri-ct-final
r5-core-ri-ct-final
r5-enterprise-ri-ct-final

A Jenkins job can clone the TCK from the static build environment like this

export TCKCHECKOUT=$WORKSPACE/tckcheckout

# Clone the TCK repo 
if [ ! -d $TCKCHECKOUT ]; then
  git clone /home/hudson/static_build_env/org.osgi.tck $TCKCHECKOUT
fi

# Switch to known tckcheckout tag 
cd $TCKCHECKOUT; git checkout r5-core-ri-ct-final

For an example, see the osgi.core.r5v50 job.

Good Luck

JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-11 11:35:00 UTC, last content change 2012-12-03 08:38:59 UTC.