felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1619676 - in /felix/trunk/eventadmin/impl: pom.xml src/test/java/org/apache/felix/eventadmin/ittests/AbstractTest.java
Date Fri, 22 Aug 2014 06:14:43 GMT
Author: cziegeler
Date: Fri Aug 22 06:14:43 2014
New Revision: 1619676

URL: http://svn.apache.org/r1619676
Log:
FELIX-4608 : Merge Performance IT into Event Admin

Modified:
    felix/trunk/eventadmin/impl/pom.xml
    felix/trunk/eventadmin/impl/src/test/java/org/apache/felix/eventadmin/ittests/AbstractTest.java

Modified: felix/trunk/eventadmin/impl/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/eventadmin/impl/pom.xml?rev=1619676&r1=1619675&r2=1619676&view=diff
==============================================================================
--- felix/trunk/eventadmin/impl/pom.xml (original)
+++ felix/trunk/eventadmin/impl/pom.xml Fri Aug 22 06:14:43 2014
@@ -36,6 +36,16 @@
       <developerConnection>scm:svn:https://svn.apache.org/repos/asf/felix/trunk/eventadmin/impl</developerConnection>
       <url>http://svn.apache.org/repos/asf/felix/eventadmin/impl</url>
     </scm>
+    
+    <properties>
+        <bundle.build.name>
+            ${basedir}/target
+        </bundle.build.name>
+        <bundle.file.name>
+            ${bundle.build.name}/${project.build.finalName}.jar
+        </bundle.file.name>
+    </properties>
+
     <dependencies>
         <dependency>
             <groupId>org.osgi</groupId>
@@ -197,8 +207,8 @@
                         <configuration>
                             <systemProperties>
                                 <property>
-                                    <name>eventadmin.version</name>
-                                    <value>${project.version}</value>
+                                    <name>project.bundle.file</name>
+                                    <value>${bundle.file.name}</value>
                                 </property>
                             </systemProperties>
                             <includes>

Modified: felix/trunk/eventadmin/impl/src/test/java/org/apache/felix/eventadmin/ittests/AbstractTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/eventadmin/impl/src/test/java/org/apache/felix/eventadmin/ittests/AbstractTest.java?rev=1619676&r1=1619675&r2=1619676&view=diff
==============================================================================
--- felix/trunk/eventadmin/impl/src/test/java/org/apache/felix/eventadmin/ittests/AbstractTest.java
(original)
+++ felix/trunk/eventadmin/impl/src/test/java/org/apache/felix/eventadmin/ittests/AbstractTest.java
Fri Aug 22 06:14:43 2014
@@ -24,6 +24,7 @@ import static org.ops4j.pax.exam.CoreOpt
 import static org.ops4j.pax.exam.CoreOptions.provision;
 import static org.ops4j.pax.exam.CoreOptions.systemProperty;
 
+import java.io.File;
 import java.util.ArrayList;
 import java.util.Dictionary;
 import java.util.List;
@@ -32,6 +33,7 @@ import javax.inject.Inject;
 
 import org.junit.runner.RunWith;
 import org.ops4j.pax.exam.Configuration;
+import org.ops4j.pax.exam.CoreOptions;
 import org.ops4j.pax.exam.Option;;
 import org.ops4j.pax.exam.junit.PaxExam;
 import org.ops4j.pax.exam.options.AbstractDelegateProvisionOption;
@@ -46,8 +48,8 @@ import org.slf4j.LoggerFactory;
 @RunWith(PaxExam.class)
 public abstract class AbstractTest implements Runnable {
 
-    /** the name of the system property providing the event admin version. */
-    private static final String EVENT_ADMIN_VERSION_PROP = "eventadmin.version";
+    // the name of the system property providing the bundle file to be installed and tested
+    private static final String BUNDLE_JAR_SYS_PROP = "project.bundle.file";
 
     /** The logger. */
     protected final Logger logger = LoggerFactory.getLogger(this.getClass());
@@ -235,14 +237,20 @@ public abstract class AbstractTest imple
 
     @Configuration
     public static Option[] configuration() {
-        final String eventAdminVersion = System.getProperty( EVENT_ADMIN_VERSION_PROP, "1.3.3-SNAPSHOT"
);
+        final String bundleFileName = System.getProperty( BUNDLE_JAR_SYS_PROP );
+        final File bundleFile = new File( bundleFileName );
+        if ( !bundleFile.canRead() ) {
+            throw new IllegalArgumentException( "Cannot read from bundle file " + bundleFileName
+ " specified in the "
+                + BUNDLE_JAR_SYS_PROP + " system property" );
+        }
+
         return options(
             provision(
                 mavenBundle( "org.ops4j.pax.tinybundles", "tinybundles", "1.0.0" ),
                 mavenBundle("org.apache.sling", "org.apache.sling.commons.log", "2.1.2"),
                 mavenBundle("org.apache.felix", "org.apache.felix.configadmin", "1.2.8"),
                 mavenBundle("org.apache.felix", "org.apache.felix.metatype", "1.0.4"),
-                mavenBundle("org.apache.felix", "org.apache.felix.eventadmin", eventAdminVersion),
+                CoreOptions.bundle( bundleFile.toURI().toString() ),
                 mavenBundle("org.ops4j.pax.url", "pax-url-mvn", "1.3.5")
              ),
              // below is instead of normal Pax Exam junitBundles() to deal



Mime
View raw message