new file mode 100644
--- /dev/null
+++ b/testing/mozharness/configs/builds/releng_sub_linux_configs/64_valgrind.py
@@ -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',
+ #######################
+}
--- a/testing/mozharness/mozharness/mozilla/building/buildbase.py
+++ b/testing/mozharness/mozharness/mozilla/building/buildbase.py
@@ -362,16 +362,17 @@ class BuildOptionParser(object):
'api-11-debug': 'builds/releng_sub_%s_configs/%s_api_11_debug.py',
'api-15-debug': 'builds/releng_sub_%s_configs/%s_api_15_debug.py',
'x86': 'builds/releng_sub_%s_configs/%s_x86.py',
'api-11-partner-sample1': 'builds/releng_sub_%s_configs/%s_api_11_partner_sample1.py',
'api-15-partner-sample1': 'builds/releng_sub_%s_configs/%s_api_15_partner_sample1.py',
'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'
@classmethod
def _query_pltfrm_and_bits(cls, target_option, options):
""" determine platform and bits
@@ -2018,16 +2019,37 @@ or run without that action (ie: --no-{ac
if self.submit_balrog_updates():
# set the build to orange so it is at least caught
self.return_code = self.worst_level(
EXIT_STATUS_DICT[TBPL_WARNING], self.return_code,
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')
self.return_code = 2
@PostScriptRun
def _summarize(self):
""" If this is run in automation, ensure the return code is valid and
--- a/testing/mozharness/scripts/fx_desktop_build.py
+++ b/testing/mozharness/scripts/fx_desktop_build.py
@@ -32,16 +32,17 @@ class FxDesktopBuild(BuildScript, object
'clobber',
'clone-tools',
'checkout-sources',
'setup-mock',
'build',
'upload-files', # upload from BB to TC
'sendchange',
'check-test',
+ 'valgrind-test',
'package-source',
'generate-source-signing-manifest',
'multi-l10n',
'generate-build-stats',
'update',
],
'require_config_file': True,
# Default configuration