on master help sign in
Jenkins: use one test thread
commit7d79b2ea7fd5bc95ce16d2b13e077d5916f69505 authorMichael Snoyman <michael@snoyman.com> dateWed 28 May 2014, 19:03 (12 years ago) parente9d7b2c
2 files changed+9−2
app/stackage.hs+8−1 jenkins-build.sh+1−1
app/stackage.hs+8−1
@@ -52,6 +52,7 @@ data BuildArgs = BuildArgs
5252 , extraArgs' :: [String] -> [String]
5353 , noDocs :: Bool
5454 , buildCores :: Maybe Int
55+ , testThreads :: Maybe Int
5556 }
5657
5758parseBuildArgs :: GhcMajorVersion -> [String] -> IO BuildArgs
@@ -62,6 +63,7 @@ parseBuildArgs version =
6263 , extraArgs' = id
6364 , noDocs = False
6465 , buildCores = Nothing
66+ , testThreads = Nothing
6567 }
6668 where
6769 loop x [] = return x
@@ -70,6 +72,7 @@ parseBuildArgs version =
7072 loop x ("--arg":y:rest) = loop x { extraArgs' = extraArgs' x . (y:) } rest
7173 loop x ("--no-docs":rest) = loop x { noDocs = True } rest
7274 loop x ("-j":y:rest) = loop x { buildCores = Just $ read y } rest
75+ loop x ("--test-threads":y:rest) = loop x { testThreads = Just $ read y } rest
7376 loop _ (y:_) = error $ "Did not understand argument: " ++ y
7477
7578defaultBuildPlan :: FilePath
@@ -81,7 +84,11 @@ withBuildSettings args f = do
8184 BuildArgs {..} <- parseBuildArgs version args
8285 bp <- readBuildPlan buildPlanSrc
8386 let bs = defaultBuildSettings buildCores version
84− let settings = bs
87+ modTestThreads settings' =
88+ case testThreads of
89+ Nothing -> settings'
90+ Just t -> settings' { testWorkerThreads = t }
91+ settings = modTestThreads bs
8592 { sandboxRoot = sandbox
8693 , extraArgs = extraArgs' . extraArgs bs
8794 , buildDocs = not noDocs
jenkins-build.sh+1−1
@@ -7,5 +7,5 @@ cabal install Cabal
77./dist/build/stackage/stackage select --no-platform
88./dist/build/stackage/stackage check
99./dist/build/stackage/stackage build
10−./dist/build/stackage/stackage test
10+./dist/build/stackage/stackage test --test-threads 1
1111./create-stackage-tarball.sh