summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/partest/scala/tools/partest/nest/NestUI.scala4
-rw-r--r--src/partest/scala/tools/partest/nest/Worker.scala18
2 files changed, 10 insertions, 12 deletions
diff --git a/src/partest/scala/tools/partest/nest/NestUI.scala b/src/partest/scala/tools/partest/nest/NestUI.scala
index 2bf7cd0667..38110645ba 100644
--- a/src/partest/scala/tools/partest/nest/NestUI.scala
+++ b/src/partest/scala/tools/partest/nest/NestUI.scala
@@ -116,8 +116,4 @@ object NestUI {
println(msg)
}
}
- def shout(msg: String) {
- warning("something is wrong:")
- println(msg)
- }
}
diff --git a/src/partest/scala/tools/partest/nest/Worker.scala b/src/partest/scala/tools/partest/nest/Worker.scala
index f6991b468b..3be3c34a62 100644
--- a/src/partest/scala/tools/partest/nest/Worker.scala
+++ b/src/partest/scala/tools/partest/nest/Worker.scala
@@ -360,12 +360,15 @@ class Worker(val fileManager: FileManager, params: TestRunParams) extends Actor
lines foreach (x => NestUI.normal(x + "\n"))
}
}
+ def logStackTrace(logFile: File, t: Throwable, msg: String): Boolean = {
+ SFile(logFile).writeAll(msg, stackTraceString(t))
+ outputLogFile(logFile) // if running the test threw an exception, output log file
+ false
+ }
+
def exHandler(logFile: File): PartialFunction[Throwable, Boolean] = exHandler(logFile, "")
def exHandler(logFile: File, msg: String): PartialFunction[Throwable, Boolean] = {
- case e: Exception =>
- SFile(logFile).writeAll(msg, stackTraceString(e))
- outputLogFile(logFile) // if running the test threw an exception, output log file
- false
+ case e: Exception => logStackTrace(logFile, e, msg)
}
/** Runs a list of tests.
@@ -966,10 +969,9 @@ class Worker(val fileManager: FileManager, params: TestRunParams) extends Actor
try processSingleFile(testFile)
catch {
case t: Throwable =>
- NestUI.shout("Caught something while invoking processSingleFile(%s)".format(testFile))
- t.printStackTrace
- NestUI.normal("There were " + filesRemaining.size + " files remaining: " + filesRemaining.mkString(", "))
- LogContext(null, None)
+ val logFile = createLogFile(testFile, kind)
+ logStackTrace(logFile, t, "Possible compiler crash during test of: " + testFile)
+ LogContext(logFile, None)
}
parent ! Result(testFile, context)
}