Bug 1197293 - allow for TC builds that don't use 'make upload'; r=ted
authorMike Shal <mshal@mozilla.com>
Fri, 21 Aug 2015 14:23:19 -0400
changeset 259017 16327a5d2961773729aca9f1928d6e7d0334e77f
parent 259016 d7f6ba1197608932989a0ace028aa4d45fd66331
child 259018 2afb1fcf608b57ef00583b419d79677b6a8587fa
push id29268
push userryanvm@gmail.com
push dateTue, 25 Aug 2015 00:37:23 +0000
treeherdermozilla-central@08015770c9d6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs1197293
milestone43.0a1
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
Bug 1197293 - allow for TC builds that don't use 'make upload'; r=ted
build/gen_mach_buildprops.py
build/moz-automation.mk
testing/mozharness/mozharness/mozilla/building/buildbase.py
--- a/build/gen_mach_buildprops.py
+++ b/build/gen_mach_buildprops.py
@@ -51,24 +51,25 @@ def getPartialInfo(props):
 if __name__ == '__main__':
     parser = ArgumentParser(description='Generate mach_build_properties.json for automation builds.')
     parser.add_argument("--complete-mar-file", required=True,
                         action="store", dest="complete_mar_file",
                         help="Path to the complete MAR file, relative to the objdir.")
     parser.add_argument("--partial-mar-file", required=False,
                         action="store", dest="partial_mar_file",
                         help="Path to the partial MAR file, relative to the objdir.")
-    parser.add_argument("--upload-properties", required=True,
+    parser.add_argument("--upload-properties", required=False,
                         action="store", dest="upload_properties",
                         help="Path to the properties written by 'make upload'")
     args = parser.parse_args()
 
     json_data = getMarProperties(args.complete_mar_file)
-    with open(args.upload_properties) as f:
-        json_data.update(json.load(f))
+    if args.upload_properties:
+        with open(args.upload_properties) as f:
+            json_data.update(json.load(f))
     if args.partial_mar_file:
         json_data.update(getMarProperties(args.partial_mar_file, partial=True))
 
         # Pull the previous buildid from the partial mar filename.
         res = re.match(r'.*\.([0-9]+)-[0-9]+.mar', args.partial_mar_file)
         if res:
             json_data['previous_buildid'] = res.group(1)
 
--- a/build/moz-automation.mk
+++ b/build/moz-automation.mk
@@ -12,18 +12,20 @@ endif
 endif
 
 include $(topsrcdir)/toolkit/mozapps/installer/package-name.mk
 include $(topsrcdir)/toolkit/mozapps/installer/upload-files.mk
 
 # Clear out DIST_FILES if it was set by upload-files.mk (for Android builds)
 DIST_FILES =
 
+ifeq (1,$(MOZ_AUTOMATION_UPLOAD))
 # Properties from 'make upload' that are file URLs.
-AUTOMATION_UPLOAD_PROPERTIES = $(DIST)/upload-properties.json
+AUTOMATION_UPLOAD_PROPERTIES = --upload-properties $(DIST)/upload-properties.json
+endif
 
 # Helper variables to convert from MOZ_AUTOMATION_* variables to the
 # corresponding the make target
 tier_MOZ_AUTOMATION_BUILD_SYMBOLS = buildsymbols
 tier_MOZ_AUTOMATION_L10N_CHECK = l10n-check
 tier_MOZ_AUTOMATION_PRETTY_L10N_CHECK = pretty-l10n-check
 tier_MOZ_AUTOMATION_INSTALLER = installer
 tier_MOZ_AUTOMATION_PRETTY_INSTALLER = pretty-installer
@@ -93,17 +95,17 @@ automation/sdk: automation/installer aut
 # conflicts in writing to the same files.
 automation/installer: automation/pretty-installer
 automation/package: automation/pretty-package
 automation/package-tests: automation/pretty-package-tests
 automation/l10n-check: automation/pretty-l10n-check
 automation/update-packaging: automation/pretty-update-packaging
 
 automation/build: $(addprefix automation/,$(MOZ_AUTOMATION_TIERS))
-	$(PYTHON) $(topsrcdir)/build/gen_mach_buildprops.py --complete-mar-file $(DIST)/$(COMPLETE_MAR) $(addprefix --partial-mar-file ,$(wildcard $(DIST)/$(PARTIAL_MAR))) --upload-properties $(AUTOMATION_UPLOAD_PROPERTIES)
+	$(PYTHON) $(topsrcdir)/build/gen_mach_buildprops.py --complete-mar-file $(DIST)/$(COMPLETE_MAR) $(addprefix --partial-mar-file ,$(wildcard $(DIST)/$(PARTIAL_MAR))) $(AUTOMATION_UPLOAD_PROPERTIES)
 
 # Note: We have to force -j1 here, at least until bug 1036563 is fixed.
 AUTOMATION_EXTRA_CMDLINE-l10n-check = -j1
 AUTOMATION_EXTRA_CMDLINE-pretty-l10n-check = -j1
 
 # And force -j1 here until bug 1077670 is fixed.
 AUTOMATION_EXTRA_CMDLINE-package-tests = -j1
 AUTOMATION_EXTRA_CMDLINE-pretty-package-tests = -j1
--- a/testing/mozharness/mozharness/mozilla/building/buildbase.py
+++ b/testing/mozharness/mozharness/mozilla/building/buildbase.py
@@ -1275,18 +1275,18 @@ or run without that action (ie: --no-{ac
         mach_properties_path = os.path.join(
             self.query_abs_dirs()['abs_obj_dir'], 'mach_build_properties.json'
         )
         self.info("setting properties set by mach build. Looking in path: %s"
                   % mach_properties_path)
         if os.path.exists(mach_properties_path):
             with self.opened(mach_properties_path, error_level=error_level) as (fh, err):
                 build_props = json.load(fh)
-                if not build_props or err:
-                    self.log("%s exists but there was an error finding any "
+                if err:
+                    self.log("%s exists but there was an error reading the "
                              "properties. props: `%s` - error: "
                              "`%s`" % (mach_properties_path,
                                        build_props or 'None',
                                        err or 'No error'),
                              error_level)
                 if console_output:
                     self.info("Properties set from 'mach build'")
                     self.info(pprint.pformat(build_props))