Bug 1321065 - Default to --enable-profiling for nightly milestones. r=gps

--HG--
extra : rebase_source : c6de2844b781e6d8a03d1548dffc72aae2bd7138
This commit is contained in:
Mike Hommey 2016-11-30 06:47:38 +09:00
parent f94cef05e4
commit aee44c472c
2 changed files with 9 additions and 5 deletions

View File

@ -141,7 +141,11 @@ def callgrind(value):
set_define('MOZ_CALLGRIND', callgrind)
imply_option('--enable-profiling', callgrind)
js_option('--enable-profiling', env='MOZ_PROFILING',
@depends(milestone, '--help')
def enable_profiling(milestone, help):
return milestone.is_nightly
js_option('--enable-profiling', env='MOZ_PROFILING', default=enable_profiling,
help='Set compile flags necessary for using sampling profilers '
'(e.g. shark, perf)')

View File

@ -31,15 +31,15 @@ class TestMozConfigure(BaseConfigureTest):
get_value_for(['--enable-application=browser']))
self.assertEquals('--enable-application=browser '
'MOZ_PROFILING=1',
'MOZ_VTUNE=1',
get_value_for(['--enable-application=browser',
'MOZ_PROFILING=1']))
'MOZ_VTUNE=1']))
value = get_value_for(
environ={'MOZ_PROFILING': '1'},
environ={'MOZ_VTUNE': '1'},
mozconfig='ac_add_options --enable-project=js')
self.assertEquals('--enable-project=js MOZ_PROFILING=1',
self.assertEquals('--enable-project=js MOZ_VTUNE=1',
value)
# --disable-js-shell is the default, so it's filtered out.