ComponentTestBase: ignore system and user config
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Thu, 26 Jun 2014 10:35:19 +0000 (13:35 +0300)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Fri, 14 Nov 2014 12:21:38 +0000 (14:21 +0200)
User might have a system and/or user specific gbp config files. Disable
these config files so that they don't affect the component tests.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
tests/component/__init__.py

index 7abb16d..ea54036 100644 (file)
@@ -85,6 +85,9 @@ class ComponentTestBase(object):
         # Don't let git see that we're (possibly) under a git directory
         cls.orig_env = os.environ.copy()
         os.environ['GIT_CEILING_DIRECTORIES'] = os.getcwd()
+        # Prevent local config files from messing up the tests
+        os.environ['GBP_CONF_FILES'] = '%(top_dir)s/.gbp.conf:' \
+                            '%(top_dir)s/debian/gbp.conf:%(git_dir)s/gbp.conf'
 
     @classmethod
     def teardown_class(cls):