summaryrefslogtreecommitdiff
path: root/hadrian
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-07-04 22:32:15 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-08-18 15:40:05 -0400
commitfdcf76450348d0554b7fd1768331f9efaf691e13 (patch)
treeba38d3e50e57b83b858c8973ac44fdbdb08f8f52 /hadrian
parent194b25ee97d93bc4bcb5bed9a0454debba7f2b6a (diff)
downloadhaskell-fdcf76450348d0554b7fd1768331f9efaf691e13.tar.gz
gitlab-ci: Use MR base commit as performance baseline
Diffstat (limited to 'hadrian')
-rw-r--r--hadrian/src/Settings/Builders/RunTest.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/hadrian/src/Settings/Builders/RunTest.hs b/hadrian/src/Settings/Builders/RunTest.hs
index c10e93aae0..78e07b99ef 100644
--- a/hadrian/src/Settings/Builders/RunTest.hs
+++ b/hadrian/src/Settings/Builders/RunTest.hs
@@ -78,6 +78,7 @@ runTestBuilderArgs = builder RunTest ? do
<*> (maybe False (=="YES") <$> lookupEnv "OS")
(testEnv, testMetricsFile) <- expr . liftIO $
(,) <$> lookupEnv "TEST_ENV" <*> lookupEnv "METRICS_FILE"
+ perfBaseline <- expr . liftIO $ lookupEnv "PERF_BASELINE_COMMIT"
threads <- shakeThreads <$> expr getShakeOptions
os <- getTestSetting TestHostOS
@@ -141,6 +142,9 @@ runTestBuilderArgs = builder RunTest ? do
, arg "--config", arg $ "timeout_prog=" ++ show (top -/- timeoutProg)
, arg "--config", arg $ "stats_files_dir=" ++ statsFilesDir
, arg $ "--threads=" ++ show threads
+ , case perfBaseline of
+ Just commit | not (null commit) -> arg ("--perf-baseline=" ++ show commit)
+ _ -> mempty
, emitWhenSet testEnv $ \env -> arg ("--test-env=" ++ show env)
, emitWhenSet testMetricsFile $ \file -> arg ("--metrics-file=" ++ file)
, getTestArgs -- User-provided arguments from command line.