在不运行的情况下构建 haskell 堆栈测试



我做了一个非常简单的项目,测试套件失败 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

我不确定这是错误还是功能。如果您对开发人员的反馈感兴趣,可以在此处打开问题。就我个人而言,在build之前通过--test似乎很奇怪.在某种合理的意义上--testbuild的子部分,子部分或选项通常指定在主选项的右侧。

此外,还有您想要的较短版本(因为build --test只是test(:

$ stack test --no-run-tests

最新更新