Skip to content

Commit 438702c

Browse files
committed
debug
1 parent 7b0f013 commit 438702c

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

test/dotty/partest/DPDirectCompiler.scala

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class DPDirectCompiler(runner: DPTestRunner) extends nest.DirectCompiler(runner)
1010

1111
override def compile(opts0: List[String], sources: List[File]): TestState = {
1212
val clogStream = new PrintStream(new FileOutputStream(runner.cLogFile.jfile), true)
13-
clogStream.println("\ncompiling " + sources.mkString(" ") + "\noptions: " + opts0.mkString(" "))
13+
clogStream.println("\nXXcompiling " + sources.mkString(" ") + "\noptions: " + opts0.mkString(" "))
1414

1515
implicit val ctx: dotty.tools.dotc.core.Contexts.Context = {
1616
val base = new dotty.tools.dotc.core.Contexts.ContextBase
@@ -23,25 +23,29 @@ class DPDirectCompiler(runner: DPTestRunner) extends nest.DirectCompiler(runner)
2323

2424
val savedOut = System.out
2525
val savedErr = System.err
26-
try {
26+
// try {
2727
val processor =
2828
if (opts0.exists(_.startsWith("#"))) dotty.tools.dotc.Bench else dotty.tools.dotc.Main
2929

30-
System.setOut(clogStream)
31-
System.setErr(clogStream)
30+
// System.setOut(clogStream)
31+
// System.setErr(clogStream)
3232

33+
clogStream.println("Start")
3334
val reporter = processor.process((sources.map(_.toString) ::: opts0).toArray)
35+
clogStream.println("Done")
36+
val out =
3437
if (!reporter.hasErrors) runner.genPass()
3538
else {
3639
reporter.printSummary(ctx)
3740
runner.genFail(s"compilation failed with ${reporter.errorCount} errors")
3841
}
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)
4447
clogStream.close
45-
}
48+
// }
49+
out
4650
}
4751
}

0 commit comments

Comments
 (0)