diff options
author | Paul Phillips <paulp@improving.org> | 2010-03-02 20:28:45 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-03-02 20:28:45 +0000 |
commit | 1b5c4b93ecf8f63e81c23c38b277b5aad41d5551 (patch) | |
tree | 77c845af30ed3a7097e2745e7a5e1d38238f0cc1 /src | |
parent | 2a04d577874fa2a4a447a6caef8076e3ba98b32d (diff) | |
download | scala-1b5c4b93ecf8f63e81c23c38b277b5aad41d5551.tar.gz scala-1b5c4b93ecf8f63e81c23c38b277b5aad41d5551.tar.bz2 scala-1b5c4b93ecf8f63e81c23c38b277b5aad41d5551.zip |
Removed the symlinks between scalacheck jars to...
Removed the symlinks between scalacheck jars to satisfy windows. Tweaked
partest to accomodate. No review.
Diffstat (limited to 'src')
4 files changed, 36 insertions, 25 deletions
diff --git a/src/partest/scala/tools/partest/PartestDefaults.scala b/src/partest/scala/tools/partest/PartestDefaults.scala new file mode 100644 index 0000000000..139c54dedd --- /dev/null +++ b/src/partest/scala/tools/partest/PartestDefaults.scala @@ -0,0 +1,30 @@ +package scala.tools +package partest + +import nsc.io.{ File, Path, Process, Directory } +import util.{ PathResolver } +import nsc.Properties.{ propOrElse, propOrNone, propOrEmpty } + +object PartestDefaults { + import nsc.Properties._ + private def wrapAccessControl[T](body: => Option[T]): Option[T] = + try body catch { case _: java.security.AccessControlException => None } + + def testRootName = propOrNone("partest.root") + def srcDirName = propOrElse("partest.srcdir", "files") + def testRootDir = testRootName map (x => Directory(x)) + + def classPath = PathResolver.Environment.javaUserClassPath // XXX + + def javaCmd = propOrElse("partest.javacmd", "java") + def javacCmd = propOrElse("partest.javac_cmd", "javac") + def javaOpts = propOrElse("partest.java_opts", "") + def scalacOpts = propOrElse("partest.scalac_opts", "-deprecation") + + def testBuild = propOrNone("partest.build") + def errorCount = propOrElse("partest.errors", "0").toInt + def numActors = propOrElse("partest.actors", "8").toInt + def poolSize = wrapAccessControl(propOrNone("actors.corePoolSize")) + + def timeout = "1200000" +} diff --git a/src/partest/scala/tools/partest/nest/PathSettings.scala b/src/partest/scala/tools/partest/nest/PathSettings.scala index e0099e71e1..4ecee721bc 100644 --- a/src/partest/scala/tools/partest/nest/PathSettings.scala +++ b/src/partest/scala/tools/partest/nest/PathSettings.scala @@ -25,6 +25,11 @@ object PathSettings { } lazy val srcDir = Directory(testRoot / srcDirName normalize) + + lazy val scalaCheck = { + val libdir = Directory(testRoot / "files" / "lib") + libdir.files find (_.name startsWith "scalacheck") getOrElse error("No scalacheck jar found in '%s'" format libdir) + } } class PathSettings() { diff --git a/src/partest/scala/tools/partest/nest/Worker.scala b/src/partest/scala/tools/partest/nest/Worker.scala index 84fe413301..39137d8bd0 100644 --- a/src/partest/scala/tools/partest/nest/Worker.scala +++ b/src/partest/scala/tools/partest/nest/Worker.scala @@ -452,7 +452,7 @@ class Worker(val fileManager: FileManager) extends Actor { NestUI.verbose("compilation of "+file+" succeeded\n") - val scalacheckURL = (fileManager.testRootDir.parent / "lib" / "ScalaCheck.jar").toURL + val scalacheckURL = PathSettings.scalaCheck.toURL val outURL = outDir.getCanonicalFile.toURI.toURL val classpath: List[URL] = List(outURL, scalacheckURL, latestCompFile.toURI.toURL, latestLibFile.toURI.toURL, latestPartestFile.toURI.toURL).distinct diff --git a/src/partest/scala/tools/partest/package.scala b/src/partest/scala/tools/partest/package.scala index d7fcb79235..f47aa4c8f1 100644 --- a/src/partest/scala/tools/partest/package.scala +++ b/src/partest/scala/tools/partest/package.scala @@ -17,30 +17,6 @@ package object partest { (files.size, failures.size) } - object PartestDefaults { - import nsc.Properties._ - private def wrapAccessControl[T](body: => Option[T]): Option[T] = - try body catch { case _: java.security.AccessControlException => None } - - def testRootName = propOrNone("partest.root") - def srcDirName = propOrElse("partest.srcdir", "files") - def testRootDir = testRootName map (x => Directory(x)) - - def classPath = PathResolver.Environment.javaUserClassPath // XXX - - def javaCmd = propOrElse("partest.javacmd", "java") - def javacCmd = propOrElse("partest.javac_cmd", "javac") - def javaOpts = propOrElse("partest.java_opts", "") - def scalacOpts = propOrElse("partest.scalac_opts", "-deprecation") - - def testBuild = propOrNone("partest.build") - def errorCount = propOrElse("partest.errors", "0").toInt - def numActors = propOrElse("partest.actors", "8").toInt - def poolSize = wrapAccessControl(propOrNone("actors.corePoolSize")) - - def timeout = "1200000" - } - def vmArgString = { val str = Process.javaVmArguments mkString " " "Java VM started with arguments: '%s'" format str |