Improved SuperSABBUS w.r.t. fail behaviour. Fixed the Left/Right issue in a more appropriate fashion (scalac will look for classes in the sourcepath based on file name).

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@14325 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
dubochet 2008-03-07 13:42:56 +00:00
parent aaf11cb2bb
commit ce89dc2ac1
5 changed files with 49 additions and 23 deletions

View File

@ -243,14 +243,12 @@ BUILD QUICK LAYER
<!-- Build library -->
<mkdir dir="${build-quick.dir}/classes/library"/>
<javac
srcdir="${src.dir}/library"
srcdir="${src.dir}"
destdir="${build-quick.dir}/classes/library"
classpath="${build-quick.dir}/classes/library"
includes="**/*.java"/>
<javac srcdir="${src.dir}/actors"
destdir="${build-quick.dir}/classes/library"
classpath="${build-quick.dir}/classes/library"
includes="**/*.java"/>
classpath="${build-quick.dir}/classes/library">
<include name="library/**/*.java"/>
<include name="actors/**/*.java"/>
</javac>
<sabmake id="locker.lib.scalac"
destdir="${build-quick.dir}/classes/library"
compilerpathref="locker.classpath"
@ -354,12 +352,10 @@ BUILD STRAP LAYER
<javac
srcdir="${src.dir}/library"
destdir="${build-strap.dir}/classes/library"
classpath="${build-strap.dir}/classes/library"
includes="**/*.java"/>
<javac srcdir="${src.dir}/actors"
destdir="${build-strap.dir}/classes/library"
classpath="${build-strap.dir}/classes/library"
includes="**/*.java"/>
classpath="${build-strap.dir}/classes/library">
<include name="library/**/*.java"/>
<include name="actors/**/*.java"/>
</javac>
<sabmake id="quick.lib.scalac"
destdir="${build-strap.dir}/classes/library"
compilerpathref="quick.classpath"
@ -595,7 +591,7 @@ BOOTRAPING TEST AND TEST SUITE
<target name="suite.test" depends="partest.load, pack.load">
<taskdef resource="scala/tools/partest/antlib.xml" classpathref="pack.classpath"/>
<partest showlog="yes">
<partest showlog="yes" erroronfailed="yes">
<classpath>
<path refid="pack.classpath"/>
<fileset dir="${test.dir}/files/lib" includes="*.jar"/>

View File

@ -446,14 +446,6 @@ sealed trait Either[+A, +B] {
case Right(_) => None
}
}
/**
* The left side of the disjoin union, as opposed to the <code>Right</code> side.
*/
final case class Left[+A, +B](a: A) extends Either[A, B]
/**
* The right side of the disjoin union, as opposed to the <code>Left</code> side.
*/
final case class Right[+A, +B](b: B) extends Either[A, B]
import Function.untupled

View File

@ -0,0 +1,16 @@
/* __ *\
** ________ ___ / / ___ Scala API **
** / __/ __// _ | / / / _ | (c) 2002-2008, LAMP/EPFL **
** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\___/_/ |_/____/_/ | | **
** |/ **
\* */
// $Id: Either.scala 14320 2008-03-07 10:53:38Z washburn $
package scala
/**
* The left side of the disjoin union, as opposed to the <code>Right</code> side.
*/
final case class Left[+A, +B](a: A) extends Either[A, B]

View File

@ -0,0 +1,16 @@
/* __ *\
** ________ ___ / / ___ Scala API **
** / __/ __// _ | / / / _ | (c) 2002-2008, LAMP/EPFL **
** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\___/_/ |_/____/_/ | | **
** |/ **
\* */
// $Id: Either.scala 14320 2008-03-07 10:53:38Z washburn $
package scala
/**
* The right side of the disjoin union, as opposed to the <code>Left</code> side.
*/
final case class Right[+A, +B](b: B) extends Either[A, B]

View File

@ -49,6 +49,9 @@ class PartestTask extends Task {
def setShowDiff(input: Boolean): Unit =
showDiff = input
def setErrorOnFailed(input: Boolean): Unit =
errorOnFailed = input
private var classpath: Option[Path] = None
private var javacmd: Option[File] = None
@ -59,6 +62,7 @@ class PartestTask extends Task {
private var negFiles: Option[FileSet] = None
private var runFiles: Option[FileSet] = None
private var residentFiles: Option[FileSet] = None
private var errorOnFailed: Boolean = false
private def getPosFiles: Array[File] =
if (!posFiles.isEmpty) {
@ -180,8 +184,10 @@ class PartestTask extends Task {
log("There where no tests to run.")
else if (allFailures == 0)
log("Test suite finished with no failures.")
else if (errorOnFailed)
error("Test suite finished with " + allFailures + " case" + (if (allFailures > 1) "s" else "") + " failing.")
else
log("Test suite finished with " + allFailures + " case" + (if (allFailures > 0) "s" else "") + " failing.")
log("Test suite finished with " + allFailures + " case" + (if (allFailures > 1) "s" else "") + " failing.")
}