-
Notifications
You must be signed in to change notification settings - Fork 87
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
Add a 'RunOnRepl' module #4358
Add a 'RunOnRepl' module #4358
Conversation
-- * Running the counterexamples | ||
quickCheckeCmdsLockStep | ||
-- * Patterns needed to disambiguate the 'At' and 'Command' symbols printed | ||
-- * by the 'ChainDB.StateMachine' tests. |
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.
typo: Remove leading *
as I don't think you want another list item here
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.
Ups, M-q
😁 Thanks.
@@ -228,6 +228,7 @@ test-suite test-storage | |||
Test.Ouroboros.Storage.ChainDB.Model.Test | |||
Test.Ouroboros.Storage.ChainDB.Paths | |||
Test.Ouroboros.Storage.ChainDB.StateMachine | |||
Test.Ouroboros.Storage.ChainDB.StateMachine.RunOnRepl |
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.
nitpick: Why not just Test.Ouroboros.Storage.ChainDB.StateMachine.REPL
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.
My thought: it's not a REPL, but rather imports to allow the state machine to be run on the REPL. What do you think?
pattern Command cmd rsp xs = | ||
StateMachine.Types.Command (StateMachine.At cmd) (StateMachine.At rsp) xs | ||
|
||
quickCheckeCmdsLockStep :: |
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.
Typo?
quickCheckeCmdsLockStep :: | |
quickCheckCmdsLockStep :: |
-> SmallChunkInfo | ||
-> Commands (StateMachine.At Cmd TestBlock IO) (StateMachine.At Resp TestBlock IO) | ||
-> IO () | ||
quickCheckeCmdsLockStep maxClockSkew chunkInfo cmds = |
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.
quickCheckeCmdsLockStep maxClockSkew chunkInfo cmds = | |
quickCheckCmdsLockStep maxClockSkew chunkInfo cmds = |
94fbac3
to
9654bfe
Compare
9654bfe
to
b4f9fbf
Compare
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.
Perhaps we could name this module .Utils.RunOnRepl
to convey that it is not a test in itself but utilities for the tests?
-- | ||
-- > quickCheckCmdsLockStep someClockSkew someChunkInfo counterexample | ||
-- | ||
-- Where 'someClockSkew' and 'someChunkInfo' are the ones given by a the |
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.
-- Where 'someClockSkew' and 'someChunkInfo' are the ones given by a the | |
-- Where 'someClockSkew' and 'someChunkInfo' are the ones given by the |
Makes sense. I can rename the module. |
... which allows to (re-)test a counterexample found by the `ChainDB.StateMachine` tests by copying and pasting it in the GHC repl.
b4f9fbf
to
f4909bd
Compare
bors r+ |
Build failed: |
bors r+ |
Build failed: |
bors r+ |
Build failed: |
bors retry |
Build failed: |
... to distinguish this module from a test suite.
f4909bd
to
f2802c3
Compare
bors r+ |
... which allows to (re-)test a counterexample found by the
ChainDB.StateMachine
tests by copying and pasting it in the GHC repl.Part of #4183
Checklist
changelog.d
directory created usingscriv
. If in doubt, see the Consensus release process.interface-CHANGELOG.md