summaryrefslogtreecommitdiff
path: root/hadrian/src/Settings/Builders/RunTest.hs
diff options
context:
space:
mode:
authorAlp Mestanogullari <alpmestan@gmail.com>2019-04-26 14:25:46 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-05-29 10:36:35 -0400
commit7a75a09403264c60a1f513b7466dc9503b966aab (patch)
treef447111fa2f5a7a7fe7ab5730be63529b15eea0c /hadrian/src/Settings/Builders/RunTest.hs
parentc8380a4a738e5c2488337496b0d1b1faf6a7de9d (diff)
downloadhaskell-7a75a09403264c60a1f513b7466dc9503b966aab.tar.gz
testsuite: introduce 'static_stats' tests
They are a particular type of perf tests. This patch introduces a 'stats_files_dir' configuration field in the testsuite driver where all haddock timing files (and possibly others in the future) are assumed to live. We also change both the Make and Hadrian build systems to pass respectively $(TOP)/testsuite/tests/perf/haddock/ and <build root>/stage1/haddock-timing-files/ as the value of that new configuration field, and to generate the timing files in those directories in the first place while generating documentation with haddock. This new test type can be seen as one dedicated to examining stats files that are generated while building a GHC distribution. This also lets us get rid of the 'extra_files' directives in the all.T entries for haddock.base, haddock.Cabal and haddock.compiler.
Diffstat (limited to 'hadrian/src/Settings/Builders/RunTest.hs')
-rw-r--r--hadrian/src/Settings/Builders/RunTest.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/hadrian/src/Settings/Builders/RunTest.hs b/hadrian/src/Settings/Builders/RunTest.hs
index 6cc11f8aef..63e3dfd6c9 100644
--- a/hadrian/src/Settings/Builders/RunTest.hs
+++ b/hadrian/src/Settings/Builders/RunTest.hs
@@ -85,11 +85,14 @@ runTestBuilderArgs = builder RunTest ? do
wordsize <- getTestSetting TestWORDSIZE
top <- expr $ topDirectory
ghcFlags <- expr runTestGhcFlags
- timeoutProg <- expr buildRoot <&> (-/- timeoutPath)
cmdrootdirs <- expr (testRootDirs <$> userSetting defaultTestArgs)
let defaultRootdirs = ("testsuite" -/- "tests") : libTests
rootdirs | null cmdrootdirs = defaultRootdirs
| otherwise = cmdrootdirs
+ root <- expr buildRoot
+ let timeoutProg = root -/- timeoutPath
+ statsFilesDir <- expr haddockStatsFilesDir
+
-- See #16087
let ghcBuiltByLlvm = False -- TODO: Implement this check
@@ -134,6 +137,7 @@ runTestBuilderArgs = builder RunTest ? do
, arg "--config", arg $ "gs=gs" -- Use the default value as in test.mk
, arg "--config", arg $ "timeout_prog=" ++ show (top -/- timeoutProg)
+ , arg "--config", arg $ "stats_files_dir=" ++ statsFilesDir
, arg $ "--threads=" ++ show threads
, getTestArgs -- User-provided arguments from command line.
]