Fixed ant test.suite target for jvm tests that contain directories.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@16920 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
phaller 2009-01-14 16:43:36 +00:00
parent 08bea520b3
commit f751fa263f
3 changed files with 18 additions and 4 deletions

View File

@ -1298,8 +1298,8 @@ BOOTRAPING TEST AND TEST SUITE
<negtests dir="${test.dir}/files/neg" includes="*.scala"/> <negtests dir="${test.dir}/files/neg" includes="*.scala"/>
<runtests dir="${test.dir}/files"> <runtests dir="${test.dir}/files">
<include name="run/**/*.scala"/> <include name="run/**/*.scala"/>
<include name="jvm/**/*.scala"/>
</runtests> </runtests>
<jvmtests dir="${test.dir}/files/jvm" includes="*.scala"/>
<jvm5tests dir="${test.dir}/files/jvm5" includes="*.scala"/> <jvm5tests dir="${test.dir}/files/jvm5" includes="*.scala"/>
<residenttests dir="${test.dir}/files/res" includes="*.res"/> <residenttests dir="${test.dir}/files/res" includes="*.res"/>
<!-- <scripttests dir="${test.dir}/files/script" includes="*.scala"/> --> <!-- <scripttests dir="${test.dir}/files/script" includes="*.scala"/> -->
@ -1322,8 +1322,8 @@ BOOTRAPING TEST AND TEST SUITE
<negtests dir="${test.dir}/files/neg" includes="*.scala"/> <negtests dir="${test.dir}/files/neg" includes="*.scala"/>
<runtests dir="${test.dir}/files"> <runtests dir="${test.dir}/files">
<include name="run/**/*.scala"/> <include name="run/**/*.scala"/>
<include name="jvm/**/*.scala"/>
</runtests> </runtests>
<jvmtests dir="${test.dir}/files/jvm" includes="*.scala"/>
<jvm5tests dir="${test.dir}/files/jvm5" includes="*.scala"/> <jvm5tests dir="${test.dir}/files/jvm5" includes="*.scala"/>
<residenttests dir="${test.dir}/files/res" includes="*.res"/> <residenttests dir="${test.dir}/files/res" includes="*.res"/>
<!-- <scripttests dir="${test.dir}/files/script" includes="*.scala"/> --> <!-- <scripttests dir="${test.dir}/files/script" includes="*.scala"/> -->

View File

@ -308,8 +308,8 @@ work on a JVM 1.5.
<negtests dir="${test.dir}/files/neg" includes="*.scala"/> <negtests dir="${test.dir}/files/neg" includes="*.scala"/>
<runtests dir="${test.dir}/files"> <runtests dir="${test.dir}/files">
<include name="run/**/*.scala"/> <include name="run/**/*.scala"/>
<include name="jvm/**/*.scala"/>
</runtests> </runtests>
<jvmtests dir="${test.dir}/files/jvm" includes="*.scala"/>
<residenttests dir="${test.dir}/files/res" includes="*.res"/> <residenttests dir="${test.dir}/files/res" includes="*.res"/>
</partest> </partest>
</target> </target>
@ -346,8 +346,8 @@ work on a JVM 1.4.
<negtests dir="${test.dir}/files/neg" includes="*.scala"/> <negtests dir="${test.dir}/files/neg" includes="*.scala"/>
<runtests dir="${test.dir}/files"> <runtests dir="${test.dir}/files">
<include name="run/**/*.scala"/> <include name="run/**/*.scala"/>
<include name="jvm/**/*.scala"/>
</runtests> </runtests>
<jvmtests dir="${test.dir}/files/jvm" includes="*.scala"/>
<residenttests dir="${test.dir}/files/res" includes="*.res"/> <residenttests dir="${test.dir}/files/res" includes="*.res"/>
</partest> </partest>
</target> </target>

View File

@ -32,6 +32,9 @@ class PartestTask extends Task {
def addConfiguredRunTests(input: FileSet): Unit = def addConfiguredRunTests(input: FileSet): Unit =
runFiles = Some(input) runFiles = Some(input)
def addConfiguredJvmTests(input: FileSet): Unit =
jvmFiles = Some(input)
def addConfiguredJvm5Tests(input: FileSet): Unit = def addConfiguredJvm5Tests(input: FileSet): Unit =
jvm5Files = Some(input) jvm5Files = Some(input)
@ -92,6 +95,7 @@ class PartestTask extends Task {
private var pos5Files: Option[FileSet] = None private var pos5Files: Option[FileSet] = None
private var negFiles: Option[FileSet] = None private var negFiles: Option[FileSet] = None
private var runFiles: Option[FileSet] = None private var runFiles: Option[FileSet] = None
private var jvmFiles: Option[FileSet] = None
private var jvm5Files: Option[FileSet] = None private var jvm5Files: Option[FileSet] = None
private var residentFiles: Option[FileSet] = None private var residentFiles: Option[FileSet] = None
private var scriptFiles: Option[FileSet] = None private var scriptFiles: Option[FileSet] = None
@ -139,6 +143,9 @@ class PartestTask extends Task {
} }
else else
Array() Array()
private def getJvmFiles: Array[File] =
getFilesAndDirs(jvmFiles)
private def getJvm5Files: Array[File] = private def getJvm5Files: Array[File] =
getFilesAndDirs(jvm5Files) getFilesAndDirs(jvm5Files)
@ -258,6 +265,13 @@ class PartestTask extends Task {
allFailures += failures allFailures += failures
} }
if (getJvmFiles.size > 0) {
log("Compiling and running files")
val (successes, failures) = runTestsForFiles(getJvmFiles, "jvm")
allSucesses += successes
allFailures += failures
}
if (getJvm5Files.size > 0) { if (getJvm5Files.size > 0) {
log("Compiling and running files") log("Compiling and running files")
val (successes, failures) = runTestsForFiles(getJvm5Files, "jvm5") val (successes, failures) = runTestsForFiles(getJvm5Files, "jvm5")