Backed out changeset f9d83ec11ca9 (bug 936555) for checktest failures.
authorRyan VanderMeulen <ryanvm@gmail.com>
Mon, 27 Jan 2014 16:24:52 -0500
changeset 182438 4262374929549732547a66701874c0be88397927
parent 182437 e9c39aa248f33f7ada47936ff3ec6c1cfaa6480b
child 182439 f693e9ad7bc537354d6056d5e43dfb2de42c7d06
push id462
push userraliiev@mozilla.com
push dateTue, 22 Apr 2014 00:22:30 +0000
treeherdermozilla-release@ac5db8c74ac0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs936555
milestone29.0a1
backs outf9d83ec11ca9458f5bfed87771d4950636bc93c2
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 f9d83ec11ca9 (bug 936555) for checktest failures. CLOSED TREE
CLOBBER
python/mozbuild/mozbuild/mozconfig.py
python/mozbuild/mozbuild/mozinfo.py
python/mozbuild/mozbuild/test/test_mozinfo.py
--- a/CLOBBER
+++ b/CLOBBER
@@ -17,9 +17,9 @@
 #
 # Modifying this file will now automatically clobber the buildbot machines \o/
 #
 
 # Are you updating CLOBBER because you think it's needed for your WebIDL
 # changes to stick? As of bug 928195, this shouldn't be necessary! Please
 # don't change CLOBBER for WebIDL changes any more.
 
-Bug 936555 - changes to mozconfig finding require clobbers, given that builds on try were green
+bug 960811 - clobber to rebuild preprocessed files when enabling synthetic APKs
--- a/python/mozbuild/mozbuild/mozconfig.py
+++ b/python/mozbuild/mozbuild/mozconfig.py
@@ -70,36 +70,36 @@ class MozconfigLoader(ProcessExecutionMi
         self.topsrcdir = topsrcdir
 
     @property
     def _loader_script(self):
         our_dir = os.path.abspath(os.path.dirname(__file__))
 
         return os.path.join(our_dir, 'mozconfig_loader')
 
-    def find_mozconfig(self, env=os.environ):
+    def find_mozconfig(self):
         """Find the active mozconfig file for the current environment.
 
         This emulates the logic in mozconfig-find.
 
         1) If ENV[MOZCONFIG] is set, use that
         2) If $TOPSRCDIR/mozconfig or $TOPSRCDIR/.mozconfig exists, use it.
         3) If both exist or if there are legacy locations detected, error out.
 
         The absolute path to the found mozconfig will be returned on success.
         None will be returned if no mozconfig could be found. A
         MozconfigFindException will be raised if there is a bad state,
         including conditions from #3 above.
         """
         # Check for legacy methods first.
 
-        if 'MOZ_MYCONFIG' in env:
+        if 'MOZ_MYCONFIG' in os.environ:
             raise MozconfigFindException(MOZ_MYCONFIG_ERROR)
 
-        env_path = env.get('MOZCONFIG', None)
+        env_path = os.environ.get('MOZCONFIG', None)
         if env_path is not None:
             if not os.path.exists(env_path):
                 raise MozconfigFindException(
                     'MOZCONFIG environment variable refers to a path that '
                     'does not exist: ' + env_path)
 
             if not os.path.isfile(env_path):
                 raise MozconfigFindException(
@@ -123,17 +123,17 @@ class MozconfigLoader(ProcessExecutionMi
             path = existing[0]
 
         if path is not None:
             return os.path.abspath(path)
 
         deprecated_paths = [os.path.join(self.topsrcdir, s) for s in
             self.DEPRECATED_TOPSRCDIR_PATHS]
 
-        home = env.get('HOME', None)
+        home = os.environ.get('HOME', None)
         if home is not None:
             deprecated_paths.extend([os.path.join(home, s) for s in
             self.DEPRECATED_HOME_PATHS])
 
         for path in deprecated_paths:
             if os.path.exists(path):
                 raise MozconfigFindException(
                     MOZCONFIG_LEGACY_PATH % (path, self.topsrcdir))
--- a/python/mozbuild/mozbuild/mozinfo.py
+++ b/python/mozbuild/mozbuild/mozinfo.py
@@ -3,17 +3,17 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 # This module produces a JSON file that provides basic build info and
 # configuration metadata.
 
 import os
 import re
 import json
-import mozbuild.mozconfig as mozconfig
+
 
 def build_dict(config, env=os.environ):
     """
     Build a dict containing data about the build configuration from
     the environment.
     """
     substs = config.substs
 
@@ -22,19 +22,20 @@ def build_dict(config, env=os.environ):
     missing = [r for r in required if r not in substs]
     if missing:
         raise Exception("Missing required environment variables: %s" %
                         ', '.join(missing))
 
     d = {}
     d['topsrcdir'] = config.topsrcdir
 
-    the_mozconfig = mozconfig.MozconfigLoader(config.topsrcdir).find_mozconfig(env)
-    if the_mozconfig:
-        d['mozconfig'] = the_mozconfig
+    if 'MOZCONFIG' in env:
+        mozconfig = env["MOZCONFIG"]
+        mozconfig = os.path.join(config.topsrcdir, mozconfig)
+        d['mozconfig'] = os.path.normpath(mozconfig)
 
     # os
     o = substs["OS_TARGET"]
     known_os = {"Linux": "linux",
                 "WINNT": "win",
                 "Darwin": "mac",
                 "Android": "b2g" if substs["MOZ_WIDGET_TOOLKIT"] == "gonk" else "android"}
     if o in known_os:
--- a/python/mozbuild/mozbuild/test/test_mozinfo.py
+++ b/python/mozbuild/mozbuild/test/test_mozinfo.py
@@ -14,18 +14,16 @@ import mozunit
 
 from mozbuild.backend.configenvironment import ConfigEnvironment
 
 from mozbuild.mozinfo import (
     build_dict,
     write_mozinfo,
 )
 
-from mozfile.mozfile import NamedTemporaryFile
-
 
 class Base(object):
     def _config(self, substs={}):
         d = os.path.dirname(__file__)
         return ConfigEnvironment(d, d, substs=substs)
 
 
 class TestBuildDict(unittest.TestCase, Base):
@@ -236,28 +234,25 @@ class TestWriteMozinfo(unittest.TestCase
         Test that writing to a file produces correct output.
         """
         c = self._config(dict(
             OS_TARGET='WINNT',
             TARGET_CPU='i386',
             MOZ_WIDGET_TOOLKIT='windows',
         ))
         c.topsrcdir = '/tmp'
-        with NamedTemporaryFile(dir=c.topsrcdir) as mozconfig:
-            mozconfig.write('unused contents')
-            mozconfig.flush()
-            write_mozinfo(self.f, c, {'MOZCONFIG': mozconfig.name})
-            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(mozconfig.name), d['mozconfig'])
-                self.assertEqual(32, d['bits'])
+        write_mozinfo(self.f, c, {'MOZCONFIG': 'foo'})
+        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 test_fileobj(self):
         """
         Test that writing to a file-like object produces correct output.
         """
         s = StringIO()
         c = self._config(dict(
             OS_TARGET='WINNT',