Bug 1317976 - enable generate-build-stats on tc win builds r=ted
MozReview-Commit-ID: 7iDpPfRFibW
--- a/testing/mozharness/configs/builds/taskcluster_firefox_windows_32_debug.py
+++ b/testing/mozharness/configs/builds/taskcluster_firefox_windows_32_debug.py
@@ -11,16 +11,17 @@ config = {
# - taskcluster_firefox_win32_opt
# - taskcluster_firefox_win64_debug
# - taskcluster_firefox_win64_opt
'default_actions': [
'clone-tools',
'build',
'check-test',
+ 'generate-build-stats'
],
'exes': {
'python2.7': sys.executable,
'make': [
sys.executable,
os.path.join(
os.getcwd(), 'build', 'src', 'build', 'pymake', 'make.py'
)
--- a/testing/mozharness/configs/builds/taskcluster_firefox_windows_32_opt.py
+++ b/testing/mozharness/configs/builds/taskcluster_firefox_windows_32_opt.py
@@ -11,16 +11,17 @@ config = {
# - taskcluster_firefox_win32_opt
# - taskcluster_firefox_win64_debug
# - taskcluster_firefox_win64_opt
'default_actions': [
'clone-tools',
'build',
'check-test',
+ 'generate-build-stats'
],
'exes': {
'python2.7': sys.executable,
'make': [
sys.executable,
os.path.join(
os.getcwd(), 'build', 'src', 'build', 'pymake', 'make.py'
)
--- a/testing/mozharness/configs/builds/taskcluster_firefox_windows_64_debug.py
+++ b/testing/mozharness/configs/builds/taskcluster_firefox_windows_64_debug.py
@@ -11,16 +11,17 @@ config = {
# - taskcluster_firefox_win32_opt
# - taskcluster_firefox_win64_debug
# - taskcluster_firefox_win64_opt
'default_actions': [
'clone-tools',
'build',
'check-test',
+ 'generate-build-stats'
],
'exes': {
'python2.7': sys.executable,
'make': [
sys.executable,
os.path.join(
os.getcwd(), 'build', 'src', 'build', 'pymake', 'make.py'
)
--- a/testing/mozharness/configs/builds/taskcluster_firefox_windows_64_opt.py
+++ b/testing/mozharness/configs/builds/taskcluster_firefox_windows_64_opt.py
@@ -11,16 +11,17 @@ config = {
# - taskcluster_firefox_win32_opt
# - taskcluster_firefox_win64_debug
# - taskcluster_firefox_win64_opt
'default_actions': [
'clone-tools',
'build',
'check-test',
+ 'generate-build-stats'
],
'exes': {
'python2.7': sys.executable,
'make': [
sys.executable,
os.path.join(
os.getcwd(), 'build', 'src', 'build', 'pymake', 'make.py'
)
--- a/testing/mozharness/mozharness/mozilla/building/buildbase.py
+++ b/testing/mozharness/mozharness/mozilla/building/buildbase.py
@@ -1883,16 +1883,22 @@ or run without that action (ie: --no-{ac
continue
data['subtests'].append({
'name': phase['name'],
'value': phase['duration'],
})
return data
+ 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'):
@@ -1913,22 +1919,30 @@ 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 = []