diff --git a/build/gen_test_packages_manifest.py b/build/gen_test_packages_manifest.py index 3ad8a67378e8..b9bc60b44b35 100644 --- a/build/gen_test_packages_manifest.py +++ b/build/gen_test_packages_manifest.py @@ -45,9 +45,6 @@ def parse_args(): parser.add_argument("--jsshell", required=True, action="store", dest="jsshell", help="Name of the jsshell zip.") - parser.add_argument("--use-short-names", action="store_true", - help="Use short names for packages (target.$name.tests.zip " - "instead of $(PACKAGE_BASENAME).$name.tests.zip)") for harness in PACKAGE_SPECIFIED_HARNESSES: parser.add_argument("--%s" % harness, required=True, action="store", dest=harness, @@ -61,6 +58,7 @@ def parse_args(): help="Path to the output file to be written.") return parser.parse_args() + def generate_package_data(args): # Generate a dictionary mapping test harness names (exactly as they're known to # mozharness and testsuite-targets.mk, ideally) to the set of archive names that @@ -69,9 +67,6 @@ def generate_package_data(args): # which will be an optimization once parts of the main zip are split to harness # specific zips. tests_common = args.tests_common - if args.use_short_names: - tests_common = 'target.common.tests.zip' - jsshell = args.jsshell harness_requirements = dict([(k, [tests_common]) for k in ALL_HARNESSES]) @@ -80,8 +75,6 @@ def generate_package_data(args): pkg_name = getattr(args, harness, None) if pkg_name is None: continue - if args.use_short_names: - pkg_name = 'target.%s.tests.zip' % harness harness_requirements[harness].append(pkg_name) return harness_requirements diff --git a/testing/mozharness/mozharness/mozilla/testing/testbase.py b/testing/mozharness/mozharness/mozilla/testing/testbase.py index 46ff6933703e..8ce926511dc1 100755 --- a/testing/mozharness/mozharness/mozilla/testing/testbase.py +++ b/testing/mozharness/mozharness/mozilla/testing/testbase.py @@ -164,16 +164,34 @@ class TestingMixin(VirtualenvMixin, BuildbotMixin, ResourceMonitoringMixin, return '%s/%s' % (base_url, file_name) + def query_prefixed_build_dir_url(self, suffix): + """Resolve a file name prefixed with platform and build details to a potential url + in the build upload directory where that file can be found. + """ + if self.test_packages_url: + reference_suffixes = ['.test_packages.json'] + reference_url = self.test_packages_url + elif self.installer_url: + reference_suffixes = INSTALLER_SUFFIXES + reference_url = self.installer_url + else: + self.fatal("Can't figure out build directory urls without an installer_url " + "or test_packages_url!") + + url = None + for reference_suffix in reference_suffixes: + if reference_url.endswith(reference_suffix): + url = reference_url[:-len(reference_suffix)] + suffix + break + + return url + def query_symbols_url(self): if self.symbols_url: return self.symbols_url elif self.installer_url: - symbols_url = None - for suffix in INSTALLER_SUFFIXES: - if self.installer_url.endswith(suffix): - symbols_url = self.installer_url[:-len(suffix)] + '.crashreporter-symbols.zip' - break + symbols_url = self.query_prefixed_build_dir_url('.crashreporter-symbols.zip') # Check if the URL exists. If not, use none to allow mozcrash to auto-check for symbols try: @@ -536,7 +554,7 @@ You can set this by: # where the packages manifest is located. This is the case when the # test package manifest isn't set as a buildbot property, which is true # for some self-serve jobs and platforms using parse_make_upload. - self.test_packages_url = self.query_build_dir_url('test_packages.json') + self.test_packages_url = self.query_prefixed_build_dir_url('.test_packages.json') suite_categories = suite_categories or ['common'] self._download_test_packages(suite_categories, target_unzip_dirs) diff --git a/testing/testsuite-targets.mk b/testing/testsuite-targets.mk index af221b95be88..972ddd573bd1 100644 --- a/testing/testsuite-targets.mk +++ b/testing/testsuite-targets.mk @@ -182,7 +182,6 @@ stage-all: \ stage-cppunittests \ stage-luciddream \ test-packages-manifest \ - test-packages-manifest-tc \ $(NULL) ifdef MOZ_WEBRTC stage-all: stage-steeplechase @@ -205,16 +204,6 @@ endif PKG_ARG = --$(1) '$(PKG_BASENAME).$(1).tests.zip' -test-packages-manifest-tc: - @rm -f $(MOZ_TEST_PACKAGES_FILE_TC) - $(NSINSTALL) -D $(dir $(MOZ_TEST_PACKAGES_FILE_TC)) - $(PYTHON) $(topsrcdir)/build/gen_test_packages_manifest.py \ - --jsshell $(JSSHELL_NAME) \ - --dest-file $(MOZ_TEST_PACKAGES_FILE_TC) \ - --use-short-names \ - $(call PKG_ARG,common) \ - $(foreach pkg,$(TEST_PKGS),$(call PKG_ARG,$(pkg))) - test-packages-manifest: @rm -f $(MOZ_TEST_PACKAGES_FILE) $(NSINSTALL) -D $(dir $(MOZ_TEST_PACKAGES_FILE)) @@ -389,6 +378,4 @@ stage-extensions: make-stage-dir stage-instrumentation-tests \ stage-luciddream \ test-packages-manifest \ - test-packages-manifest-tc \ $(NULL) - diff --git a/toolkit/mozapps/installer/package-name.mk b/toolkit/mozapps/installer/package-name.mk index c0bb0934ba9e..a91c0b604369 100644 --- a/toolkit/mozapps/installer/package-name.mk +++ b/toolkit/mozapps/installer/package-name.mk @@ -156,8 +156,7 @@ MOZ_SOURCESTAMP_FILE = $(DIST)/$(PKG_PATH)/$(MOZ_INFO_BASENAME).txt MOZ_BUILDINFO_FILE = $(DIST)/$(PKG_PATH)/$(MOZ_INFO_BASENAME).json MOZ_BUILDID_INFO_TXT_FILE = $(DIST)/$(PKG_PATH)/$(MOZ_INFO_BASENAME)_info.txt MOZ_MOZINFO_FILE = $(DIST)/$(PKG_PATH)/$(MOZ_INFO_BASENAME).mozinfo.json -MOZ_TEST_PACKAGES_FILE = $(DIST)/$(PKG_PATH)/test_packages.json -MOZ_TEST_PACKAGES_FILE_TC = $(DIST)/$(PKG_PATH)/test_packages_tc.json +MOZ_TEST_PACKAGES_FILE = $(DIST)/$(PKG_PATH)/$(PKG_BASENAME).test_packages.json # JavaScript Shell ifdef MOZ_SIMPLE_PACKAGE_NAME