@@ -75,6 +75,7 @@ main = do
75 unless isVerbose $
75 unless isVerbose $
76 putStrLn "Tests may take longer to run if there are unbuilt derivations: use -v for verbose output"
76 putStrLn "Tests may take longer to run if there are unbuilt derivations: use -v for verbose output"
77 let verbosity = bool silently verbosely isVerbose
77 let verbosity = bool silently verbosely isVerbose
78+ nixBuild args = run "nix-build" ("--no-out-link" : args)
78 obeliskImpl <- fromString <$> getEnv "OBELISK_IMPL"
79 obeliskImpl <- fromString <$> getEnv "OBELISK_IMPL"
79 httpManager <- HTTP.newManager HTTP.defaultManagerSettings
80 httpManager <- HTTP.newManager HTTP.defaultManagerSettings
80 [p0, p1, p2, p3] <- liftIO $ getFreePorts 4
81 [p0, p1, p2, p3] <- liftIO $ getFreePorts 4
@@ -141,22 +142,22 @@ main = do
141 testObRunInDir p2 p3 (Just "frontend") httpManager
142 testObRunInDir p2 p3 (Just "frontend") httpManager
143 describe "obelisk project" $ parallel $ do
144 describe "obelisk project" $ parallel $ do
144− it "can build obelisk command" $ inTmpObInit $ \_ -> run "nix-build" ["-A", "command" , obeliskImpl]
145+ it "can build obelisk command" $ inTmpObInit $ \_ -> nixBuild ["-A", "command" , obeliskImpl]
145− it "can build obelisk skeleton" $ inTmpObInit $ \_ -> run "nix-build" ["-A", "skeleton", obeliskImpl]
146+ it "can build obelisk skeleton" $ inTmpObInit $ \_ -> nixBuild ["-A", "skeleton", obeliskImpl]
146− it "can build obelisk shell" $ inTmpObInit $ \_ -> run "nix-build" ["-A", "shell", obeliskImpl]
147+ it "can build obelisk shell" $ inTmpObInit $ \_ -> nixBuild ["-A", "shell", obeliskImpl]
147 -- See https://github.com/obsidiansystems/obelisk/issues/101
148 -- See https://github.com/obsidiansystems/obelisk/issues/101
148− -- it "can build everything" $ shelly_ $ run "nix-build" [obeliskImpl]
149+ -- it "can build everything" $ shelly_ $ nixBuild [obeliskImpl]
150 describe "blank initialized project" $ parallel $ do
151 describe "blank initialized project" $ parallel $ do
152 it "can build ghc.backend" $ inTmpObInit $ \_ -> do
153 it "can build ghc.backend" $ inTmpObInit $ \_ -> do
153− run "nix-build" ["--no-out-link", "-A", "ghc.backend"]
154+ nixBuild ["-A", "ghc.backend"]
154 it "can build ghcjs.frontend" $ inTmpObInit $ \_ -> do
155 it "can build ghcjs.frontend" $ inTmpObInit $ \_ -> do
155− run "nix-build" ["--no-out-link", "-A", "ghcjs.frontend"]
156+ nixBuild ["-A", "ghcjs.frontend"]
157 if os == "darwin"
158 if os == "darwin"
158− then it "can build ios" $ inTmpObInit $ \_ -> run "nix-build" ["--no-out-link", "-A", "ios.frontend" ]
159+ then it "can build ios" $ inTmpObInit $ \_ -> nixBuild ["-A", "ios.frontend"]
159− else it "can build android" $ inTmpObInit $ \_ -> run "nix-build" ["--no-out-link", "-A", "android.frontend"]
160+ else it "can build android" $ inTmpObInit $ \_ -> nixBuild ["-A", "android.frontend"]
161 forM_ ["ghc", "ghcjs"] $ \compiler -> do
162 forM_ ["ghc", "ghcjs"] $ \compiler -> do
@@ -166,7 +167,7 @@ main = do
166 it ("can build in " <> shell) $ inTmpObInit $ \_ -> inShell $ "cabal new-build --" <> fromString compiler <> " all"
167 it ("can build in " <> shell) $ inTmpObInit $ \_ -> inShell $ "cabal new-build --" <> fromString compiler <> " all"
168 it "can build reflex project" $ inTmpObInit $ \_ -> do
169 it "can build reflex project" $ inTmpObInit $ \_ -> do
169− run "nix-build" []
170+ nixBuild []
171 it "has idempotent thunk update" $ inTmpObInit $ \_ -> do
172 it "has idempotent thunk update" $ inTmpObInit $ \_ -> do
172 u <- update
173 u <- update