Backed out changeset caacf82afba1 (bug 1335873) for failing spidermonkey pkg due to not finding new file python.ini. r=backout
authorSebastian Hengst <archaeopteryx@coole-files.de>
Wed, 01 Mar 2017 17:35:45 +0100
changeset 392055 d725ecdbe54e6f3e39f86cc99f8e638d6b614431
parent 392054 29f59f3f6882445a6782a59ab55fe9473555f2ce
child 392056 17a5205504383bc73553fe208749dc4b943c71d6
push id7198
push userjlorenzo@mozilla.com
push dateTue, 18 Apr 2017 12:07:49 +0000
treeherdermozilla-beta@d57aa49c3948 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1335873
milestone54.0a1
backs outcaacf82afba18ddcbab61f3cc486f9b98f98e279
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
Backed out changeset caacf82afba1 (bug 1335873) for failing spidermonkey pkg due to not finding new file python.ini. r=backout
testing/mozbase/mozinfo/mozinfo/mozinfo.py
testing/mozbase/mozinfo/tests/test.py
--- a/testing/mozbase/mozinfo/mozinfo/mozinfo.py
+++ b/testing/mozbase/mozinfo/mozinfo/mozinfo.py
@@ -213,25 +213,24 @@ def find_and_update_from_json(*dirs):
                  searched after first looking in the root of the objdir
                  if the current script is being run from a Mozilla objdir.
 
     Returns the full path to mozinfo.json if it was found, or None otherwise.
     """
     # First, see if we're in an objdir
     try:
         from mozbuild.base import MozbuildObject, BuildEnvironmentNotFoundException
-        from mozbuild.mozconfig import MozconfigFindException
         build = MozbuildObject.from_environment()
         json_path = _os.path.join(build.topobjdir, "mozinfo.json")
         if _os.path.isfile(json_path):
             update(json_path)
             return json_path
     except ImportError:
         pass
-    except (BuildEnvironmentNotFoundException, MozconfigFindException):
+    except BuildEnvironmentNotFoundException:
         pass
 
     for d in dirs:
         d = _os.path.abspath(d)
         json_path = _os.path.join(d, "mozinfo.json")
         if _os.path.isfile(json_path):
             update(json_path)
             return json_path
--- a/testing/mozbase/mozinfo/tests/test.py
+++ b/testing/mozbase/mozinfo/tests/test.py
@@ -78,23 +78,17 @@ class TestMozinfo(unittest.TestCase):
         """Test that mozinfo.find_and_update_from_json can
         find mozinfo.json using the mozbuild module."""
         j = os.path.join(self.tempdir, "mozinfo.json")
         with open(j, "w") as f:
             f.write(json.dumps({"foo": "123456"}))
         m = mock.MagicMock()
         # Mock the value of MozbuildObject.from_environment().topobjdir.
         m.MozbuildObject.from_environment.return_value.topobjdir = self.tempdir
-
-        mocked_modules = {
-            "mozbuild": m,
-            "mozbuild.base": m,
-            "mozbuild.mozconfig": m,
-        }
-        with mock.patch.dict(sys.modules, mocked_modules):
+        with mock.patch.dict(sys.modules, {"mozbuild": m, "mozbuild.base": m}):
             self.assertEqual(mozinfo.find_and_update_from_json(), j)
         self.assertEqual(mozinfo.info["foo"], "123456")
 
     def test_output_to_file(self):
         """Test that mozinfo.output_to_file works."""
         path = os.path.join(self.tempdir, "mozinfo.json")
         mozinfo.output_to_file(path)
         self.assertEqual(open(path).read(), json.dumps(mozinfo.info))