mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-16 14:55:47 +00:00
Backed out changeset caacf82afba1 (bug 1335873) for failing spidermonkey pkg due to not finding new file python.ini. r=backout
This commit is contained in:
parent
964fc701a8
commit
9da116023c
@ -218,7 +218,6 @@ def find_and_update_from_json(*dirs):
|
||||
# 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):
|
||||
@ -226,7 +225,7 @@ def find_and_update_from_json(*dirs):
|
||||
return json_path
|
||||
except ImportError:
|
||||
pass
|
||||
except (BuildEnvironmentNotFoundException, MozconfigFindException):
|
||||
except BuildEnvironmentNotFoundException:
|
||||
pass
|
||||
|
||||
for d in dirs:
|
||||
|
@ -83,13 +83,7 @@ class TestMozinfo(unittest.TestCase):
|
||||
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")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user