on master help sign in
Merge pull request #526 from alexfmpe/fix-selftest

Fix selftest

commit0c6616592e81ee8a3a3ae691ffd9d9614e0ef7e1 authorAli Abrar <aliabrar@gmail.com> dateThu 3 Oct 2019, 11:28 (7 years ago) parent513a12a1492458
2 files changed+4−8
default.nix+1−1 lib/selftest/src/Obelisk/SelfTest.hs+3−7
default.nix+1−1
@@ -128,7 +128,7 @@ in rec {
128128 obelisk = ghcObelisk;
129129 obeliskEnvs = ghcObeliskEnvs;
130130 command = ghcObelisk.obelisk-command;
131− shell = pinBuildInputs "obelisk-shell" ([command] ++ commandRuntimeDeps pkgs) [];
131+ shell = pinBuildInputs "obelisk-shell" ([command] ++ commandRuntimeDeps pkgs);
132132
133133 selftest = pkgs.writeScript "selftest" ''
134134 #!/usr/bin/env bash
lib/selftest/src/Obelisk/SelfTest.hs+3−7
@@ -129,8 +129,8 @@ main = do
129129 ls tmp >>= liftIO . assertEqual "" []
130130
131131 it "produces a valid route config" $ inTmpObInit $ \tmp -> liftIO $ do
132− configs <- getConfigs
133− withCurrentDirectory (T.unpack $ toTextIgnore tmp) $
132+ withCurrentDirectory (T.unpack $ toTextIgnore tmp) $ do
133+ configs <- getConfigs
134134 return (either (const Nothing) Just $ getConfigRoute configs) `shouldNotReturn` Nothing
135135
136136 -- These tests fail with "Could not find module 'Obelisk.Generated.Static'"
@@ -145,8 +145,7 @@ main = do
145145 it "can build obelisk command" $ inTmpObInit $ \_ -> nixBuild ["-A", "command" , obeliskImpl]
146146 it "can build obelisk skeleton" $ inTmpObInit $ \_ -> nixBuild ["-A", "skeleton", obeliskImpl]
147147 it "can build obelisk shell" $ inTmpObInit $ \_ -> nixBuild ["-A", "shell", obeliskImpl]
148− -- See https://github.com/obsidiansystems/obelisk/issues/101
149− -- it "can build everything" $ shelly_ $ nixBuild [obeliskImpl]
148+ it "can build everything" $ inTmpObInit $ \_ -> nixBuild [obeliskImpl]
150149
151150 describe "blank initialized project" $ parallel $ do
152151
@@ -166,9 +165,6 @@ main = do
166165 it ("can enter " <> shell) $ inTmpObInit $ \_ -> inShell "exit"
167166 it ("can build in " <> shell) $ inTmpObInit $ \_ -> inShell $ "cabal new-build --" <> fromString compiler <> " all"
168167
169− it "can build reflex project" $ inTmpObInit $ \_ -> do
170− nixBuild []
171−
172168 it "has idempotent thunk update" $ inTmpObInit $ \_ -> do
173169 u <- update
174170 uu <- update