From ad5e3fa4c45148d830f1487f2a4ffcf92147eaeb Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Thu, 4 Aug 2016 10:07:56 +0900 Subject: [PATCH] Bug 1282256 - Remove MozbuildObject._config_guess. r=gps Back when it was added, it was used, but it is not anymore, outside test_base.py. --HG-- extra : rebase_source : f0b9a4dab2985e89e9950eda774ae853c7de764c --- python/mozbuild/mozbuild/base.py | 9 --------- python/mozbuild/mozbuild/test/test_base.py | 13 +++---------- 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/python/mozbuild/mozbuild/base.py b/python/mozbuild/mozbuild/base.py index c991626acefb..5eaebdca07ba 100644 --- a/python/mozbuild/mozbuild/base.py +++ b/python/mozbuild/mozbuild/base.py @@ -90,7 +90,6 @@ class MozbuildObject(ProcessExecutionMixin): self._make = None self._topobjdir = mozpath.normsep(topobjdir) if topobjdir else topobjdir self._mozconfig = mozconfig - self._config_guess_output = None self._config_environment = None self._virtualenv_manager = None @@ -443,14 +442,6 @@ class MozbuildObject(ProcessExecutionMixin): self.log(logging.WARNING, 'notifier-failed', {'error': e.message}, 'Notification center failed: {error}') - @property - def _config_guess(self): - if self._config_guess_output is None: - self._config_guess_output = MozbuildObject.resolve_config_guess( - self.mozconfig, self.topsrcdir) - - return self._config_guess_output - def _ensure_objdir_exists(self): if os.path.isdir(self.statedir): return diff --git a/python/mozbuild/mozbuild/test/test_base.py b/python/mozbuild/mozbuild/test/test_base.py index 9c4a1c623e0a..590b679d4c25 100644 --- a/python/mozbuild/mozbuild/test/test_base.py +++ b/python/mozbuild/mozbuild/test/test_base.py @@ -60,7 +60,9 @@ class TestMozbuildObject(unittest.TestCase): self.assertIsNotNone(base.topobjdir) self.assertEqual(len(base.topobjdir.split()), 1) - self.assertTrue(base.topobjdir.endswith(base._config_guess)) + config_guess = MozbuildObject.resolve_config_guess(base.mozconfig, + base.topsrcdir) + self.assertTrue(base.topobjdir.endswith(config_guess)) self.assertTrue(os.path.isabs(base.topobjdir)) self.assertTrue(base.topobjdir.startswith(base.topsrcdir)) @@ -298,15 +300,6 @@ class TestMozbuildObject(unittest.TestCase): os.chdir(self._old_cwd) shutil.rmtree(d) - def test_config_guess(self): - # It's difficult to test for exact values from the output of - # config.guess because they vary depending on platform. - base = self.get_base() - result = base._config_guess - - self.assertIsNotNone(result) - self.assertGreater(len(result), 0) - def test_config_environment(self): base = self.get_base(topobjdir=topobjdir)