summaryrefslogtreecommitdiff
path: root/Test.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-05-11 18:23:41 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-05-11 18:23:41 -0400
commit618af8b6772d25ab27336d240ecddae7ae207561 (patch)
tree9e48ea32c7cbe11603ab599b5e0616457cd4de4e /Test.hs
parentdb56fab07ddd6910b1dc08f4fa242c267c469eb5 (diff)
clean up from windows porting
Diffstat (limited to 'Test.hs')
-rwxr-xr-xTest.hs20
1 files changed, 10 insertions, 10 deletions
diff --git a/Test.hs b/Test.hs
index 0acb136e3..061fcb362 100755
--- a/Test.hs
+++ b/Test.hs
@@ -13,7 +13,6 @@ import Test.QuickCheck.Test
import System.Posix.Directory (changeWorkingDirectory)
import System.Posix.Files
-import System.Posix.Env
import Control.Exception.Extensible
import qualified Data.Map as M
import System.IO.HVFS (SystemFS(..))
@@ -53,6 +52,7 @@ import qualified Utility.Verifiable
import qualified Utility.Process
import qualified Utility.Misc
import qualified Utility.InodeCache
+import qualified Utility.Env
main :: IO ()
main = do
@@ -726,7 +726,7 @@ test_bup_remote = "git-annex bup remote" ~: intmpclonerepo $ when Build.SysConfi
test_crypto :: Test
test_crypto = "git-annex crypto" ~: intmpclonerepo $ when Build.SysConfig.gpg $ do
-- force gpg into batch mode for the tests
- setEnv "GPG_BATCH" "1" True
+ void $ Utility.Env.setEnv "GPG_BATCH" "1" True
Utility.Gpg.testTestHarness @? "test harness self-test failed"
Utility.Gpg.testHarness $ do
createDirectory "dir"
@@ -947,20 +947,20 @@ prepare = do
-- and so does git_annex_output. Make sure that the just-built
-- git annex is used.
cwd <- getCurrentDirectory
- p <- getEnvDefault "PATH" ""
- setEnv "PATH" (cwd ++ ":" ++ p) True
- setEnv "TOPDIR" cwd True
+ p <- Utility.Env.getEnvDefault "PATH" ""
+ void $ Utility.Env.setEnv "PATH" (cwd ++ ":" ++ p) True
+ void $Utility.Env.setEnv "TOPDIR" cwd True
-- Avoid git complaining if it cannot determine the user's email
-- address, or exploding if it doesn't know the user's name.
- setEnv "GIT_AUTHOR_EMAIL" "test@example.com" True
- setEnv "GIT_AUTHOR_NAME" "git-annex test" True
- setEnv "GIT_COMMITTER_EMAIL" "test@example.com" True
- setEnv "GIT_COMMITTER_NAME" "git-annex test" True
+ void $ Utility.Env.setEnv "GIT_AUTHOR_EMAIL" "test@example.com" True
+ void $ Utility.Env.setEnv "GIT_AUTHOR_NAME" "git-annex test" True
+ void $ Utility.Env.setEnv "GIT_COMMITTER_EMAIL" "test@example.com" True
+ void $ Utility.Env.setEnv "GIT_COMMITTER_NAME" "git-annex test" True
changeToTmpDir :: FilePath -> IO ()
changeToTmpDir t = do
-- Hack alert. Threading state to here was too much bother.
- topdir <- getEnvDefault "TOPDIR" ""
+ topdir <- Utility.Env.getEnvDefault "TOPDIR" ""
changeWorkingDirectory $ topdir ++ "/" ++ t
tmpdir :: String