Jenkins: use one test thread
This commit is contained in:
parent
e9d7b2c2ce
commit
7d79b2ea7f
2 changed files with 9 additions and 2 deletions
|
@ -52,6 +52,7 @@ data BuildArgs = BuildArgs
|
|||
, extraArgs' :: [String] -> [String]
|
||||
, noDocs :: Bool
|
||||
, buildCores :: Maybe Int
|
||||
, testThreads :: Maybe Int
|
||||
}
|
||||
|
||||
parseBuildArgs :: GhcMajorVersion -> [String] -> IO BuildArgs
|
||||
|
@ -62,6 +63,7 @@ parseBuildArgs version =
|
|||
, extraArgs' = id
|
||||
, noDocs = False
|
||||
, buildCores = Nothing
|
||||
, testThreads = Nothing
|
||||
}
|
||||
where
|
||||
loop x [] = return x
|
||||
|
@ -70,6 +72,7 @@ parseBuildArgs version =
|
|||
loop x ("--arg":y:rest) = loop x { extraArgs' = extraArgs' x . (y:) } rest
|
||||
loop x ("--no-docs":rest) = loop x { noDocs = True } rest
|
||||
loop x ("-j":y:rest) = loop x { buildCores = Just $ read y } rest
|
||||
loop x ("--test-threads":y:rest) = loop x { testThreads = Just $ read y } rest
|
||||
loop _ (y:_) = error $ "Did not understand argument: " ++ y
|
||||
|
||||
defaultBuildPlan :: FilePath
|
||||
|
@ -81,7 +84,11 @@ withBuildSettings args f = do
|
|||
BuildArgs {..} <- parseBuildArgs version args
|
||||
bp <- readBuildPlan buildPlanSrc
|
||||
let bs = defaultBuildSettings buildCores version
|
||||
let settings = bs
|
||||
modTestThreads settings' =
|
||||
case testThreads of
|
||||
Nothing -> settings'
|
||||
Just t -> settings' { testWorkerThreads = t }
|
||||
settings = modTestThreads bs
|
||||
{ sandboxRoot = sandbox
|
||||
, extraArgs = extraArgs' . extraArgs bs
|
||||
, buildDocs = not noDocs
|
||||
|
|
|
@ -7,5 +7,5 @@ cabal install Cabal
|
|||
./dist/build/stackage/stackage select --no-platform
|
||||
./dist/build/stackage/stackage check
|
||||
./dist/build/stackage/stackage build
|
||||
./dist/build/stackage/stackage test
|
||||
./dist/build/stackage/stackage test --test-threads 1
|
||||
./create-stackage-tarball.sh
|
||||
|
|
Loading…
Reference in a new issue