Skip to content
This repository was archived by the owner on Sep 8, 2022. It is now read-only.

Print the transcript to the console when running with —verbose from sbt #51

Merged
merged 1 commit into from
Feb 12, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions src/main/scala/scala/tools/partest/nest/AbstractRunner.scala
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ abstract class AbstractRunner(argstr: String) extends {
oempty(p, f, s) mkString ", "
}

protected var partestCmd = "test/partest"
protected var summarizing = false
protected var printSummary = true
private var elapsedMillis = 0L
private var expectedFailures = 0
protected def isSuccess = failedTests.size == expectedFailures
Expand All @@ -70,18 +72,20 @@ abstract class AbstractRunner(argstr: String) extends {
if (isPartestVerbose) {
echo(bold(cyan("##### Transcripts from failed tests #####\n")))
failed0 foreach { state =>
comment("partest " + state.testFile)
comment(partestCmd + " " + state.testFile)
echo(state.transcriptString + "\n")
}
}

def files_s = failed0.map(_.testFile).mkString(""" \""" + "\n ")
echo("# Failed test paths (this command will update checkfiles)")
echo("test/partest --update-check \\\n " + files_s + "\n")
echo(partestCmd + " --update-check \\\n " + files_s + "\n")
}

echo(message)
levyJudgment()
if (printSummary) {
echo(message)
levyJudgment()
}
}
}

Expand Down
3 changes: 2 additions & 1 deletion src/main/scala/scala/tools/partest/nest/SBTRunner.scala
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class SBTRunner(partestFingerprint: Fingerprint, eventHandler: EventHandler, log
extends AbstractRunner(args.filter(a => !a.startsWith("-D")).mkString(" ")) {

// no summary, SBT will do that for us
summarizing = true
printSummary = false
partestCmd = "partest"

val javaOpts = {
val l = args.filter(_.startsWith("-Dpartest.java_opts=")).map(_.substring(20))
Expand Down