From: Charles McGarvey Date: Fri, 11 Jan 2013 22:25:26 +0000 (-0700) Subject: output start/end group as tap diagnostics X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=e40c84ca5cab8fe4a1ead6f26c6193ceb2de8e0d;p=chaz%2Fsbt-tap output start/end group as tap diagnostics --- diff --git a/src/main/scala/SbtTapReporting.scala b/src/main/scala/SbtTapReporting.scala index e828c2d..097157a 100644 --- a/src/main/scala/SbtTapReporting.scala +++ b/src/main/scala/SbtTapReporting.scala @@ -28,7 +28,17 @@ class SbtTapListener extends TestsListener { ) } - def startGroup(name: String) {} + def startGroup(name: String) { + writeTapFields("#", "start", name) + } + + def endGroup(name: String, result: TestResult.Value) { + writeTapFields("#", "end", name, "with result", result.toString.toLowerCase) + } + + def endGroup(name: String, t: Throwable) { + writeTapFields("#", "end", name) + } def testEvent(event: TestEvent) { event.detail.foreach { e: TEvent => @@ -63,7 +73,4 @@ class SbtTapListener extends TestsListener { t.printStackTrace(printWriter) sw.toString } - def endGroup(name: String, t: Throwable) { } - - def endGroup(name: String, result: TestResult.Value) { } }