Bug 1271622 - migrate valgrind build to use mozharness r=kmoir

This commit is contained in:
fkang 2016-06-03 10:19:37 -04:00
Родитель d5fef47a98
Коммит 900260f1fd
6 изменённых файлов: 110 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,49 @@
import os
MOZ_OBJDIR = 'obj-firefox'
config = {
'default_actions': [
'clobber',
'clone-tools',
'checkout-sources',
#'setup-mock',
'build',
#'upload-files',
#'sendchange',
'check-test',
'valgrind-test',
#'generate-build-stats',
#'update',
],
'stage_platform': 'linux64-valgrind',
'publish_nightly_en_US_routes': False,
'build_type': 'valgrind',
'tooltool_manifest_src': "browser/config/tooltool-manifests/linux64/\
releng.manifest",
'platform_supports_post_upload_to_latest': False,
'enable_signing': False,
'enable_talos_sendchange': False,
#### 64 bit build specific #####
'env': {
'MOZBUILD_STATE_PATH': os.path.join(os.getcwd(), '.mozbuild'),
'MOZ_AUTOMATION': '1',
'DISPLAY': ':2',
'HG_SHARE_BASE_DIR': '/builds/hg-shared',
'MOZ_OBJDIR': 'obj-firefox',
'TINDERBOX_OUTPUT': '1',
'TOOLTOOL_CACHE': '/builds/tooltool_cache',
'TOOLTOOL_HOME': '/builds',
'MOZ_CRASHREPORTER_NO_REPORT': '1',
'CCACHE_DIR': '/builds/ccache',
'CCACHE_COMPRESS': '1',
'CCACHE_UMASK': '002',
'LC_ALL': 'C',
## 64 bit specific
'PATH': '/tools/buildbot/bin:/usr/local/bin:/usr/lib64/ccache:/bin:\
/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/tools/git/bin:/tools/python27/bin:\
/tools/python27-mercurial/bin:/home/cltbld/bin',
},
'src_mozconfig': 'browser/config/mozconfigs/linux64/valgrind',
#######################
}

Просмотреть файл

@ -369,6 +369,7 @@ class BuildOptionParser(object):
'android-test': 'builds/releng_sub_%s_configs/%s_test.py',
'android-checkstyle': 'builds/releng_sub_%s_configs/%s_checkstyle.py',
'android-lint': 'builds/releng_sub_%s_configs/%s_lint.py',
'valgrind' : 'builds/releng_sub_%s_configs/%s_valgrind.py'
}
build_pool_cfg_file = 'builds/build_pool_specifics.py'
branch_cfg_file = 'builds/branch_specifics.py'
@ -2025,6 +2026,27 @@ or run without that action (ie: --no-{action})"
AUTOMATION_EXIT_CODES[::-1]
)
def valgrind_test(self):
'''Execute mach's valgrind-test for memory leaks'''
env = self.query_build_env()
env.update(self.query_mach_build_env())
python = self.query_exe('python2.7')
return_code = self.run_command_m(
command=[python, 'mach', 'valgrind-test'],
cwd=self.query_abs_dirs()['abs_src_dir'],
env=env, output_timeout=self.config.get('max_build_output_timeout', 60 * 40)
)
if return_code:
self.return_code = self.worst_level(
EXIT_STATUS_DICT[TBPL_FAILURE], self.return_code,
AUTOMATION_EXIT_CODES[::-1]
)
self.fatal("'mach valgrind-test' did not run successfully. Please check "
"log for errors.")
def _post_fatal(self, message=None, exit_code=None):
if not self.return_code: # only overwrite return_code if it's 0
self.error('setting return code to 2 because fatal was called')

Просмотреть файл

@ -37,6 +37,7 @@ class FxDesktopBuild(BuildScript, object):
'upload-files', # upload from BB to TC
'sendchange',
'check-test',
'valgrind-test',
'package-source',
'generate-source-signing-manifest',
'multi-l10n',

Просмотреть файл

@ -99,6 +99,7 @@ flags:
- linux64-artifact
- linux64-asan
- linux64-pgo
- linux64-valgrind
- macosx64
- macosx64-st-an

Просмотреть файл

@ -78,6 +78,12 @@ builds:
types:
opt:
task: tasks/builds/opt_linux64_pgo.yml
linux64-valgrind:
platforms:
- Linux64 Valgrind
types:
opt:
task: tasks/builds/opt_linux64_valgrind.yml
macosx64:
platforms:
- MacOSX64

Просмотреть файл

@ -0,0 +1,31 @@
$inherits:
from: 'tasks/builds/base_linux64.yml'
variables:
build_name: 'linux64-valgrind'
build_type: 'opt'
task:
metadata:
name: '[TC] Linux64 Valgrind Opt'
description: 'Linux64 Valgrind Opt'
routes:
- 'index.buildbot.branches.{{project}}.linux64-valgrind'
- 'index.buildbot.revisions.{{head_rev}}.{{project}}.linux64-valgrind'
workerType: opt-linux64
payload:
env:
MH_CUSTOM_BUILD_VARIANT_CFG: 'valgrind'
MOZHARNESS_ACTIONS: 'get-secrets build valgrind-test generate-build-stats'
maxRunTime: 72000
extra:
treeherder:
groupSymbol: tc
groupName: Submitted by taskcluster
symbol: V
machine:
# see https://github.com/mozilla/treeherder/blob/master/ui/js/values.js
platform: linux64