File tree 3 files changed +11
-7
lines changed
3 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ How to run
7
7
1 . Build ` cabal-testsuite ` (` cabal build cabal-testsuite:cabal-tests ` )
8
8
2 . Run the ` cabal-tests ` executable. It will scan for all tests
9
9
in your current directory and subdirectories and run them.
10
- To run a specific set of tests, use ` cabal-tests PATH ... ` .
11
- (e.g. ` cabal run cabal-testsuite:cabal-tests -- cabal-testsuite/PackageTests/TestOptions/setup.test.hs ` )
10
+ To run a specific set of tests, use ` cabal-tests --with-cabal=CABALBIN PATH ... ` .
11
+ (e.g. ` cabal run cabal-testsuite:cabal-tests -- --with-cabal=cabal cabal-testsuite/PackageTests/TestOptions/setup.test.hs ` )
12
12
You can control parallelism using the ` -j ` flag.
13
13
14
14
There are a few useful flags:
Original file line number Diff line number Diff line change @@ -82,8 +82,8 @@ main = do
82
82
-- https://github.com/appveyor/ci/issues/1364
83
83
hSetBuffering stderr LineBuffering
84
84
85
- -- Parse arguments
86
- args <- execParser ( info mainArgParser mempty )
85
+ -- Parse arguments. N.B. 'helper' adds the option `--help`.
86
+ args <- execParser $ info ( mainArgParser <**> helper) mempty
87
87
let verbosity = if mainArgVerbose args then verbose else normal
88
88
89
89
-- To run our test scripts, we need to be able to run Haskell code
Original file line number Diff line number Diff line change
1
+ {-# LANGUAGE CPP #-}
1
2
{-# LANGUAGE ScopedTypeVariables #-}
2
3
3
4
-- | The test monad
@@ -72,7 +73,10 @@ import Distribution.Text
72
73
import Distribution.Verbosity
73
74
import Distribution.Version
74
75
75
- import Data.Monoid ((<>) , mempty )
76
+ #if !MIN_VERSION_base(4,11,0)
77
+ import Data.Monoid ((<>) )
78
+ #endif
79
+ import Data.Monoid (mempty )
76
80
import qualified Control.Exception as E
77
81
import Control.Monad
78
82
import Control.Monad.Trans.Reader
@@ -100,8 +104,8 @@ data CommonArgs = CommonArgs {
100
104
commonArgParser :: Parser CommonArgs
101
105
commonArgParser = CommonArgs
102
106
<$> optional (option str
103
- ( help " Path to cabal-install executable to test"
104
- Data.Monoid. <> long " with-cabal"
107
+ ( help " Path to cabal-install executable to test. If omitted, tests involving cabal-install are skipped! "
108
+ <> long " with-cabal"
105
109
<> metavar " PATH"
106
110
))
107
111
<*> optional (option str
You can’t perform that action at this time.
0 commit comments