Bug 1265537 - Adjust Windows TC Builds to generate simple package names, adjust tests to use them. r=grenade
MozReview-Commit-ID: AgCTrIMXEdd
--- a/taskcluster/taskgraph/transforms/job/mozharness.py
+++ b/taskcluster/taskgraph/transforms/job/mozharness.py
@@ -195,16 +195,17 @@ def mozharness_on_generic_worker(config,
}]
docker_worker_add_gecko_vcs_env_vars(config, job, taskdesc)
env = worker['env']
env.update({
'MOZ_BUILD_DATE': config.params['moz_build_date'],
'MOZ_SCM_LEVEL': config.params['level'],
+ 'MOZ_SIMPLE_PACKAGE_NAME': 'target',
})
if not job['attributes']['build_platform'].startswith('win'):
raise Exception(
"Task generation for mozharness build jobs currently only supported on Windows"
)
mh_command = [r'c:\mozilla-build\python\python.exe']
--- a/taskcluster/taskgraph/transforms/job/mozharness_test.py
+++ b/taskcluster/taskgraph/transforms/job/mozharness_test.py
@@ -188,19 +188,17 @@ def mozharness_test_on_generic_worker(co
'name': 'public/test_info',
'path': 'build/blobber_upload_dir',
'type': 'directory'
})
build_platform = taskdesc['attributes']['build_platform']
build_type = taskdesc['attributes']['build_type']
- if build_platform.startswith('win'):
- target = 'firefox-{}.en-US.{}'.format(get_firefox_version(), build_platform)
- elif build_platform == 'macosx64' and build_type == 'opt':
+ if build_platform == 'macosx64' and build_type == 'opt':
target = 'firefox-{}.en-US.{}'.format(get_firefox_version(), 'mac')
else:
target = 'target'
installer_url = get_artifact_url('<build>', mozharness['build-artifact-name'])
test_packages_url = get_artifact_url(
'<build>', 'public/build/{}.test_packages.json'.format(target))
--- a/taskcluster/taskgraph/transforms/tests.py
+++ b/taskcluster/taskgraph/transforms/tests.py
@@ -354,20 +354,17 @@ def set_target(config, tests):
else:
target = 'target.dmg'
elif build_platform.startswith('android'):
if 'geckoview' in test['test-name']:
target = 'geckoview_example.apk'
else:
target = 'target.apk'
elif build_platform.startswith('win'):
- target = 'firefox-{}.en-US.{}.zip'.format(
- get_firefox_version(),
- build_platform.split('/')[0]
- )
+ target = 'target.zip'
else:
target = 'target.tar.bz2'
test['mozharness']['build-artifact-name'] = 'public/build/' + target
yield test
@transforms.add
def set_treeherder_machine_platform(config, tests):
@@ -619,19 +616,19 @@ def set_tag(config, tests):
yield test
@transforms.add
def remove_linux_pgo_try_talos(config, tests):
"""linux64-pgo talos tests don't run on try."""
def predicate(test):
return not(
- test['test-platform'] == 'linux64-pgo/opt'
- and (test['suite'] == 'talos' or test['suite'] == 'awsy')
- and config.params['project'] == 'try'
+ test['test-platform'] == 'linux64-pgo/opt' and
+ (test['suite'] == 'talos' or test['suite'] == 'awsy') and
+ config.params['project'] == 'try'
)
for test in filter(predicate, tests):
yield test
@transforms.add
def set_test_type(config, tests):
for test in tests:
--- a/testing/mozharness/mozharness/mozilla/building/buildbase.py
+++ b/testing/mozharness/mozharness/mozilla/building/buildbase.py
@@ -1937,22 +1937,16 @@ or run without that action (ie: --no-{ac
yield {
'name': 'sccache requests_not_cacheable',
'value': stats['stats']['requests_not_cacheable'],
'extraOptions': self.perfherder_resource_options(),
'alertThreshold': 50.0,
'subtests': [],
}
- def get_firefox_version(self):
- versionFilePath = os.path.join(
- self.query_abs_dirs()['abs_src_dir'], 'browser/config/version.txt')
- with open(versionFilePath, 'r') as versionFile:
- return versionFile.readline().strip()
-
def generate_build_stats(self):
"""grab build stats following a compile.
This action handles all statistics from a build: 'count_ctors'
and then posts to graph server the results.
We only post to graph server for non nightly build
"""
if self.config.get('forced_artifact_build'):
@@ -1973,30 +1967,22 @@ or run without that action (ie: --no-{ac
dirs = self.query_abs_dirs()
packageName = self.query_buildbot_property('packageFilename')
# if packageName is not set because we are not running in Buildbot,
# then assume we are using MOZ_SIMPLE_PACKAGE_NAME, which means the
# package is named one of target.{tar.bz2,zip,dmg}.
if not packageName:
- firefox_version = self.get_firefox_version()
dist_dir = os.path.join(dirs['abs_obj_dir'], 'dist')
for ext in ['apk', 'dmg', 'tar.bz2', 'zip']:
name = 'target.' + ext
if os.path.exists(os.path.join(dist_dir, name)):
packageName = name
break
- # if we are not using MOZ_SIMPLE_PACKAGE_NAME, check for the
- # default package naming convention
- name = 'firefox-{}.en-US.{}.{}'.format(
- firefox_version, c.get('platform'), ext)
- if os.path.exists(os.path.join(dist_dir, name)):
- packageName = name
- break
else:
self.fatal("could not determine packageName")
interests = ['libxul.so', 'classes.dex', 'omni.ja']
installer = os.path.join(dirs['abs_obj_dir'], 'dist', packageName)
installer_size = 0
size_measurements = []