Add an option to upload config.status and old-configure.vars in automation.
authorChris Manchester <cmanchester@mozilla.com>
Thu, 30 Jun 2016 15:09:39 -0700
changeset 791003 748f4fdd7346763f972d7627d54eeb615a1e1b7f
parent 790742 82e1f1b9c0559f38a8460e2f2f3044de4c7712d6
child 791004 268ee2af97c065443d5765cfbedbb844044d9b81
child 791013 63abfd13043b3d80df20ac51b6143b1e17e130a4
child 791014 ea65433c2cdbf74d57736e7be31c58651c340212
push id131914
push usercmanchester@mozilla.com
push dateThu, 30 Jun 2016 22:09:56 +0000
treeherdertry@268ee2af97c0 [default view] [failures only]
milestone50.0a1
Add an option to upload config.status and old-configure.vars in automation. MozReview-Commit-ID: Ceyjsk1wiHj
build/mozconfig.common.override
configure.py
moz.configure
toolkit/mozapps/installer/upload-files.mk
--- a/build/mozconfig.common.override
+++ b/build/mozconfig.common.override
@@ -4,8 +4,10 @@
 
 # Common mozconfig for all users
 #
 # Add options to this file that will be inherited by all in-tree mozconfigs.
 # This file is included at the *end* of the mozconfigs, and so may be used
 # to override anything done previously.
 #
 # The common expected usage is for try builds with nondefault options.
+
+ac_add_options --enable-upload-config-status
\ No newline at end of file
--- a/configure.py
+++ b/configure.py
@@ -73,16 +73,21 @@ def config_status(config):
         if config.get('MOZ_BUILD_APP') != 'js' or config.get('JS_STANDALONE'):
             fh.write('''
 if __name__ == '__main__':
     args = dict([(name, globals()[name]) for name in __all__])
     from mozbuild.config_status import config_status
     config_status(**args)
 ''')
 
+    if config.get('MOZ_BUILD_APP') == 'js':
+        from shutil import copyfile
+        copyfile('config.status', 'config.status.js')
+        copyfile('old-configure.vars', 'old-configure.vars.js')
+
     # Other things than us are going to run this file, so we need to give it
     # executable permissions.
     os.chmod('config.status', 0755)
     if config.get('MOZ_BUILD_APP') != 'js' or config.get('JS_STANDALONE'):
         os.environ['WRITE_MOZINFO'] = '1'
         # Until we have access to the virtualenv from this script, execute
         # config.status externally, with the virtualenv python.
         return subprocess.call([config['PYTHON'], 'config.status'])
--- a/moz.configure
+++ b/moz.configure
@@ -9,16 +9,22 @@ include('build/moz.configure/init.config
 # Note:
 # - Gecko-specific options and rules should go in toolkit/moz.configure.
 # - Firefox-specific options and rules should go in browser/moz.configure.
 # - Fennec-specific options and rules should go in
 #   mobile/android/moz.configure.
 # - Spidermonkey-specific options and rules should go in js/moz.configure.
 # - etc.
 
+option('--enable-upload-config-status',
+       help='Upload config.status, js/src/config.status, and related files.')
+
+set_config('MOZ_UPLOAD_CONFIG_STATUS',
+           depends_if('--enable-upload-config-status')(lambda _: True))
+
 # Multiprocess Firefox Testing UI - Nightly and Aurora
 # To be removed in Bug 1003313
 @depends(milestone)
 def e10s_testing_only(milestone):
     if not milestone.is_release:
         return True
 
 set_config('E10S_TESTING_ONLY', e10s_testing_only)
--- a/toolkit/mozapps/installer/upload-files.mk
+++ b/toolkit/mozapps/installer/upload-files.mk
@@ -459,16 +459,24 @@ UPLOAD_FILES= \
   $(call QUOTED_WILDCARD,$(MOZ_SOURCESTAMP_FILE)) \
   $(call QUOTED_WILDCARD,$(MOZ_BUILDINFO_FILE)) \
   $(call QUOTED_WILDCARD,$(MOZ_BUILDID_INFO_TXT_FILE)) \
   $(call QUOTED_WILDCARD,$(MOZ_MOZINFO_FILE)) \
   $(call QUOTED_WILDCARD,$(MOZ_TEST_PACKAGES_FILE)) \
   $(call QUOTED_WILDCARD,$(PKG_JSSHELL)) \
   $(if $(UPLOAD_EXTRA_FILES), $(foreach f, $(UPLOAD_EXTRA_FILES), $(wildcard $(DIST)/$(f))))
 
+ifdef MOZ_UPLOAD_CONFIG_STATUS
+  UPLOAD_FILES += \
+    $(call QUOTED_WILDCARD,$(topobjdir)/config.status) \
+    $(call QUOTED_WILDCARD,$(topobjdir)/old-configure.vars) \
+    $(call QUOTED_WILDCARD,$(topobjdir)/js/src/config.status.js) \
+    $(call QUOTED_WILDCARD,$(topobjdir)/js/src/old-configure.vars.js)
+endif
+
 ifdef MOZ_CRASHREPORTER_UPLOAD_FULL_SYMBOLS
   UPLOAD_FILES += \
     $(call QUOTED_WILDCARD,$(DIST)/$(PKG_PATH)$(SYMBOL_FULL_ARCHIVE_BASENAME).zip)
 endif
 
 ifdef MOZ_CODE_COVERAGE
   UPLOAD_FILES += \
     $(call QUOTED_WILDCARD,$(DIST)/$(PKG_PATH)$(CODE_COVERAGE_ARCHIVE_BASENAME).zip)