[jboss-osgi-commits] JBoss-OSGI SVN: r97646 - in projects/jboss-osgi: projects/runtime/framework/trunk/src/etc/osgitck and 5 other directories.
jboss-osgi-commits at lists.jboss.org
jboss-osgi-commits at lists.jboss.org
Wed Dec 9 18:08:01 EST 2009
Author: thomas.diesler at jboss.com
Date: 2009-12-09 18:08:00 -0500 (Wed, 09 Dec 2009)
New Revision: 97646
Added:
projects/jboss-osgi/trunk/osgitck/readme.txt
Removed:
projects/jboss-osgi/trunk/osgitck/hudson/apache-tomcat/conf/tomcat-users.xml
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/scripts/assembly-all.xml
projects/jboss-osgi/projects/runtime/framework/trunk/src/etc/osgitck/jboss-osgi-bootstrap.xml
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/launch/OSGiFrameworkFactory.java
projects/jboss-osgi/trunk/osgitck/ant.properties.example
projects/jboss-osgi/trunk/osgitck/build.xml
projects/jboss-osgi/trunk/osgitck/hudson/hudson-home/jobs/osgi.core.tests/config.xml
Log:
Fix TCK setup for framework SNAPSHOT
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/scripts/assembly-all.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/scripts/assembly-all.xml 2009-12-09 23:06:14 UTC (rev 97645)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/scripts/assembly-all.xml 2009-12-09 23:08:00 UTC (rev 97646)
@@ -34,11 +34,13 @@
<include>*:jboss-managed:jar</include>
<include>*:jboss-mdr:jar</include>
<include>*:jboss-metatype:jar</include>
+ <include>*:jboss-osgi-deployment:jar</include>
<include>*:jboss-osgi-deployers:jar</include>
<include>*:jboss-osgi-spi:jar</include>
<include>*:jboss-reflect:jar</include>
<include>*:jboss-vfs:jar</include>
<include>*:jbossxb:jar</include>
+ <include>*:mcann-core:jar</include>
<include>*:org.osgi.core:jar</include>
<include>*:org.osgi.compendium:jar</include>
</includes>
@@ -52,7 +54,7 @@
<include>*:jboss-logging-log4j:jar</include>
</includes>
<useStrictFiltering>true</useStrictFiltering>
- <scope>test</scope>
+ <scope>provided</scope>
<unpack>true</unpack>
</dependencySet>
</dependencySets>
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/etc/osgitck/jboss-osgi-bootstrap.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/etc/osgitck/jboss-osgi-bootstrap.xml 2009-12-09 23:06:14 UTC (rev 97645)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/etc/osgitck/jboss-osgi-bootstrap.xml 2009-12-09 23:08:00 UTC (rev 97646)
@@ -132,6 +132,7 @@
<constructor>
<parameter class="org.jboss.dependency.spi.Controller"><inject bean="jboss.kernel:service=KernelController" /></parameter>
</constructor>
+ <property name="deploymentRegistry"><inject bean="DeploymentRegistry"/></property>
</bean>
<!-- OSGI Deployment -->
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java 2009-12-09 23:06:14 UTC (rev 97645)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java 2009-12-09 23:08:00 UTC (rev 97646)
@@ -660,8 +660,9 @@
// Invoke the bundle lifecycle interceptors
if (getBundleManager().isFrameworkActive() && getBundleId() != 0)
{
- LifecycleInterceptorServicePlugin plugin = getBundleManager().getPlugin(LifecycleInterceptorServicePlugin.class);
- plugin.handleStateChange(state, getBundleInternal());
+ LifecycleInterceptorServicePlugin plugin = getBundleManager().getOptionalPlugin(LifecycleInterceptorServicePlugin.class);
+ if (plugin != null)
+ plugin.handleStateChange(state, getBundleInternal());
}
this.state.set(state);
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java 2009-12-09 23:06:14 UTC (rev 97645)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java 2009-12-09 23:08:00 UTC (rev 97646)
@@ -433,10 +433,10 @@
*
* @param properties the properties
*/
- public void setProperties(Map<String, Object> properties)
+ public void setProperties(Map<String, Object> props)
{
- this.properties = properties;
-
+ properties.putAll(props);
+
// Init default framework properties
if (getProperty(Constants.FRAMEWORK_VERSION) == null)
setProperty(Constants.FRAMEWORK_VERSION, OSGi_FRAMEWORK_VERSION);
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/launch/OSGiFrameworkFactory.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/launch/OSGiFrameworkFactory.java 2009-12-09 23:06:14 UTC (rev 97645)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/launch/OSGiFrameworkFactory.java 2009-12-09 23:08:00 UTC (rev 97646)
@@ -63,7 +63,7 @@
/** The system property used to get a bootstrap path loaded from a classloader */
public static final String BOOTSTRAP_PATH = "org.jboss.osgi.framework.launch.bootstrapPath";
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({ "unchecked", "rawtypes" })
public Framework newFramework(Map configuration)
{
// Bootstrap the kernel
@@ -117,6 +117,7 @@
try
{
deployer.deploy(url);
+ deployer.validate();
}
catch (Throwable ex)
{
@@ -127,7 +128,11 @@
if (managerContext == null)
throw new IllegalStateException("Cannot obtain installed bean: " + OSGiBundleManager.BEAN_BUNDLE_MANAGER);
+ // Get the manger and copy the configuration
OSGiBundleManager manager = (OSGiBundleManager)managerContext.getTarget();
+ if (configuration != null)
+ manager.setProperties(configuration);
+
return new OSGiFramework(manager);
}
Modified: projects/jboss-osgi/trunk/osgitck/ant.properties.example
===================================================================
--- projects/jboss-osgi/trunk/osgitck/ant.properties.example 2009-12-09 23:06:14 UTC (rev 97645)
+++ projects/jboss-osgi/trunk/osgitck/ant.properties.example 2009-12-09 23:08:00 UTC (rev 97646)
@@ -4,13 +4,14 @@
# $Id: ant.properties.example 3995 2007-07-26 08:52:45Z thomas.diesler at jboss.com $
# The JBoss OSGi framework version
-jboss.osgi.framework.version=1.0.0-SNAPSHOT
+framework.version=1.0.0-SNAPSHOT
# The aQute Bnd version
aQute.bnd.version=0.0.366-SNAPSHOT
# The location of the OSGi TCK
# osgitck.export=/home/username/svn/osgitck/r4v42
+# osgitck.zip.file=/home/username/svn/osgitck/osgitck-r4v42.zip
# The location of the local maven repository
# maven.local.repository=/home/username/.m2/repository
@@ -26,7 +27,7 @@
hudson.maven.path=/usr/java/apache-maven-2.2.1
# Hudson QA Environment
-hudson.username=changeme
+# hudson.username=username
# Hudson workspace root
# hudson.root=/home/username/workspace/osgitck
Modified: projects/jboss-osgi/trunk/osgitck/build.xml
===================================================================
--- projects/jboss-osgi/trunk/osgitck/build.xml 2009-12-09 23:06:14 UTC (rev 97645)
+++ projects/jboss-osgi/trunk/osgitck/build.xml 2009-12-09 23:08:00 UTC (rev 97646)
@@ -14,6 +14,8 @@
<project default="setup.jboss">
<property name="target.dir" value="${basedir}/target" />
+ <property name="reports.dir" value="${target.dir}/test-reports" />
+ <property name="osgitck.dir" value="${target.dir}/osgitck-r4v42" />
<!-- ================================================================== -->
<!-- Initialization -->
@@ -29,14 +31,23 @@
<!-- Setup property defaults -->
<property environment="env"/>
- <property name="username" value="${env.USER}" />
- <property name="osgitck.export" value="/home/${username}/svn/osgitck/r4v42" />
- <property name="maven.local.repository" value="/home/${username}/.m2/repository" />
- <property name="hudson.root" value="/home/${username}/workspace/osgitck" />
-
+ <property name="hudson.username" value="${env.USER}" />
+ <property name="osgitck.export" value="/home/${hudson.username}/svn/osgitck/r4v42" />
+ <property name="osgitck.tar.file" value="${osgitck.export}/../osgitck-r4v42.tar" />
+ <property name="maven.local.repository" value="/home/${hudson.username}/.m2/repository" />
+ <property name="hudson.root" value="/home/${hudson.username}/workspace/osgitck" />
+
+ <echo>************************************************</echo>
+ <echo message="hudson.username=${hudson.username}"/>
+ <echo message="aQute.bnd.version=${aQute.bnd.version}"/>
+ <echo message="framework.version=${framework.version}"/>
+ <echo message="osgitck.export=${osgitck.export}"/>
+ <echo message="osgitck.tar.file=${osgitck.tar.file}"/>
+ <echo>************************************************</echo>
+
<!-- Check if the osgitck export is available -->
<available property="osgitck.export.available" file="${osgitck.export}" />
- <fail message="Cannot find: ${osgitck.export}" unless="osgitck.export.available" />
+ <available property="osgitck.tar.available" file="${osgitck.tar.file}" />
<!-- Check if the aQute.bnd jar is available -->
<property name="aQute.bnd.jar" value="${maven.local.repository}/biz/aQute/aQute.bnd/${aQute.bnd.version}/aQute.bnd-${aQute.bnd.version}.jar" />
@@ -44,49 +55,46 @@
<fail message="Cannot find: ${aQute.bnd.jar}" unless="aQute.bnd.available" />
<!-- Check if the jboss.osgi.framework jar is available -->
- <property name="jboss.osgi.framework.jar" value="${maven.local.repository}/org/jboss/osgi/runtime/jboss-osgi-framework/${jboss.osgi.framework.version}/jboss-osgi-framework-${jboss.osgi.framework.version}-all.jar" />
+ <property name="jboss.osgi.framework.jar" value="${maven.local.repository}/org/jboss/osgi/runtime/jboss-osgi-framework/${framework.version}/jboss-osgi-framework-${framework.version}-all.jar" />
<available property="jboss.osgi.framework.available" file="${jboss.osgi.framework.jar}" />
<fail message="Cannot find: ${jboss.osgi.framework.jar}" unless="jboss.osgi.framework.available" />
<!-- Check if the osgitck dir is available -->
- <property name="osgitck.dir" value="${target.dir}/osgitck-r4v42" />
<available property="osgitck.dir.available" file="${osgitck.dir}" />
<property name="jboss.framework.repo.dir" value="${osgitck.dir}/licensed/repo/org.jboss.osgi.framework" />
- <echo message="osgitck.export=${osgitck.export}"/>
- <echo message="aQute.bnd.jar=${aQute.bnd.jar}"/>
- <echo message="jboss.osgi.framework=${jboss.osgi.framework.jar}"/>
-
</target>
<!-- ================================================================== -->
<!-- Setup -->
<!-- ================================================================== -->
- <!-- Copy the OSGi TCK-->
- <target name="copy-osgitck" depends="init" unless="osgitck.dir.available">
- <copy toDir="${osgitck.dir}">
- <fileset dir="${osgitck.export}">
- <exclude name="**/.svn"/>
- </fileset>
- </copy>
+ <!-- Tar the OSGi TCK-->
+ <target name="tar-osgitck" depends="init" unless="osgitck.tar.available">
+ <fail message="Cannot find osgitck export: ${osgitck.export}" unless="osgitck.export.available"/>
+ <tar basedir="${osgitck.export}" destfile="${osgitck.tar.file}" longfile="gnu" excludes="**/.svn"/>
+ </target>
+
+ <!-- Untar the OSGi TCK-->
+ <target name="untar-osgitck" depends="tar-osgitck" unless="osgitck.dir.available">
+ <mkdir dir="${osgitck.dir}"/>
+ <untar src="${osgitck.tar.file}" dest="${osgitck.dir}"/>
<available property="osgitck.dir.available" file="${osgitck.dir}" />
</target>
<!-- Setup the TCK to use the RI (equinox) -->
- <target name="setup.ri" description="Setup the TCK using the RI (Equinox)" depends="init,copy-osgitck">
+ <target name="setup.ri" description="Setup the TCK using the RI (Equinox)" depends="init,untar-osgitck">
<!-- Copy the aQute.bnd -->
+ <fail message="Cannot find: ${osgitck.dir}" unless="osgitck.dir.available" />
<copy file="${aQute.bnd.jar}" tofile="${osgitck.dir}/licensed/repo/biz.aQute.bnd/biz.aQute.bnd-latest.jar" overwrite="true" />
</target>
<!-- Setup the TCK to use the JBoss OSGi Framework -->
- <target name="setup.jboss" description="Setup the TCK using the JBoss OSGi Framework" depends="init,copy-osgitck">
-
- <!-- Check if the osgitck dir is available -->
+ <target name="setup.jboss" description="Setup the TCK using the JBoss OSGi Framework" depends="init,untar-osgitck">
+
+ <!-- Overlay the TCK setup -->
<fail message="Cannot find: ${osgitck.dir}" unless="osgitck.dir.available" />
-
- <!-- Overlay the TCK setup -->
<copy todir="${osgitck.dir}" overwrite="true">
<fileset dir="${basedir}/overlay" />
</copy>
@@ -119,12 +127,28 @@
<!-- TCK Tests -->
<!-- ================================================================== -->
- <target name="tck-core-tests" description="Run the TCK core tests" depends="init">
+ <target name="run-tests" description="Run the TCK core tests" depends="init">
+ <fail message="Cannot find: ${osgitck.dir}" unless="osgitck.dir.available" />
<ant dir="${osgitck.dir}/osgi.ct" target="clean" />
<ant dir="${osgitck.dir}/osgi.ct" target="publish" />
<ant dir="${osgitck.dir}/osgi.ct" target="osgi.core.tests" />
</target>
+ <target name="test-reports" description="Generate the TCK test reports" depends="init">
+ <fail message="Cannot find: ${osgitck.dir}" unless="osgitck.dir.available" />
+ <mkdir dir="${reports.dir}"/>
+ <junitreport todir="${reports.dir}">
+ <fileset dir="${osgitck.dir}">
+ <include name="**/test-reports/TEST-*.xml"/>
+ </fileset>
+ <report format="frames" todir="${reports.dir}/html"/>
+ </junitreport>
+
+ <echo/>
+ <echo message="Generated test reports: ${reports.dir}"/>
+ <echo/>
+ </target>
+
<!-- ================================================================== -->
<!-- Clean -->
<!-- ================================================================== -->
Deleted: projects/jboss-osgi/trunk/osgitck/hudson/apache-tomcat/conf/tomcat-users.xml
===================================================================
--- projects/jboss-osgi/trunk/osgitck/hudson/apache-tomcat/conf/tomcat-users.xml 2009-12-09 23:06:14 UTC (rev 97645)
+++ projects/jboss-osgi/trunk/osgitck/hudson/apache-tomcat/conf/tomcat-users.xml 2009-12-09 23:08:00 UTC (rev 97646)
@@ -1,5 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<tomcat-users>
- <role rolename="admin"/>
- <user username="@hudson.username@" password="@hudson.password@" roles="admin"/>
-</tomcat-users>
Modified: projects/jboss-osgi/trunk/osgitck/hudson/hudson-home/jobs/osgi.core.tests/config.xml
===================================================================
--- projects/jboss-osgi/trunk/osgitck/hudson/hudson-home/jobs/osgi.core.tests/config.xml 2009-12-09 23:06:14 UTC (rev 97645)
+++ projects/jboss-osgi/trunk/osgitck/hudson/hudson-home/jobs/osgi.core.tests/config.xml 2009-12-09 23:08:00 UTC (rev 97646)
@@ -22,7 +22,6 @@
<hudson.tasks.Shell>
<command>
TCKSETUPDIR=$WORKSPACE/osgitck-setup
-TCKHOMEDIR=$TCKSETUPDIR/target/osgitck-r4v42
# Setup the TCK
cd $TCKSETUPDIR
@@ -32,8 +31,7 @@
ant clean setup.ri
# Run the core tests
-cd $TCKHOMEDIR/osgi.ct
-ant clean publish osgi.core.tests
+ant run-tests
</command>
</hudson.tasks.Shell>
</builders>
Added: projects/jboss-osgi/trunk/osgitck/readme.txt
===================================================================
--- projects/jboss-osgi/trunk/osgitck/readme.txt (rev 0)
+++ projects/jboss-osgi/trunk/osgitck/readme.txt 2009-12-09 23:08:00 UTC (rev 97646)
@@ -0,0 +1,5 @@
+
+Running Tests with JPDA
+-----------------------
+
+export ANT_OPTS="-Djpda=-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y"
\ No newline at end of file
More information about the jboss-osgi-commits
mailing list