Issue 1:
Currently we print multiple exception stacks on a test failure. It will be good to

Print only the first exception from a failing test only

In the event of multiple exceptions from different testsets, print all of them only if an env variable is set. Default is to print only one.

Don't print known exceptions raised in the testsystem machinery

Limit stacktrace to last 30 lines?

Issue 2:
I inserted one @test 1 == 2 in a @testset loop in my package and this is the results:

tree type: Test Failed
Expression: 1 == 2
Evaluated: 1 == 2
in record(::Base.Test.DefaultTestSet, ::Base.Test.Fail) at ./test.jl:428
in do_test(::Base.Test.Returned, ::Expr) at ./test.jl:281
in macro expansion; at /home/kristoffer/.julia/v0.6/NearestNeighbors/test/test_inrange.jl:41 [inlined]
in macro expansion; at ./test.jl:733 [inlined]
in macro expansion; at /home/kristoffer/.julia/v0.6/NearestNeighbors/test/test_inrange.jl:0 [inlined]
in macro expansion; at ./test.jl:733 [inlined]
in macro expansion; at /home/kristoffer/.julia/v0.6/NearestNeighbors/test/test_inrange.jl:0 [inlined]
in macro expansion; at ./test.jl:672 [inlined]
in anonymous at ./<missing>:?
in include_from_node1(::String) at ./loading.jl:532
in include(::String) at ./sysimg.jl:14
in include_from_node1(::String) at ./loading.jl:532
in include(::String) at ./sysimg.jl:14
in process_options(::Base.JLOptions) at ./client.jl:289
in _start() at ./client.jl:353
Test Summary: | Pass Fail Total
inrange | 36 3 39
metric | 36 3 39
tree type | 12 1 13
tree type | 12 1 13
tree type | 12 1 13
ERROR: LoadError: LoadError: Some tests did not pass: 36 passed, 3 failed, 0 errored, 0 broken.
in finish(::Base.Test.DefaultTestSet) at ./test.jl:495
in macro expansion; at ./test.jl:679 [inlined]
in anonymous at ./<missing>:?
in include_from_node1(::String) at ./loading.jl:532
in include(::String) at ./sysimg.jl:14
in include_from_node1(::String) at ./loading.jl:532
in include(::String) at ./sysimg.jl:14
in process_options(::Base.JLOptions) at ./client.jl:289
in _start() at ./client.jl:353
while loading /home/kristoffer/.julia/v0.6/NearestNeighbors/test/test_inrange.jl, in expression starting on line 2
while loading /home/kristoffer/.julia/v0.6/NearestNeighbors/test/runtests.jl, in expression starting on line 35
======================================[ ERROR: NearestNeighbors ]=======================================

failed process: Process(`/home/kristoffer/julia/usr/bin/julia -Cnative -J/home/kristoffer/julia/usr/lib/julia/sys.so --compile=yes --depwarn=yes --check-bounds=yes --code-coverage=none --color=yes --compilecache=yes /home/kristoffer/.julia/v0.6/NearestNeighbors/test/runtests.jl`, ProcessExited(1)) [1]

========================================================================================================
INFO: No packages to install, update or remove
ERROR: NearestNeighbors had test errors
in #test#61(::Bool, ::Function, ::Array{AbstractString,1}) at ./pkg/entry.jl:749
in (::Base.Pkg.Entry.#kw##test)(::Array{Any,1}, ::Base.Pkg.Entry.#test, ::Array{AbstractString,1}) at ./<missing>:0
in (::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#test,Tuple{Array{AbstractString,1}}})() at ./pkg/dir.jl:31
in cd(::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#test,Tuple{Array{AbstractString,1}}}, ::String) at ./file.jl:69
in #cd#1(::Array{Any,1}, ::Function, ::Function, ::Array{AbstractString,1}, ::Vararg{Array{AbstractString,1},N}) at ./pkg/dir.jl:31
in (::Base.Pkg.Dir.#kw##cd)(::Array{Any,1}, ::Base.Pkg.Dir.#cd, ::Function, ::Array{AbstractString,1}, ::Vararg{Array{AbstractString,1},N}) at ./<missing>:0
in #test#3(::Bool, ::Function, ::String, ::Vararg{String,N}) at ./pkg/pkg.jl:258
in test(::String, ::Vararg{String,N}) at ./pkg/pkg.jl:258

Is it possible that we could scrub away some of the stackframes here to make things more readable? The backtrace for the "Some tests did not pass" exception seems unnecessary and doesn't include anything related to the user. The backtrace for the actual test failure could maybe be changed so that all frames after the test.jl file gets removed?