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

Commit 33adb01

Browse files
committed
Merge pull request #51 from szeiger/wip/verbose-output
Print the transcript to the console when running with —verbose from sbt
2 parents 24059d8 + 9638ac2 commit 33adb01

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

src/main/scala/scala/tools/partest/nest/AbstractRunner.scala

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ abstract class AbstractRunner(argstr: String) extends {
4747
oempty(p, f, s) mkString ", "
4848
}
4949

50+
protected var partestCmd = "test/partest"
5051
protected var summarizing = false
52+
protected var printSummary = true
5153
private var elapsedMillis = 0L
5254
private var expectedFailures = 0
5355
protected def isSuccess = failedTests.size == expectedFailures
@@ -70,18 +72,20 @@ abstract class AbstractRunner(argstr: String) extends {
7072
if (isPartestVerbose) {
7173
echo(bold(cyan("##### Transcripts from failed tests #####\n")))
7274
failed0 foreach { state =>
73-
comment("partest " + state.testFile)
75+
comment(partestCmd + " " + state.testFile)
7476
echo(state.transcriptString + "\n")
7577
}
7678
}
7779

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

83-
echo(message)
84-
levyJudgment()
85+
if (printSummary) {
86+
echo(message)
87+
levyJudgment()
88+
}
8589
}
8690
}
8791

src/main/scala/scala/tools/partest/nest/SBTRunner.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ class SBTRunner(partestFingerprint: Fingerprint, eventHandler: EventHandler, log
2727
extends AbstractRunner(args.filter(a => !a.startsWith("-D")).mkString(" ")) {
2828

2929
// no summary, SBT will do that for us
30-
summarizing = true
30+
printSummary = false
31+
partestCmd = "partest"
3132

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

0 commit comments

Comments
 (0)