How can I stream test results with cabal new-test?
Asked Answered
R

2

6

Using cabal test, you're able to stream results with cabal test --show-details=streaming.

I can't find a comparable option for cabal new-test. Is it possible to stream results using new-test?

Retrogressive answered 23/7, 2018 at 23:50 Comment(0)
C
5

I just ran into this an hour ago myself!

The --show-details flag is not yet supported by new-test: https://github.com/haskell/cabal/issues/4766

The discussion in the bug report indicate that maybe --show-details was a misfeature anyways, and it should always just stream.

Chante answered 24/7, 2018 at 2:47 Comment(0)
M
4

As of PR 5455 (probably available since Cabal-install 3, see changelog), you can use --test-show-details=streaming:

~/hackage-server $ cabal test --enable-tests --test-show-details=streaming ReverseDependenciesTest
Building test suite 'ReverseDependenciesTest' for hackage-server-0.5.1..
Test suite ReverseDependenciesTest: RUNNING...
ReverseDependenciesTest
  with set [beeline->mtl] and querying for mtl, we get beeline:                                        OK
  revPackageName selects only latest version, even if it has no dependency on chosen package:          OK
  revPackageId does select old version when queried with old reverse dependency:                       OK
  revPackageName can find multiple packages:                                                           OK
  with set [beeline->mtl->base, lens->mtl->base], revPackageFlat 'base' finds [beeline, lens, mtl]:    OK
  with set [beeline->mtl->base, lens->mtl->base], revPackageStats 'base' return 1,3:                   OK
  with set [beeline->mtl->base, lens->mtl->base], queryReverseDeps 'base' return [mtl],[beeline,lens]: OK

All 7 tests passed (0.01s)
Myatt answered 15/5, 2022 at 21:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.