diff options
author | Joey Hess <joey@kitenet.net> | 2013-05-17 16:45:44 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-05-17 16:45:44 -0400 |
commit | 0755035aab443a0a0a25c921dcee4174db02231f (patch) | |
tree | f1440bb74dffec6db8bf957979a7d2a5484b6f7a /Test.hs | |
parent | a8f931e785775d0a4ef3c9b96f863ea57cdb3033 (diff) |
try building test suite on windows
Diffstat (limited to 'Test.hs')
-rw-r--r-- | Test.hs | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -5,6 +5,8 @@ - Licensed under the GNU GPL version 3 or higher. -} +{-# LANGUAGE CPP #-} + module Test where import Test.HUnit @@ -755,9 +757,10 @@ test_crypto env = "git-annex crypto" ~: intmpclonerepo env $ when Build.SysConfi annexed_present annexedfile -- This is equivilant to running git-annex, but it's all run in-process --- so test coverage collection works. +-- (when the OS allows) so test coverage collection works. git_annex :: TestEnv -> String -> [String] -> IO Bool git_annex env command params = do +#ifndef __WINDOWS__ forM_ (M.toList env) $ \(var, val) -> Utility.Env.setEnv var val True @@ -768,12 +771,17 @@ git_annex env command params = do Left _ -> return False where run = GitAnnex.run (command:"-q":params) +#else + Utility.SafeCommand.boolSystemEnv "git-annex" + (map Param $ command : params) + (Just $ M.toList env) +#endif {- Runs git-annex and returns its output. -} git_annex_output :: TestEnv -> String -> [String] -> IO String git_annex_output env command params = do - got <- Utility.Process.readProcessEnv "git-annex" (command:params) $ - Just $ M.toList env + got <- Utility.Process.readProcessEnv "git-annex" (command:params) + (Just $ M.toList env) -- XXX since the above is a separate process, code coverage stats are -- not gathered for things run in it. -- Run same command again, to get code coverage. |