You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using ghcid to run an hspec testsuite. hspec allows to parallelize the test execution. However, by default, the testsuites only use one capability (as witnessed by getNumCapabilities). Which means, that the tests will only be executed in pseudo-parallel. I can change the behavior by calling e.g. getNumProcessors >>= setNumCapabilities before the tests. And with that I can observe a speed-up in test execution in an example testsuite. But that's a bit sad, for two reasons:
It means that +RTS -N$some_number options passed into the testsuite when compiled (i.e. not running through ghcid) will be ignored.
I have to remember to do this, whenever I want truly parallel test execution with ghcid.
Can I somehow pass in -N as an RTS option to ... well, I don't even know. ghci? Or --test ':main +RTS ...'? (The latter doesn't work.)
Also, should using more capabilities be the default?
My full ghcid invocation looks like this, if that matters: ghcid --command "cabal repl test:spec" --test ':main' --warnings
I'm using
ghcid
to run anhspec
testsuite.hspec
allows to parallelize the test execution. However, by default, the testsuites only use one capability (as witnessed bygetNumCapabilities
). Which means, that the tests will only be executed in pseudo-parallel. I can change the behavior by calling e.g.getNumProcessors >>= setNumCapabilities
before the tests. And with that I can observe a speed-up in test execution in an example testsuite. But that's a bit sad, for two reasons:+RTS -N$some_number
options passed into the testsuite when compiled (i.e. not running throughghcid
) will be ignored.ghcid
.Can I somehow pass in
-N
as anRTS
option to ... well, I don't even know.ghci
? Or--test ':main +RTS ...'
? (The latter doesn't work.)Also, should using more capabilities be the default?
My full
ghcid
invocation looks like this, if that matters:ghcid --command "cabal repl test:spec" --test ':main' --warnings
See also: https://hspec.github.io/parallel-spec-execution.html
Thanks!
The text was updated successfully, but these errors were encountered: