Commit c28fc177 authored by Mikhail Glushenkov's avatar Mikhail Glushenkov
Browse files

Make '--run-tests' imply '--enable-tests'.

parent 63fc9dea
......@@ -631,7 +631,8 @@ installAction (configFlags, configExFlags, installFlags, haddockFlags)
let sandboxDistPref = case useSandbox of
NoSandbox -> NoFlag
UseSandbox sandboxDir -> Flag $ sandboxBuildDir sandboxDir
configFlags' = savedConfigureFlags config `mappend` configFlags
configFlags' = maybeForceTests installFlags' $
savedConfigureFlags config `mappend` configFlags
configExFlags' = defaultConfigExFlags `mappend`
savedConfigureExFlags config `mappend` configExFlags
installFlags' = defaultInstallFlags `mappend`
......@@ -673,6 +674,13 @@ installAction (configFlags, configExFlags, installFlags, haddockFlags)
installFlags' haddockFlags
targets
where
-- '--run-tests' implies '--enable-tests'.
maybeForceTests installFlags' configFlags' =
if fromFlagOrDefault False (installRunTests installFlags')
then configFlags' { configTests = toFlag True }
else configFlags'
testAction :: (TestFlags, BuildFlags, BuildExFlags) -> [String] -> GlobalFlags
-> IO ()
testAction (testFlags, buildFlags, buildExFlags) extraArgs globalFlags = do
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment