From 8079ee2245d07d73e7a68eaf3f575294f45604ac Mon Sep 17 00:00:00 2001 From: Potato Hatsue <1793913507@qq.com> Date: Tue, 9 Mar 2021 12:29:42 +0800 Subject: [PATCH] Fix tests broken by #287 --- tests/BiosTests.hs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/BiosTests.hs b/tests/BiosTests.hs index 861309569..4c2bb08a2 100644 --- a/tests/BiosTests.hs +++ b/tests/BiosTests.hs @@ -26,6 +26,10 @@ import System.Info.Extra ( isWindows ) import System.IO.Temp import System.Exit (ExitCode(ExitSuccess, ExitFailure)) import Control.Monad.Extra (unlessM) +import DynFlags (dynamicGhc) + +argDynamic :: [String] +argDynamic = ["-dynamic" | dynamicGhc] main :: IO () main = do @@ -56,7 +60,7 @@ main = do runCradle (cradleOptsProg crdl) (const (pure ())) "./a/A.hs" >>= \case CradleSuccess r -> - componentOptions r `shouldMatchList` ["a"] + componentOptions r `shouldMatchList` ["a"] <> argDynamic _ -> expectationFailure "Cradle could not be loaded" , testCaseSteps "Can load symlinked module" $ \step -> do @@ -71,7 +75,7 @@ main = do runCradle (cradleOptsProg crdl) (const (pure ())) "./b/A.hs" >>= \case CradleSuccess r -> - componentOptions r `shouldMatchList` ["b"] + componentOptions r `shouldMatchList` ["b"] <> argDynamic _ -> expectationFailure "Cradle could not be loaded" , testCaseSteps "Can not load symlinked module that is ignored" $ \step -> do