зеркало из https://github.com/mozilla/gecko-dev.git
Reapplied changeset 31ff9550fba6 (bug 870073)
This commit is contained in:
Родитель
dcf5858ce5
Коммит
e1d2564c1b
|
@ -175,12 +175,16 @@ class TestWriteJson(unittest.TestCase):
|
|||
"""
|
||||
write_json(self.f, env={'OS_TARGET':'WINNT',
|
||||
'TARGET_CPU':'i386',
|
||||
'TOPSRCDIR':'/tmp',
|
||||
'MOZCONFIG':'foo',
|
||||
'MOZ_WIDGET_TOOLKIT':'windows'})
|
||||
with open(self.f) as f:
|
||||
d = json.load(f)
|
||||
self.assertEqual('win', d['os'])
|
||||
self.assertEqual('x86', d['processor'])
|
||||
self.assertEqual('windows', d['toolkit'])
|
||||
self.assertEqual('/tmp', d['topsrcdir'])
|
||||
self.assertEqual(os.path.normpath('/tmp/foo'), d['mozconfig'])
|
||||
self.assertEqual(32, d['bits'])
|
||||
|
||||
def testFileObj(self):
|
||||
|
|
|
@ -30,7 +30,10 @@ def build_dict(env=os.environ):
|
|||
', '.join(missing))
|
||||
|
||||
if 'MOZCONFIG' in env:
|
||||
d["mozconfig"] = env["MOZCONFIG"]
|
||||
mozconfig = env["MOZCONFIG"]
|
||||
if 'TOPSRCDIR' in env:
|
||||
mozconfig = os.path.join(env["TOPSRCDIR"], mozconfig)
|
||||
d['mozconfig'] = os.path.normpath(mozconfig)
|
||||
|
||||
if 'TOPSRCDIR' in env:
|
||||
d["topsrcdir"] = env["TOPSRCDIR"]
|
||||
|
|
Загрузка…
Ссылка в новой задаче