summaryrefslogtreecommitdiff
path: root/test/osgi/src
diff options
context:
space:
mode:
Diffstat (limited to 'test/osgi/src')
-rw-r--r--test/osgi/src/BasicTest.scala33
-rw-r--r--test/osgi/src/ScalaOsgiHelper.scala18
2 files changed, 51 insertions, 0 deletions
diff --git a/test/osgi/src/BasicTest.scala b/test/osgi/src/BasicTest.scala
new file mode 100644
index 0000000000..5ca8cc1265
--- /dev/null
+++ b/test/osgi/src/BasicTest.scala
@@ -0,0 +1,33 @@
+package tools.test.osgi
+
+import org.junit.Assert._
+import org.ops4j.pax.exam.CoreOptions._
+
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.ops4j.pax.exam
+import org.ops4j.pax.exam.junit.{
+ Configuration,
+ ExamReactorStrategy,
+ JUnit4TestRunner
+}
+import org.ops4j.pax.exam.spi.reactors.AllConfinedStagedReactorFactory
+import org.ops4j.pax.swissbox.framework.ServiceLookup
+import org.osgi.framework.BundleContext
+
+
+
+
+
+@RunWith(classOf[JUnit4TestRunner])
+@ExamReactorStrategy(Array(classOf[AllConfinedStagedReactorFactory]))
+class BasicTest extends ScalaOsgiHelper {
+ @Configuration
+ def config(): Array[exam.Option] = {
+ // TODO - Find scala bundles.
+ scalaBundles
+ }
+
+ @Test
+ def everythingLoads(): Unit = ()
+}
diff --git a/test/osgi/src/ScalaOsgiHelper.scala b/test/osgi/src/ScalaOsgiHelper.scala
new file mode 100644
index 0000000000..b4c643ef60
--- /dev/null
+++ b/test/osgi/src/ScalaOsgiHelper.scala
@@ -0,0 +1,18 @@
+package tools.test.osgi
+
+import org.ops4j.pax.exam.CoreOptions._
+import org.ops4j.pax.exam
+import java.io.File
+
+trait ScalaOsgiHelper {
+ def scalaBundles: Array[exam.Option] = {
+ def bundleLocation = new File(sys.props.getOrElse("scala.bundle.dir", "build/osgi"))
+ def bundleFiles = bundleLocation.listFiles filter (_.getName endsWith ".jar")
+ def makeBundle(file: File): exam.Option =
+ bundle(file.toURI.toASCIIString)
+ val bundles = (bundleFiles map makeBundle)
+ System.out.println(bundles)
+ bundles ++ Array[exam.Option](felix(), equinox(), junitBundles())
+ }
+
+}