ComponentTestBase: ignore system and user config
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Thu, 26 Jun 2014 10:35:19 +0000 (13:35 +0300)
committerGuido Günther <agx@sigxcpu.org>
Wed, 18 Feb 2015 07:57:06 +0000 (08:57 +0100)
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 f6b1224fcd574bce535f3dec2d7123a8e8bd67ad..8bd3f7f92d1152b72670b83107e87c0c2154cfe0 100644 (file)
@@ -89,6 +89,9 @@ class ComponentTestBase(GbpLogTester):
         # Create a top-level tmpdir for the test
         cls._tmproot = tempfile.mkdtemp(prefix='gbp_%s_' % cls.__name__,
                                         dir='.')
+        # 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):