summaryrefslogtreecommitdiff
path: root/test/osgi/src/ScalaOsgiHelper.scala
diff options
context:
space:
mode:
authorJosh Suereth <joshua.suereth@gmail.com>2012-09-17 13:51:35 -0400
committerJosh Suereth <joshua.suereth@gmail.com>2012-09-18 15:36:13 -0400
commitd7acf92be65b6005aaab33e071b4bff1d7aa9911 (patch)
treefe260eeac509f5f8209a3badf9797d37ca491750 /test/osgi/src/ScalaOsgiHelper.scala
parentc6dde6a1e884b71ae8bf8e0136287e434594e92b (diff)
downloadscala-d7acf92be65b6005aaab33e071b4bff1d7aa9911.tar.gz
scala-d7acf92be65b6005aaab33e071b4bff1d7aa9911.tar.bz2
scala-d7acf92be65b6005aaab33e071b4bff1d7aa9911.zip
Adds OSGi support / tests to Scala. Fixes SI-5822.
* Adds BND manifest generation to the build. * Adds OSGi pax-exam testing infrastructure * Adds simple OSGi verification test for bundle resolution. * Modifies distribution to use bundles.
Diffstat (limited to 'test/osgi/src/ScalaOsgiHelper.scala')
-rw-r--r--test/osgi/src/ScalaOsgiHelper.scala18
1 files changed, 18 insertions, 0 deletions
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())
+ }
+
+}