haskell 我怎样才能用cabal new-test流测试结果?

mxg2im7a  于 2022-11-14  发布在  其他
关注(0)|答案(2)|浏览(126)

通过使用cabal test,您可以使用cabal test --show-details=streaming流式传输结果。
我找不到cabal new-test的类似选项。是否可以使用new-test来串流结果?

n7taea2i

n7taea2i1#

我自己一小时前才碰到的!
new-test尚不支持--show-details标志:https://github.com/haskell/cabal/issues/4766
bug报告中的讨论表明,也许--show-details无论如何都是一个错误的特性,它应该总是流。

83qze16e

83qze16e2#

PR 5455开始(Cabal-install 3之后可用,请参阅变更记录),您可以使用旗标:
--**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)

相关问题