diff options
-rw-r--r-- | Test.hs | 10 | ||||
-rw-r--r-- | debian/changelog | 1 | ||||
-rw-r--r-- | doc/bugs/Three_tests_fail_when_annex.backends_is_defined.mdwn | 4 |
3 files changed, 15 insertions, 0 deletions
@@ -112,6 +112,7 @@ optParser = TestOptions runner :: Maybe (TestOptions -> IO ()) runner = Just $ \opts -> do ensuretmpdir + isolateGitConfig crippledfilesystem <- Annex.Init.probeCrippledFileSystem' tmpdir case tryIngredients ingredients (tastyOptionSet opts) (tests crippledfilesystem opts) of Nothing -> error "No tests found!?" @@ -1787,6 +1788,15 @@ ensuretmpdir = do e <- doesDirectoryExist tmpdir unless e $ createDirectory tmpdir + +{- Prevent global git configs from affecting the test suite. -} +isolateGitConfig :: IO () +isolateGitConfig = do + let tmphome = tmpdir </> "home" + createDirectoryIfMissing False tmphome + Utility.Env.setEnv "HOME" tmphome True + Utility.Env.setEnv "XDG_CONFIG_HOME" tmphome True + Utility.Env.setEnv "GIT_CONFIG_NOSYSTEM" "1" True cleanup :: FilePath -> IO () cleanup = cleanup' False diff --git a/debian/changelog b/debian/changelog index 39743f3fb..7dc48edee 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,7 @@ git-annex (6.20160419) UNRELEASED; urgency=medium to refer to a file. * Fix bug that prevented annex.sshcaching=false configuration from taking effect when on a crippled filesystem. Thanks, divergentdave. + * Isolate test suite from global git config settings. -- Joey Hess <id@joeyh.name> Tue, 19 Apr 2016 12:57:15 -0400 diff --git a/doc/bugs/Three_tests_fail_when_annex.backends_is_defined.mdwn b/doc/bugs/Three_tests_fail_when_annex.backends_is_defined.mdwn index 34096dbc9..d7a635d3c 100644 --- a/doc/bugs/Three_tests_fail_when_annex.backends_is_defined.mdwn +++ b/doc/bugs/Three_tests_fail_when_annex.backends_is_defined.mdwn @@ -105,3 +105,7 @@ found a bug report from you on be related, but I don't know if that's the case. The newest version I'm able to build is 5.20150219, somewhere after that various things start to fail. + +> [[fixed|done]]; I found a way to isolate the test suite from global git +> configs, by setting `GIT_CONFIG_NOSYSTEM` and also setting +> `HOME` and `XDG_CONFIG_HOME` to an empty directory. --[[Joey]] |