Added config options to partest Ant task
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@14972 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
parent
c5d4ad954d
commit
70a91f19b0
|
@ -274,7 +274,7 @@ BOOTRAPING TEST AND TEST SUITE
|
|||
============================================================================ -->
|
||||
|
||||
<target name="four-test.suite" depends="four-pack.done">
|
||||
<partest showlog="yes" erroronfailed="no">
|
||||
<partest showlog="yes" erroronfailed="no" scalacopts="-target:jvm-1.4">
|
||||
<classpath>
|
||||
<pathelement location="${build-four-pack.dir}/lib/scala-library.jar"/>
|
||||
<pathelement location="${build-four-pack.dir}/lib/scala-compiler.jar"/>
|
||||
|
|
|
@ -58,6 +58,9 @@ class PartestTask extends Task {
|
|||
def setJavaCmd(input: File): Unit =
|
||||
javacmd = Some(input)
|
||||
|
||||
def setScalacOpts(opts: String): Unit =
|
||||
scalacOpts = Some(opts)
|
||||
|
||||
private var classpath: Option[Path] = None
|
||||
private var javacmd: Option[File] = None
|
||||
private var showDiff: Boolean = false
|
||||
|
@ -68,7 +71,8 @@ class PartestTask extends Task {
|
|||
private var runFiles: Option[FileSet] = None
|
||||
private var residentFiles: Option[FileSet] = None
|
||||
private var errorOnFailed: Boolean = false
|
||||
|
||||
private var scalacOpts: Option[String] = None
|
||||
|
||||
private def getPosFiles: Array[File] =
|
||||
if (!posFiles.isEmpty) {
|
||||
val files = posFiles.get
|
||||
|
@ -111,7 +115,7 @@ class PartestTask extends Task {
|
|||
(classpath.get.list map { fs => new File(fs) }) find { f =>
|
||||
f.getName match {
|
||||
case "scala-library.jar" => true
|
||||
case "lib" if (f.getParentFile.getName == "library") => true
|
||||
case "classes" if (f.getParentFile.getName == "library") => true
|
||||
case _ => false
|
||||
}
|
||||
}
|
||||
|
@ -153,7 +157,9 @@ class PartestTask extends Task {
|
|||
setFileManagerStringProperty("JAVACMD", javacmd.get.getAbsolutePath)
|
||||
setFileManagerStringProperty("CLASSPATH", classpath.get.list.mkString(File.pathSeparator))
|
||||
setFileManagerStringProperty("LATEST_LIB", scalaLibrary.get.getAbsolutePath)
|
||||
|
||||
if (!scalacOpts.isEmpty)
|
||||
setFileManagerStringProperty("SCALAC_OPTS", scalacOpts.get)
|
||||
|
||||
var allSucesses: int = 0
|
||||
var allFailures: int = 0
|
||||
|
||||
|
|
Loading…
Reference in New Issue