From beae91541d38b5d5547d99feb33aaaad76250d16 Mon Sep 17 00:00:00 2001 From: Andreas Abel <andreas.abel@ifi.lmu.de> Date: Fri, 13 Jan 2023 12:06:34 +0100 Subject: [PATCH] cabal-testsuite #8401: communicate better that `--with-cabal` is needed - Add caveat to `--help` text. - Put `--with-cabal` into very first example in README. --- cabal-testsuite/README.md | 4 ++-- cabal-testsuite/src/Test/Cabal/Monad.hs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cabal-testsuite/README.md b/cabal-testsuite/README.md index de9826ec43..4b6643eec5 100644 --- a/cabal-testsuite/README.md +++ b/cabal-testsuite/README.md @@ -7,8 +7,8 @@ How to run 1. Build `cabal-testsuite` (`cabal build cabal-testsuite:cabal-tests`) 2. Run the `cabal-tests` executable. It will scan for all tests in your current directory and subdirectories and run them. - To run a specific set of tests, use `cabal-tests PATH ...`. - (e.g. `cabal run cabal-testsuite:cabal-tests -- cabal-testsuite/PackageTests/TestOptions/setup.test.hs`) + To run a specific set of tests, use `cabal-tests --with-cabal=CABALBIN PATH ...`. + (e.g. `cabal run cabal-testsuite:cabal-tests -- --with-cabal=cabal cabal-testsuite/PackageTests/TestOptions/setup.test.hs`) You can control parallelism using the `-j` flag. There are a few useful flags: diff --git a/cabal-testsuite/src/Test/Cabal/Monad.hs b/cabal-testsuite/src/Test/Cabal/Monad.hs index 7283f18af1..078351723c 100644 --- a/cabal-testsuite/src/Test/Cabal/Monad.hs +++ b/cabal-testsuite/src/Test/Cabal/Monad.hs @@ -104,7 +104,7 @@ data CommonArgs = CommonArgs { commonArgParser :: Parser CommonArgs commonArgParser = CommonArgs <$> optional (option str - ( help "Path to cabal-install executable to test" + ( help "Path to cabal-install executable to test. If omitted, tests involving cabal-install are skipped!" <> long "with-cabal" <> metavar "PATH" )) -- GitLab