summaryrefslogblamecommitdiff
path: root/test/osgi/src/ScalaOsgiHelper.scala
blob: b4c643ef601439dea36c2cb90def88d7db058c61 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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())
  }
 
}