Fixup for bug 1229233 to fix bustage on OSX universal builds. r=me
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 01 Dec 2015 14:49:51 +0900
changeset 309011 958e2652c301ff31c55ef91025835a6727e0811b
parent 309010 cf71b87eafcf109b0966835ff98098b3ef38b2a5
child 309012 e43cd6da745867552c80d8121d5f98cbd00ecfeb
push id5513
push userraliiev@mozilla.com
push dateMon, 25 Jan 2016 13:55:34 +0000
treeherdermozilla-beta@5ee97dd05b5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1229233
milestone45.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Fixup for bug 1229233 to fix bustage on OSX universal builds. r=me Those bits are copied from TestMozbuildObject.
python/mozbuild/mozbuild/test/backend/test_build.py
--- a/python/mozbuild/mozbuild/test/backend/test_build.py
+++ b/python/mozbuild/mozbuild/test/backend/test_build.py
@@ -24,16 +24,25 @@ from tempfile import mkdtemp
 
 
 BASE_SUBSTS = [
     ('PYTHON', mozpath.normsep(sys.executable)),
 ]
 
 
 class TestBuild(unittest.TestCase):
+    def setUp(self):
+        self._old_env = dict(os.environ)
+        os.environ.pop('MOZCONFIG', None)
+        os.environ.pop('MOZ_OBJDIR', None)
+
+    def tearDown(self):
+        os.environ.clear()
+        os.environ.update(self._old_env)
+
     @contextmanager
     def do_test_backend(self, *backends, **kwargs):
         topobjdir = mkdtemp()
         try:
             config = ConfigEnvironment(buildconfig.topsrcdir, topobjdir,
                                        **kwargs)
             reader = BuildReader(config)
             emitter = TreeMetadataEmitter(config)