Skip to content

Commit 470ee94

Browse files
authored
Merge pull request #10428 from 9999years/add-validate-tasty-arg
Add `--tasty-arg` to `validate.sh`
2 parents ebe9f55 + 1447fda commit 470ee94

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

cabal-validate/src/Cli.hs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,9 +234,11 @@ resolveOpts opts = do
234234

235235
tastyArgs' =
236236
"--hide-successes"
237-
: case rawTastyPattern opts of
238-
Just tastyPattern -> ["--pattern", tastyPattern]
239-
Nothing -> []
237+
: maybe
238+
[]
239+
(\tastyPattern -> ["--pattern", tastyPattern])
240+
(rawTastyPattern opts)
241+
++ rawTastyArgs opts
240242

241243
when (rawListSteps opts) $ do
242244
-- TODO: This should probably list _all_ available steps, not just the selected ones!
@@ -279,6 +281,7 @@ data RawOpts = RawOpts
279281
, rawCabal :: FilePath
280282
, rawExtraCompilers :: [FilePath]
281283
, rawTastyPattern :: Maybe String
284+
, rawTastyArgs :: [String]
282285
, rawDoctest :: Bool
283286
, rawSteps :: [Step]
284287
, rawListSteps :: Bool
@@ -343,6 +346,12 @@ rawOptsParser =
343346
<> help "Pattern to filter tests by"
344347
<> value Nothing
345348
)
349+
<*> many
350+
( strOption
351+
( long "tasty-arg"
352+
<> help "Extra arguments to pass to Tasty test suites"
353+
)
354+
)
346355
<*> boolOption
347356
False
348357
"doctest"

0 commit comments

Comments
 (0)