@@ -137,8 +137,16 @@ extends SuiteRunner(testSourcePath, fileManager, updateCheck, failed, javaCmdPat
137
137
// Append compiler output to transcript if compilation failed,
138
138
// printed with --verbose option
139
139
case TestState .Fail (f, r@ " compilation failed" , transcript) =>
140
+ NestUI .echo(" 1LOG: [[" + runner.logFile.fileContents + " ]]" )
141
+ NestUI .echo(" 1CLOG: {{" + runner.cLogFile.fileContents + " }}" )
142
+ NestUI .echo(" 1TRANS: <<" + runner.transcript + " >>" )
140
143
TestState .Fail (f, r, transcript ++ runner.cLogFile.fileLines.dropWhile(_ == " " ))
141
- case res => res
144
+ case res @ TestState .Pass (_) => res
145
+ case res =>
146
+ NestUI .echo(" 2LOG: [[" + runner.logFile.fileContents + " ]]" )
147
+ NestUI .echo(" 2CLOG: {{" + runner.cLogFile.fileContents + " }}" )
148
+ NestUI .echo(" 2TRANS: <<" + runner.transcript + " >>" )
149
+ res
142
150
}
143
151
} catch {
144
152
case t : Throwable => throw new RuntimeException (s " Error running $testFile" , t)
@@ -172,6 +180,10 @@ extends SuiteRunner(testSourcePath, fileManager, updateCheck, failed, javaCmdPat
172
180
class DPTestRunner (testFile : File , suiteRunner : DPSuiteRunner ) extends nest.Runner (testFile, suiteRunner) {
173
181
val cLogFile = SFile (logFile).changeExtension(" clog" )
174
182
183
+ override def runTestCommon (andAlso : => Boolean ): (Boolean , LogContext ) = runInContext {
184
+ compilationRounds(testFile).forall(x => nextTestActionExpectTrue(s " compilation failed == ${x}== " , x.isOk)) && andAlso
185
+ }
186
+
175
187
// override to provide DottyCompiler
176
188
override def newCompiler = new dotty.partest.DPDirectCompiler (this )
177
189
0 commit comments