hadrian: make it possible to run the testsuite with quickest and quick
authorAlp Mestanogullari <alp@well-typed.com>
Mon, 19 Nov 2018 15:12:56 +0000 (16:12 +0100)
committerAlp Mestanogullari <alp@well-typed.com>
Mon, 19 Nov 2018 15:12:56 +0000 (16:12 +0100)
More generally, we so far assumed that the testsuite would be executed
with a flavour that's as comprehensive as perf in terms of available RTS
and library flavours (at least vanilla + dynamic + prof). This would
manifest itself concretely by needing 3 "ways" of the iserv program,
unconditionally.

We now only require the ways among vanilla, dynamic and prof that we
can find in our current Flavour's rtsWays.

Test Plan:
hadrian/build.sh --flavour={quick, quickest} test now goes through
(with a few failing tests, of course).

Reviewers: bgamari, tdammers

Reviewed By: tdammers

Subscribers: mpickering, RyanGlScott, rwbarton, carter

Differential Revision: https://phabricator.haskell.org/D5355

hadrian/src/Rules/Test.hs

index de73390..bbce4db 100644 (file)
@@ -104,9 +104,13 @@ timeoutProgBuilder = do
             makeExecutable (root -/- timeoutPath)
 
 needIservBins :: Action ()
-needIservBins =
+needIservBins = do
+    rtsways <- interpretInContext (vanillaContext Stage1 ghc) getRtsWays
     need =<< traverse programPath
-      [ Context Stage1 iserv w | w <- [vanilla, profiling, dynamic] ]
+               [ Context Stage1 iserv w
+               | w <- [vanilla, profiling, dynamic]
+               , w `elem` rtsways
+               ]
 
 needTestBuilders :: Action ()
 needTestBuilders = do