Open andyscott opened 6 years ago
That is usually up to the test framework.
For example, the existing //test-framework/classpath:bad
shows a truncated stack trace.
FAIL: //test-frameworks/classpath:bad (see /home/paul/.cache/bazel/_bazel_paul/f84776a0618f0e3dcf1c416f8fd69d56/execroot/__main__/bazel-out/k8-fastbuild/testlogs/test-frameworks/classpath/bad/test.log)
INFO: From Testing //test-frameworks/classpath:bad:
==================== Test output for //test-frameworks/classpath:bad:
org.specs2.runner.Specs2Framework: 1 tests
Test
Test
Classpath should
! load class
java.lang.ClassNotFoundException: sbt.internal.inc.schema.APIsFile (CLassLoaders.scala:20)
higherkindness.rules_scala.common.sbt_testing.ClassLoaders$$anon$1.findClass(CLassLoaders.scala:20)
Test$.$anonfun$new$2(Test.scala:7)
Total for specification Test
Finished in 575 ms
1 example, 0 failure, 1 error
1 failure:
Test
In your example, I believe the test framework has not caught the error and reported it via the usual test mechanisms, but rather allowed it to propagate all the way to main().
And in the case of a runaway error, I would not want to prune the stack trace at all.
We should prune annex items from stack traces.
Current formatted as diff of desired change: