diff --git a/build/gen_mach_buildprops.py b/build/gen_mach_buildprops.py index 3dce3763032b..b4c76d70d4d6 100644 --- a/build/gen_mach_buildprops.py +++ b/build/gen_mach_buildprops.py @@ -56,14 +56,15 @@ if __name__ == '__main__': 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)) diff --git a/build/moz-automation.mk b/build/moz-automation.mk index 1c592cb4257e..c09e515aad72 100644 --- a/build/moz-automation.mk +++ b/build/moz-automation.mk @@ -17,8 +17,10 @@ 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 @@ -98,7 +100,7 @@ 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 diff --git a/testing/mozharness/mozharness/mozilla/building/buildbase.py b/testing/mozharness/mozharness/mozilla/building/buildbase.py index aa5d68d646d3..1d27da1342d4 100755 --- a/testing/mozharness/mozharness/mozilla/building/buildbase.py +++ b/testing/mozharness/mozharness/mozilla/building/buildbase.py @@ -1280,8 +1280,8 @@ or run without that action (ie: --no-{action})" 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',