@@ -18,7 +18,7 @@ import scala.concurrent.duration.Duration
18
18
import scala .reflect .internal .FatalError
19
19
import scala .reflect .internal .util .ScalaClassLoader
20
20
import scala .sys .process .{Process , ProcessLogger }
21
- import scala .tools .nsc .Properties .{envOrNone , isWin , javaHome , javaVmInfo , javaVmName , javaVmVersion , propOrEmpty , versionMsg }
21
+ import scala .tools .nsc .Properties .{isWin , javaHome , javaVmInfo , javaVmName , javaVmVersion , propOrEmpty , versionMsg }
22
22
import scala .tools .nsc .{CompilerCommand , Global , Settings }
23
23
import scala .tools .nsc .reporters .ConsoleReporter
24
24
import scala .tools .nsc .util .stackTraceString
@@ -89,9 +89,6 @@ class Runner(val testFile: File, val suiteRunner: SuiteRunner, val nestUI: NestU
89
89
90
90
lazy val outDir = { outFile.mkdirs() ; outFile }
91
91
92
- // oh boy...
93
- private lazy val antLauncher = SFile (Path (envOrNone(" ANT_HOME" ) getOrElse " /opt/ant/" ) / " lib/ant-launcher.jar" )
94
-
95
92
type RanOneTest = (Boolean , LogContext )
96
93
97
94
def showCrashInfo (t : Throwable ) {
@@ -594,42 +591,6 @@ class Runner(val testFile: File, val suiteRunner: SuiteRunner, val nestUI: NestU
594
591
compilationRounds(testFile).forall(x => nextTestActionExpectTrue(" compilation failed" , x.isOk)) && andAlso
595
592
}
596
593
597
- // Apache Ant 1.6 or newer
598
- def ant (args : Seq [String ], output : File ): Boolean = {
599
- val antOptions =
600
- if (nestUI.verbose) List (" -verbose" , " -noinput" )
601
- else List (" -noinput" )
602
- val cmd = javaCmdPath +: (
603
- suiteRunner.javaOpts.split(' ' ).map(_.trim).filter(_ != " " ) ++ Seq (
604
- " -classpath" ,
605
- antLauncher.path,
606
- " org.apache.tools.ant.launch.Launcher"
607
- ) ++ antOptions ++ args
608
- )
609
-
610
- runCommand(cmd.toIndexedSeq, output)
611
- }
612
-
613
- def runAntTest (): (Boolean , LogContext ) = {
614
- val (swr, wr) = newTestWriters()
615
-
616
- val succeeded = try {
617
- val binary = " -Dbinary=" + fileManager.distKind
618
- val args = Array (binary, " -logfile" , logFile.getPath, " -file" , testFile.getPath)
619
- nestUI.verbose(" ant " + args.mkString(" " ))
620
-
621
- pushTranscript(s " ant ${args.mkString(" " )}" )
622
- nextTestActionExpectTrue(" ant failed" , ant(args.toIndexedSeq, logFile)) && diffIsOk
623
- }
624
- catch { // *catch-all*
625
- case e : Exception =>
626
- nestUI.warning(" caught " + e)
627
- false
628
- }
629
-
630
- (succeeded, LogContext (logFile, swr, wr))
631
- }
632
-
633
594
def extraClasspath = kind match {
634
595
case " specialized" => List (PathSettings .srcSpecLib.fold(sys.error, identity))
635
596
case _ => Nil
@@ -714,7 +675,6 @@ class Runner(val testFile: File, val suiteRunner: SuiteRunner, val nestUI: NestU
714
675
if (kind == " neg" || (kind endsWith " -neg" )) runNegTest()
715
676
else kind match {
716
677
case " pos" => runTestCommon(true )
717
- case " ant" => runAntTest()
718
678
case " res" => runResidentTest()
719
679
case " scalap" => runScalapTest()
720
680
case " script" => runScriptTest()
@@ -792,7 +752,7 @@ object Properties extends scala.util.PropertiesTrait {
792
752
protected def pickJarBasedOn = classOf [SuiteRunner ]
793
753
}
794
754
795
- /** Extended by Ant - and ConsoleRunner for running a set of tests. */
755
+ /** Used by SBT - and ConsoleRunner for running a set of tests. */
796
756
class SuiteRunner (
797
757
val testSourcePath : String , // relative path, like "files", or "pending"
798
758
val fileManager : FileManager ,
0 commit comments