File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ import qualified Data.Map as Map
2323import Data.Maybe (fromMaybe , isJust )
2424import qualified Data.Text as T
2525import GHC.Stats (getRTSStats , max_live_bytes )
26- import System.Directory (removeFile )
26+ import System.Directory (doesDirectoryExist , removeFile )
2727import System.Environment (getEnv )
2828import qualified System.Process as P
2929import Test.Tasty as T
@@ -106,12 +106,19 @@ unit_packSelfSrcDir = do
106106 case ver of
107107 Left (e :: SomeException ) -> print " No nix-store on system"
108108 Right _ -> do
109- hnixNar <- runPut . put <$> localPackNar narEffectsIO " src"
110- nixStoreNar <- getNixStoreDump " src"
111- HU. assertEqual
112- " src dir serializes the same between hnix-store and nix-store"
113- hnixNar
114- nixStoreNar
109+ let go dir = do
110+ srcHere <- doesDirectoryExist dir
111+ case srcHere of
112+ False -> return ()
113+ True -> do
114+ hnixNar <- runPut . put <$> localPackNar narEffectsIO dir
115+ nixStoreNar <- getNixStoreDump dir
116+ HU. assertEqual
117+ " src dir serializes the same between hnix-store and nix-store"
118+ hnixNar
119+ nixStoreNar
120+ go " src"
121+ go " hnix-store-core/src"
115122
116123unit_streamLargeFileToNar :: HU. Assertion
117124unit_streamLargeFileToNar =
You can’t perform that action at this time.
0 commit comments