Skip to content
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 --tasty-arg to validate.sh #10428

Merged
merged 1 commit into from
Oct 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions cabal-validate/src/Cli.hs
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,11 @@ resolveOpts opts = do

tastyArgs' =
"--hide-successes"
: case rawTastyPattern opts of
Just tastyPattern -> ["--pattern", tastyPattern]
Nothing -> []
: maybe
[]
(\tastyPattern -> ["--pattern", tastyPattern])
(rawTastyPattern opts)
++ rawTastyArgs opts

when (rawListSteps opts) $ do
-- TODO: This should probably list _all_ available steps, not just the selected ones!
Expand Down Expand Up @@ -279,6 +281,7 @@ data RawOpts = RawOpts
, rawCabal :: FilePath
, rawExtraCompilers :: [FilePath]
, rawTastyPattern :: Maybe String
, rawTastyArgs :: [String]
, rawDoctest :: Bool
, rawSteps :: [Step]
, rawListSteps :: Bool
Expand Down Expand Up @@ -343,6 +346,12 @@ rawOptsParser =
<> help "Pattern to filter tests by"
<> value Nothing
)
<*> many
( strOption
( long "tasty-arg"
<> help "Extra arguments to pass to Tasty test suites"
)
)
<*> boolOption
False
"doctest"
Expand Down
Loading