diff options
author | Ben Gamari <ben@smart-cactus.org> | 2022-07-22 17:48:32 -0400 |
---|---|---|
committer | Matthew Pickering <matthewtpickering@gmail.com> | 2022-10-12 12:06:02 +0100 |
commit | ad04f37c4c5002f6a65b24bcaf10d49759497580 (patch) | |
tree | c11a3d99ebbafb01f9089c0297ad1792a35f53dc /.gitlab | |
parent | 27978ceb649e929df29a94e98916c341169395af (diff) | |
download | haskell-ad04f37c4c5002f6a65b24bcaf10d49759497580.tar.gz |
gitlab-ci: Add support for test speed
Diffstat (limited to '.gitlab')
-rwxr-xr-x | .gitlab/ci.sh | 2 | ||||
-rwxr-xr-x | .gitlab/gen_ci.hs | 12 |
2 files changed, 13 insertions, 1 deletions
diff --git a/.gitlab/ci.sh b/.gitlab/ci.sh index 1200e883e4..ea0ebbc2f5 100755 --- a/.gitlab/ci.sh +++ b/.gitlab/ci.sh @@ -89,6 +89,7 @@ Environment variables determining build configuration of Hadrian system: REINSTALL_GHC Build and test a reinstalled "stage3" ghc built using cabal-install This tests the "reinstall" configuration CROSS_EMULATOR The emulator to use for testing of cross-compilers. + TEST_SPEED What "speed" of the testsuite to run (normal, slow, fast) Environment variables determining bootstrap toolchain (Linux): @@ -629,6 +630,7 @@ function test_hadrian() { --summary-junit=./junit.xml \ --test-have-intree-files \ --test-compiler="${test_compiler}" \ + --test-speed="${TEST_SPEED:-normal}" \ "runtest.opts+=${RUNTEST_ARGS:-}" || fail "hadrian main testsuite" info "STAGE2_TEST=$?" diff --git a/.gitlab/gen_ci.hs b/.gitlab/gen_ci.hs index db338b88d4..fcdee781c7 100755 --- a/.gitlab/gen_ci.hs +++ b/.gitlab/gen_ci.hs @@ -103,6 +103,8 @@ data LinuxDistro data Arch = Amd64 | AArch64 | ARMv7 | I386 +data TestSpeed = TestSpeedSlow | TestSpeedNormal | TestSpeedFast + data BignumBackend = Native | Gmp deriving Eq bignumString :: BignumBackend -> String @@ -124,6 +126,7 @@ data BuildConfig , fullyStatic :: Bool , tablesNextToCode :: Bool , threadSanitiser :: Bool + , testSpeed :: TestSpeed } -- Extra arguments to pass to ./configure due to the BuildConfig @@ -167,6 +170,7 @@ vanilla = BuildConfig , fullyStatic = False , tablesNextToCode = True , threadSanitiser = False + , testSpeed = TestSpeedNormal } nativeInt :: BuildConfig @@ -254,6 +258,11 @@ archName AArch64 = "aarch64" archName ARMv7 = "armv7" archName I386 = "i386" +testSpeedName :: TestSpeed -> String +testSpeedName TestSpeedFast = "fast" +testSpeedName TestSpeedNormal = "normal" +testSpeedName TestSpeedSlow = "slow" + binDistName :: Arch -> Opsys -> BuildConfig -> String binDistName arch opsys bc = "ghc-" ++ testEnv arch opsys bc @@ -631,13 +640,14 @@ job arch opsys buildConfig = (jobName, Job {..}) jobDependencies = [] jobVariables = mconcat [ opsysVariables arch opsys - ,"TEST_ENV" =: testEnv arch opsys buildConfig + , "TEST_ENV" =: testEnv arch opsys buildConfig , "BIN_DIST_NAME" =: binDistName arch opsys buildConfig , "BUILD_FLAVOUR" =: flavourString jobFlavour , "BIGNUM_BACKEND" =: bignumString (bignumBackend buildConfig) , "CONFIGURE_ARGS" =: configureArgsStr buildConfig , maybe mempty ("CROSS_TARGET" =:) (crossTarget buildConfig) , maybe mempty ("CROSS_EMULATOR" =:) (crossEmulator buildConfig) + , "TEST_SPEED" =: testSpeedName (testSpeed buildConfig) , if withNuma buildConfig then "ENABLE_NUMA" =: "1" else mempty ] |