New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Concurrent test runner #17
Conversation
c80bea7
to
545aed2
Compare
This is awesome.
Does concurrent-output do the right thing when noninteractive?
… On 8 Apr. 2017, at 7:35 pm, Jacob Stanley ***@***.***> wrote:
This adds support for running tests concurrently.
You can view, comment on, or merge this pull request online at:
#17
Commit Summary
Concurrent test runner
Make read/show tests idiomatic hedgehog
Add tripping module
File Changes
M hedgehog-example/test/Test/Example/Basic.hs (2)
M hedgehog-example/test/Test/Example/Resource.hs (2)
M hedgehog-example/test/Test/Example/STLC.hs (45)
M hedgehog/hedgehog.cabal (3)
M hedgehog/src/Hedgehog.hs (10)
M hedgehog/src/Hedgehog/Internal/Discovery.hs (9)
M hedgehog/src/Hedgehog/Internal/Property.hs (69)
M hedgehog/src/Hedgehog/Internal/Report.hs (90)
M hedgehog/src/Hedgehog/Internal/Runner.hs (214)
M hedgehog/src/Hedgehog/Internal/Seed.hs (11)
M hedgehog/src/Hedgehog/Internal/TH.hs (56)
A hedgehog/src/Hedgehog/Internal/Tripping.hs (47)
M hedgehog/src/Hedgehog/Range.hs (9)
A hedgehog/test/Test/Hedgehog/Text.hs (76)
D hedgehog/test/Text.hs (61)
M hedgehog/test/test.hs (7)
Patch Links:
https://github.com/hedgehogqa/haskell-hedgehog/pull/17.patch
https://github.com/hedgehogqa/haskell-hedgehog/pull/17.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
It does with a bit of help, see When you "finish" a region, that is what is printed in non-tty mode. The issue is that if you finish a region when a test actually completes then you get a somewhat random order of output. So those two functions make sure that we never finish a region before the tests which are ordered prior to it have also been finished. It's probably a bit pendantic, but it makes the whole thing feel a lot nicer. |
-- > tests = | ||
-- > $$(checkSequential) | ||
-- | ||
checkSequential :: TExpQ (IO Bool) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should have mentioned this before, but I often wondered whether it would be better to generate just the bare minimum, and then do the "running" at the top level. So rather than IO Bool
, just generate the bare minimum Map Name Source
. That said, you may be planning to have files that are either sequential and some concurrent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess you'd be able to better distribute the load that way, but we'd need a way to mark a test a concurrent or sequential, maybe per property is a better approach anyway
This adds support for running tests concurrently.