Skip to content

Commit

Permalink
consensus-test: remove TestEnvConfig.dev
Browse files Browse the repository at this point in the history
It was always overriding the standard --quickcheck-tests argument to Tasty.
  • Loading branch information
nfrisby committed Mar 27, 2023
1 parent 832b4dc commit 2f6ba55
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
@@ -0,0 +1,3 @@
### Patch

- The `dev` setting of the `Test.Util.TestEnv` option now leaves the standard `QuickCheckTests` `tasty` option unchanged instead of forcing it to 100, which was causing `--quickcheck-tests` to be ignored.
6 changes: 3 additions & 3 deletions ouroboros-consensus-test/src/Test/Util/TestEnv.hs
Expand Up @@ -29,18 +29,18 @@ withTestEnv :: TestEnvConfig -> TestTree -> TestTree
withTestEnv TestEnvConfig{..} testTree = askOption $ \case
Nightly -> localOption (QuickCheckTests nightly) testTree
CI -> localOption (QuickCheckTests ci) testTree
Dev -> localOption (QuickCheckTests dev) testTree
Dev -> testTree

-- | Query and adjust options for `TestEnv`
askTestEnv :: (TestEnv -> TestTree) -> TestTree
askTestEnv = askOption

-- | Test configurations for test environment
data TestEnvConfig = TestEnvConfig { nightly :: Int, ci :: Int, dev :: Int }
data TestEnvConfig = TestEnvConfig { nightly :: Int, ci :: Int }

-- | Default set of tests for each environment
defaultTestEnvConfig :: TestEnvConfig
defaultTestEnvConfig = TestEnvConfig { nightly = 100000, ci = 10000, dev = 100 }
defaultTestEnvConfig = TestEnvConfig { nightly = 100000, ci = 10000 }

-- | An 'Option' that indicates the environment in which to run tests.
data TestEnv = Nightly | CI | Dev
Expand Down

0 comments on commit 2f6ba55

Please sign in to comment.