зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1239808 - Rename test_packages.json to include package basename as prefix. r=chmanchester, r=jlund
MozReview-Commit-ID: LxTr8Mo2P0i
This commit is contained in:
Родитель
8470084106
Коммит
001ae3fa89
|
@ -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
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -266,7 +266,6 @@ stage-all: \
|
|||
stage-cppunittests \
|
||||
stage-luciddream \
|
||||
test-packages-manifest \
|
||||
test-packages-manifest-tc \
|
||||
$(NULL)
|
||||
ifdef MOZ_WEBRTC
|
||||
stage-all: stage-steeplechase
|
||||
|
@ -289,16 +288,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))
|
||||
|
@ -478,6 +467,4 @@ stage-extensions: make-stage-dir
|
|||
stage-instrumentation-tests \
|
||||
stage-luciddream \
|
||||
test-packages-manifest \
|
||||
test-packages-manifest-tc \
|
||||
$(NULL)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче