diff options
author | Som Snytt <som.snytt@gmail.com> | 2013-05-10 11:32:29 -0700 |
---|---|---|
committer | Som Snytt <som.snytt@gmail.com> | 2013-05-10 11:32:29 -0700 |
commit | 9e257979ed8799cb9a45b50827449b472b665249 (patch) | |
tree | 90eb372249ba08e28d8945e94c1107dbad003072 | |
parent | 9a2f6c75cce22565b994c0b8bd2af8acc6e6f178 (diff) | |
download | scala-9e257979ed8799cb9a45b50827449b472b665249.tar.gz scala-9e257979ed8799cb9a45b50827449b472b665249.tar.bz2 scala-9e257979ed8799cb9a45b50827449b472b665249.zip |
Par-Test includes log in transcript of failed exec
The previous behavior was that the Failure is generated
before the log is appended to the transcript.
That meant that the summary transcripts wouldn't include
the log file. Luckily, the transcript would say something
like "jvm > showFail-run.log".
-rw-r--r-- | src/partest/scala/tools/partest/nest/Runner.scala | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/partest/scala/tools/partest/nest/Runner.scala b/src/partest/scala/tools/partest/nest/Runner.scala index d8e1eeb9b9..85679ad0b8 100644 --- a/src/partest/scala/tools/partest/nest/Runner.scala +++ b/src/partest/scala/tools/partest/nest/Runner.scala @@ -227,10 +227,11 @@ class Runner(val testFile: File, fileManager: FileManager, val testRunParams: Te private def execTest(outDir: File, logFile: File): Boolean = { val cmd = assembleTestCommand(outDir, logFile) - pushTranscript(cmd.mkString(" \\\n ") + " > " + logFile.getName) - nextTestActionExpectTrue("non-zero exit code", runCommand(cmd, logFile)) || { - _transcript append logFile.fileContents - false + pushTranscript((cmd mkString s" \\$EOL ") + " > " + logFile.getName) + nextTestAction(runCommand(cmd, logFile)) { + case false => + _transcript append EOL + logFile.fileContents + genFail("non-zero exit code") } } |