From a708cac2a393f0e94171fc56c6c9f03ca8b584c8 Mon Sep 17 00:00:00 2001 From: Ethan Atkins Date: Thu, 21 Nov 2019 07:46:37 -0800 Subject: [PATCH] Don't print stack trace for pending tests This can be very noisy, especially for tests that are marked pending because they fail to load the build. These induce a lengthy and largely unhelpful "Reload for batch scripted failed..." error message. --- .../src/main/scala/sbt/scriptedtest/ScriptedTests.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripted-sbt-redux/src/main/scala/sbt/scriptedtest/ScriptedTests.scala b/scripted-sbt-redux/src/main/scala/sbt/scriptedtest/ScriptedTests.scala index 0a6ecc272..fd8290c80 100644 --- a/scripted-sbt-redux/src/main/scala/sbt/scriptedtest/ScriptedTests.scala +++ b/scripted-sbt-redux/src/main/scala/sbt/scriptedtest/ScriptedTests.scala @@ -417,7 +417,7 @@ final class ScriptedTests( if (t.isInstanceOf[TestException]) { t.getCause match { case null | _: SocketException => log.error(s" Cause of test exception: ${t.getMessage}") - case _ => t.printStackTrace() + case _ => if (!pending) t.printStackTrace() } log.play() }