on master help sign in
Merge pull request #603 from obsidiansystems/clone-repo-with-git-dir

Use file-cloned local obelisk impl in SelfTest

commitffc640b93003fe9644c8b058982a63afb3d9b066 authorElliot Cameron <3noch@users.noreply.github.com> dateThu 2 Jan 2020, 16:45 (7 years ago) parentdc157300cfe7fd
2 files changed+4−2
default.nix+2−1 lib/selftest/src/Obelisk/SelfTest.hs+2−1
default.nix+2−1
@@ -125,7 +125,8 @@ in rec {
125125 set -euo pipefail
126126
127127 PATH="${command}/bin:$PATH"
128− export OBELISK_IMPL="${hackGet ./.}"
128+ export OBELISK_IMPL="$(mktemp -d)"
129+ git clone file://${pathGit} $OBELISK_IMPL
129130 "${ghcObelisk.obelisk-selftest}/bin/obelisk-selftest" +RTS -N -RTS "$@"
130131 '';
131132 skeleton = pkgs.runCommand "skeleton" {
lib/selftest/src/Obelisk/SelfTest.hs+2−1
@@ -183,6 +183,7 @@ main = do
183183 it ("can build in " <> shellName) $ inTmpObInit $ \_ -> inShell $ "cabal new-build --" <> fromString compiler <> " all"
184184
185185 it "has idempotent thunk update" $ inTmpObInit $ \_ -> do
186+ _ <- pack
186187 u <- update
187188 uu <- update
188189 assertRevEQ u uu
@@ -190,6 +191,7 @@ main = do
190191 describe "ob thunk pack/unpack" $ parallel $ do
191192 it "has thunk pack and unpack inverses" $ inTmpObInit $ \_ -> do
192193
194+ _ <- pack
193195 e <- commitAll
194196 eu <- unpack
195197 eup <- pack
@@ -227,7 +229,6 @@ main = do
227229 testThunkPack $ fromText repo
228230
229231 it "aborts thunk pack when there are uncommitted files" $ inTmpObInit $ \dir -> do
230− void unpack
231232 testThunkPack (dir </> thunk)
232233
233234 describe "ob thunk update --branch" $ parallel $ do