![](/img/trans.png)
[英]Disable building and running tests for all Haskell dependencies in a Nix build
[英]Build haskell stack tests without running
我用一个失败的测试套件制作了一个非常简单的项目https://github.com/k-bx/noruntests-play
现在,当我运行stack --test --no-run-tests build
我希望它能够构建项目,但不会运行测试。 相反,它运行测试:
➜ noruntests-play git:(master) stack --test --no-run-tests build
noruntests-play-0.1.0.0: test (suite: test)
test: error
CallStack (from HasCallStack):
error, called at tests/Tests.hs:4:8 in main:Main
Test suite failure for package noruntests-play-0.1.0.0
test: exited with: ExitFailure 1
Logs printed to console
我在这做错了什么? 谢谢!
你应该把build
选项之前--test
是这样的:
$ stack build --test --no-run-tests
我不确定它是否是错误或功能。 如果您对开发人员的反馈感兴趣,可以在此处打开问题。 个人对我来说似乎有些奇怪传递--test
之前build
。 在某种合理的意义上--test
是build
子部分,子部分或选项通常指定在主选项的右侧。
还有你想要的更短版本(因为build --test
只是test
):
$ stack test --no-run-tests
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.