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]
|
, extraArgs' :: [String] -> [String]
|
||||||
, noDocs :: Bool
|
, noDocs :: Bool
|
||||||
, buildCores :: Maybe Int
|
, buildCores :: Maybe Int
|
||||||
|
, testThreads :: Maybe Int
|
||||||
}
|
}
|
||||||
|
|
||||||
parseBuildArgs :: GhcMajorVersion -> [String] -> IO BuildArgs
|
parseBuildArgs :: GhcMajorVersion -> [String] -> IO BuildArgs
|
||||||
|
@ -62,6 +63,7 @@ parseBuildArgs version =
|
||||||
, extraArgs' = id
|
, extraArgs' = id
|
||||||
, noDocs = False
|
, noDocs = False
|
||||||
, buildCores = Nothing
|
, buildCores = Nothing
|
||||||
|
, testThreads = Nothing
|
||||||
}
|
}
|
||||||
where
|
where
|
||||||
loop x [] = return x
|
loop x [] = return x
|
||||||
|
@ -70,6 +72,7 @@ parseBuildArgs version =
|
||||||
loop x ("--arg":y:rest) = loop x { extraArgs' = extraArgs' x . (y:) } rest
|
loop x ("--arg":y:rest) = loop x { extraArgs' = extraArgs' x . (y:) } rest
|
||||||
loop x ("--no-docs":rest) = loop x { noDocs = True } 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 ("-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
|
loop _ (y:_) = error $ "Did not understand argument: " ++ y
|
||||||
|
|
||||||
defaultBuildPlan :: FilePath
|
defaultBuildPlan :: FilePath
|
||||||
|
@ -81,7 +84,11 @@ withBuildSettings args f = do
|
||||||
BuildArgs {..} <- parseBuildArgs version args
|
BuildArgs {..} <- parseBuildArgs version args
|
||||||
bp <- readBuildPlan buildPlanSrc
|
bp <- readBuildPlan buildPlanSrc
|
||||||
let bs = defaultBuildSettings buildCores version
|
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
|
{ sandboxRoot = sandbox
|
||||||
, extraArgs = extraArgs' . extraArgs bs
|
, extraArgs = extraArgs' . extraArgs bs
|
||||||
, buildDocs = not noDocs
|
, buildDocs = not noDocs
|
||||||
|
|
|
@ -7,5 +7,5 @@ cabal install Cabal
|
||||||
./dist/build/stackage/stackage select --no-platform
|
./dist/build/stackage/stackage select --no-platform
|
||||||
./dist/build/stackage/stackage check
|
./dist/build/stackage/stackage check
|
||||||
./dist/build/stackage/stackage build
|
./dist/build/stackage/stackage build
|
||||||
./dist/build/stackage/stackage test
|
./dist/build/stackage/stackage test --test-threads 1
|
||||||
./create-stackage-tarball.sh
|
./create-stackage-tarball.sh
|
||||||
|
|
Loading…
Reference in a new issue