From e40c84ca5cab8fe4a1ead6f26c6193ceb2de8e0d Mon Sep 17 00:00:00 2001 From: Charles McGarvey Date: Fri, 11 Jan 2013 15:25:26 -0700 Subject: [PATCH] output start/end group as tap diagnostics --- src/main/scala/SbtTapReporting.scala | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) 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) { } } -- 2.45.2