Removed the symlinks between scalacheck jars to satisfy windows.

Tweaked partest to accomodate.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@21044 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
extempore 2010-03-02 20:28:45 +00:00
parent 89e63633b1
commit 1fa594d7cf
5 changed files with 37 additions and 26 deletions

View File

@ -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"
}

View File

@ -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() {

View File

@ -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

View File

@ -10,37 +10,13 @@ import nsc.Properties.{ propOrElse, propOrNone, propOrEmpty }
package object partest {
import nest.NestUI
def basename(name: String): String = Path(name).stripExtension
def resultsToStatistics(results: Iterable[(_, Int)]): (Int, Int) = {
val (files, failures) = results map (_._2 == 0) partition (_ == true)
(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

View File

@ -1 +0,0 @@
../../../lib/scalacheck-1.7-SNAPSHOT.jar

Binary file not shown.