aboutsummaryrefslogtreecommitdiff
path: root/Test.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-12-31 13:54:41 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-12-31 13:54:41 -0400
commitc7c745d28868c8cd646d3e31dd8ba6a0b763f611 (patch)
tree0f01ece516196776f47ba9dda79d1f3fc032e690 /Test.hs
parent455675b7b002227c84ad4717e5114b2e13619d4f (diff)
git-annex.cabal: Add back custom-setup stanza, so cabal new-build works.
Seems I had all the work in past commits to make this build, at least on linux. I'm actually surprised it does, without a unix dep, Utility.Env still builds ok somehow despite using System.Posix.Env. This commit was sponsored by Fernando Jimenez on Patreon.
Diffstat (limited to 'Test.hs')
-rw-r--r--Test.hs11
1 files changed, 6 insertions, 5 deletions
diff --git a/Test.hs b/Test.hs
index 63ac73a87..ae52782e8 100644
--- a/Test.hs
+++ b/Test.hs
@@ -83,6 +83,7 @@ import qualified Utility.Process
import qualified Utility.Misc
import qualified Utility.InodeCache
import qualified Utility.Env
+import qualified Utility.Env.Set
import qualified Utility.Matcher
import qualified Utility.Exception
import qualified Utility.Hash
@@ -130,7 +131,7 @@ runner = Just go
subenv = "GIT_ANNEX_TEST_SUBPROCESS"
runsubprocesstests opts Nothing = do
pp <- Annex.Path.programPath
- Utility.Env.setEnv subenv "1" True
+ Utility.Env.Set.setEnv subenv "1" True
ps <- getArgs
(Nothing, Nothing, Nothing, pid) <-createProcess (proc pp ps)
exitcode <- waitForProcess pid
@@ -1919,9 +1920,9 @@ ensuretmpdir = do
isolateGitConfig :: IO a -> IO a
isolateGitConfig a = Utility.Tmp.withTmpDir "testhome" $ \tmphome -> do
tmphomeabs <- absPath tmphome
- Utility.Env.setEnv "HOME" tmphomeabs True
- Utility.Env.setEnv "XDG_CONFIG_HOME" tmphomeabs True
- Utility.Env.setEnv "GIT_CONFIG_NOSYSTEM" "1" True
+ Utility.Env.Set.setEnv "HOME" tmphomeabs True
+ Utility.Env.Set.setEnv "XDG_CONFIG_HOME" tmphomeabs True
+ Utility.Env.Set.setEnv "GIT_CONFIG_NOSYSTEM" "1" True
a
cleanup :: FilePath -> IO ()
@@ -2107,7 +2108,7 @@ setTestMode testmode = do
currdir <- getCurrentDirectory
p <- Utility.Env.getEnvDefault "PATH" ""
- mapM_ (\(var, val) -> Utility.Env.setEnv var val True)
+ mapM_ (\(var, val) -> Utility.Env.Set.setEnv var val True)
-- Ensure that the just-built git annex is used.
[ ("PATH", currdir ++ [searchPathSeparator] ++ p)
, ("TOPDIR", currdir)