Skip to content

Make output of errors in testAll less verbose#5413

Merged
lrytz merged 1 commit intoscala:2.12.xfrom
szeiger:wip/less-verbose-testAll
Sep 30, 2016
Merged

Make output of errors in testAll less verbose#5413
lrytz merged 1 commit intoscala:2.12.xfrom
szeiger:wip/less-verbose-testAll

Conversation

@szeiger
Copy link
Contributor

@szeiger szeiger commented Sep 21, 2016

In order to fix the far too verbose output from #5397 (comment).

Previously a failure in an early task with lots of dependent tasks could lead to many megabytes of log output (or even gigabytes? or non-termination?) because the deeply nested failure tree would be traversed and printed in entirety. Now we only print the root cause and its nearest enclosing task for each top-level task, and we prune the tree to remove all duplicates.

A worst-case failure in library/compile (relatively early in the dependency tree; affects every possible test) now looks like this:

> testAll
[info] Compiling 1 Scala source to /Users/szeiger/code/scala/build/quick/classes/library...
[error] /Users/szeiger/code/scala/src/library/scala/Equals.scala:30: expected class or object definition
[error] xxx
[error] ^
[error] one error found
[info] Packaging /Users/szeiger/code/scala/build/pack/lib/scala-partest-javaagent.jar ...
[info] Done packaging.
[error] 11 of 11 test tasks failed:
[error] - junit/test
[error]   - library/compile:compileIncremental failed: Compilation failed
[error] - partest run
[error]   - (library/compile:compileIncremental failed)
[error] - partest pos neg jvm
[error]   - (library/compile:compileIncremental failed)
[error] - partest res scalap specialized scalacheck
[error]   - (library/compile:compileIncremental failed)
[error] - partest instrumented presentation
[error]   - (library/compile:compileIncremental failed)
[error] - partest --srcpath scaladoc
[error]   - (library/compile:compileIncremental failed)
[error] - osgiTestFelix/test
[error]   - (library/compile:compileIncremental failed)
[error] - osgiTestEclipse/test
[error]   - (library/compile:compileIncremental failed)
[error] - library/mima
[error]   - (library/compile:compileIncremental failed)
[error] - reflect/mima
[error]   - (library/compile:compileIncremental failed)
[error] - doc
[error]   - (library/compile:compileIncremental failed)
[trace] Stack trace suppressed: run last root/*:testAll for the full output.
[error] (root/*:testAll) java.lang.RuntimeException
[error] Total time: 1 s, completed Sep 21, 2016 5:27:46 PM
>

@scala-jenkins scala-jenkins added this to the 2.12.1 milestone Sep 21, 2016
@SethTisue
Copy link
Member

history in scala/scala-jenkins-infra#182

@lrytz
Copy link
Member

lrytz commented Sep 30, 2016

LGTM

Thank you!!

@lrytz lrytz merged commit 3880535 into scala:2.12.x Sep 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants