@@ -10,7 +10,7 @@ class DPDirectCompiler(runner: DPTestRunner) extends nest.DirectCompiler(runner)
10
10
11
11
override def compile (opts0 : List [String ], sources : List [File ]): TestState = {
12
12
val clogStream = new PrintStream (new FileOutputStream (runner.cLogFile.jfile), true )
13
- clogStream.println(" \n compiling " + sources.mkString(" " ) + " \n options: " + opts0.mkString(" " ))
13
+ clogStream.println(" \n XXcompiling " + sources.mkString(" " ) + " \n options: " + opts0.mkString(" " ))
14
14
15
15
implicit val ctx : dotty.tools.dotc.core.Contexts .Context = {
16
16
val base = new dotty.tools.dotc.core.Contexts .ContextBase
@@ -23,25 +23,29 @@ class DPDirectCompiler(runner: DPTestRunner) extends nest.DirectCompiler(runner)
23
23
24
24
val savedOut = System .out
25
25
val savedErr = System .err
26
- try {
26
+ // try {
27
27
val processor =
28
28
if (opts0.exists(_.startsWith(" #" ))) dotty.tools.dotc.Bench else dotty.tools.dotc.Main
29
29
30
- System .setOut(clogStream)
31
- System .setErr(clogStream)
30
+ // System.setOut(clogStream)
31
+ // System.setErr(clogStream)
32
32
33
+ clogStream.println(" Start" )
33
34
val reporter = processor.process((sources.map(_.toString) ::: opts0).toArray)
35
+ clogStream.println(" Done" )
36
+ val out =
34
37
if (! reporter.hasErrors) runner.genPass()
35
38
else {
36
39
reporter.printSummary(ctx)
37
40
runner.genFail(s " compilation failed with ${reporter.errorCount} errors " )
38
41
}
39
- } catch {
40
- case t : Throwable => runner.genCrash(t)
41
- } finally {
42
- System .setOut(savedOut)
43
- System .setErr(savedErr)
42
+ // } catch {
43
+ // case t: Throwable => runner.genCrash(t)
44
+ // } finally {
45
+ // System.setOut(savedOut)
46
+ // System.setErr(savedErr)
44
47
clogStream.close
45
- }
48
+ // }
49
+ out
46
50
}
47
51
}
0 commit comments