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>
Mon, 30 Jun 2014 15:17:31 +0000 (18:17 +0300)
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.

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

index 33caea70c6e16d33acb02f83149cca850bc0020c..d8ad3e2d89a9379b058f07d89cdecd7064454de5 100644 (file)
@@ -88,6 +88,9 @@ class ComponentTestBase(object):
         # 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):