Bug 1278402 - Add linux64-ccov and linux64-jsdcov as code coverage build platforms to taskcluster. r=dustin,jmaher

These builds can be run on taskcluster to obtain per-test (JSDebugger) code coverage with the linux64-jsdcov build and overall (GCOV) code coverage with the linux64-ccov build. The linux64-jsdcov build also needed to have leak checking disabled for debug mode.

MozReview-Commit-ID: ASgrU2X7RQV

--HG--
extra : rebase_source : af40a6e582665ffcb575092586731f595a362ae4
This commit is contained in:
Greg Mierzwinski 2016-07-23 11:27:49 -04:00
Родитель 31fdf0df86
Коммит 8875e96f7d
10 изменённых файлов: 140 добавлений и 16 удалений

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

@ -1,6 +1,13 @@
. "$topsrcdir/browser/config/mozconfigs/linux64/nightly"
TOOLTOOL_DIR=${TOOLTOOL_DIR:-$topsrcdir}
ac_add_options --disable-install-strip
ac_add_options --disable-jemalloc
ac_add_options --disable-crashreporter
ac_add_options --disable-elf-hack
MOZ_CODE_COVERAGE=1
export CFLAGS="-fprofile-arcs -ftest-coverage"
export CXXFLAGS="-fprofile-arcs -ftest-coverage"
export LDFLAGS="-fprofile-arcs -ftest-coverage -lgcov"
export LDFLAGS="-fprofile-arcs -ftest-coverage -lgcov -L$TOOLTOOL_DIR/gtk3/usr/local/lib"

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

@ -174,3 +174,51 @@ linux64-asan/debug:
tooltool-downloads: public
need-xvfb: true
linux64-jsdcov/opt:
description: "Linux64-JSDCov Opt"
index:
product: firefox
job-name: linux64-jsdcov-opt
treeherder:
platform: linux64/jsdcov
symbol: tc(B)
tier: 2
worker-type: aws-provisioner-v1/gecko-{level}-b-linux
worker:
implementation: docker-worker
max-run-time: 36000
run:
using: mozharness
actions: [get-secrets build check-test generate-build-stats update]
config:
- builds/releng_base_linux_64_builds.py
- balrog/production.py
script: "mozharness/scripts/fx_desktop_build.py"
secrets: true
tooltool-downloads: public
need-xvfb: true
linux64-ccov/opt:
description: "Linux64-CCov Opt"
index:
product: firefox
job-name: linux64-ccov-opt
treeherder:
platform: linux64/ccov
symbol: tc(B)
tier: 2
worker-type: aws-provisioner-v1/gecko-{level}-b-linux
worker:
implementation: docker-worker
max-run-time: 36000
run:
using: mozharness
actions: [get-secrets build check-test generate-build-stats update]
config:
- builds/releng_base_linux_64_builds.py
- balrog/production.py
script: "mozharness/scripts/fx_desktop_build.py"
secrets: true
custom-build-variant-cfg: code-coverage
tooltool-downloads: public
need-xvfb: true

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

@ -25,3 +25,9 @@ linux64-pgo/opt:
linux64-asan/opt:
build-platform: linux64-asan/opt
test-set: asan-tests
linux64-ccov/opt:
build-platform: linux64-ccov/opt
test-set: ccov-code-coverage-tests
linux64-jsdcov/opt:
build-platform: linux64-jsdcov/opt
test-set: jsdcov-code-coverage-tests

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

@ -56,3 +56,9 @@ asan-tests:
- reftest
- reftest-no-accel
- xpcshell
ccov-code-coverage-tests:
- mochitest-browser-chrome
jsdcov-code-coverage-tests:
- mochitest-browser-chrome

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

@ -189,13 +189,30 @@ mochitest-a11y:
- --mochitest-suite=a11y
mochitest-browser-chrome:
description: "Mochitest browser-chrome run"
suite: mochitest/browser-chrome-chunked
description:
by-test-platform:
linux64-jsdcov/opt: "Mochitest browser-chrome JSDebugger code coverage run"
linux64-ccov/opt: "Mochitest browser-chrome GCOV code coverage run"
default: "Mochitest browser-chrome run"
suite:
by-test-platform:
linux64-jsdcov/opt: mochitest/browser-chrome-coverage
default: mochitest/browser-chrome-chunked
treeherder-symbol: tc-M(bc)
loopback-video: true
chunks: 7
chunks:
by-test-platform:
linux64-jsdcov/opt: 35
default: 7
e10s:
by-test-platform:
linux64-jsdcov/opt: false
linux64-ccov/opt: false
default: both
max-run-time:
by-test-platform:
linux64-jsdcov/opt: 7200
linux64-ccov/opt: 7200
linux64/debug: 5400
default: 3600
mozharness:
@ -207,9 +224,20 @@ mochitest-browser-chrome:
- mozharness/configs/unittests/linux_unittest.py
- mozharness/configs/remove_executables.py
extra-options:
- --mochitest-suite=browser-chrome-chunked
by-test-platform:
linux64-jsdcov/opt:
- --mochitest-suite=browser-chrome-coverage
linux64-ccov/opt:
- --mochitest-suite=browser-chrome-chunked
- --code-coverage
default:
- --mochitest-suite=browser-chrome-chunked
# Bug 1281241: migrating to m3.large instances
instance-size: legacy
instance-size:
by-test-platform:
linux64-jsdcov/opt: xlarge
linux64-ccov/opt: xlarge
default: legacy
allow-software-gl-layers: false
mochitest-chrome:

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

@ -82,6 +82,9 @@ def resolve_keyed_by(config, tests):
'instance-size',
'max-run-time',
'chunks',
'e10s',
'suite',
'description',
]
for test in tests:
for field in fields:
@ -90,6 +93,10 @@ def resolve_keyed_by(config, tests):
field='mozharness',
subfield='config',
item_name=test['test-name'])
test['mozharness']['extra-options'] = get_keyed_by(item=test,
field='mozharness',
subfield='extra-options',
item_name=test['test-name'])
yield test

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

@ -29,10 +29,16 @@ from voluptuous import (
# *****WARNING*****
test_description_schema = Schema({
# description of the suite, for the task metadata
'description': basestring,
Required('description'): Any(
basestring,
{'by-test-platform': {basestring: basestring}},
),
# test suite name, or <suite>/<flavor>
'suite': basestring,
Required('suite'): Any(
basestring,
{'by-test-platform': {basestring: basestring}},
),
# the name by which this test suite is addressed in try syntax; defaults to
# the test-name
@ -138,7 +144,10 @@ test_description_schema = Schema({
# additional command-line options for mozharness, beyond those
# automatically added
Required('extra-options', default=[]): [basestring],
Required('extra-options', default=[]): Any(
[basestring],
{'by-test-platform': {basestring: [basestring]}},
),
# the artifact name (including path) to test on the build task; this is
# generally set in a per-kind transformation

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

@ -2380,9 +2380,12 @@ class MochitestDesktop(MochitestBase):
else:
timeout = 330.0 # default JS harness timeout is 300 seconds
# detect shutdown leaks for m-bc runs
detectShutdownLeaks = mozinfo.info[
"debug"] and options.flavor == 'browser'
# Detect shutdown leaks for m-bc runs if
# code coverage is not enabled.
detectShutdownLeaks = False
if options.jscov_dir_prefix is None:
detectShutdownLeaks = mozinfo.info[
"debug"] and options.flavor == 'browser'
self.start_script_args.append(self.normflavor(options.flavor))
marionette_args = {
@ -2427,10 +2430,20 @@ class MochitestDesktop(MochitestBase):
finally:
self.stopServers()
ignoreMissingLeaks = options.ignoreMissingLeaks
leakThresholds = options.leakThresholds
# Stop leak detection if m-bc code coverage is enabled
# by maxing out the leak threshold for all processes.
if options.jscov_dir_prefix:
for processType in leakThresholds:
ignoreMissingLeaks.append(processType)
leakThresholds[processType] = sys.maxsize
mozleak.process_leak_log(
self.leak_report_file,
leak_thresholds=options.leakThresholds,
ignore_missing_leaks=options.ignoreMissingLeaks,
leak_thresholds=leakThresholds,
ignore_missing_leaks=ignoreMissingLeaks,
log=self.log,
stack_fixer=get_stack_fixer_function(options.utilityPath,
options.symbolsPath),

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

@ -15,7 +15,7 @@ config = {
# 'generate-build-stats',
'update', # decided by query_is_nightly()
],
'stage_platform': 'linux64-cc',
'stage_platform': 'linux64-ccov',
'platform_supports_post_upload_to_latest': False,
'enable_signing': False,
'enable_talos_sendchange': False,

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

@ -36,7 +36,7 @@ class CodeCoverageMixin(object):
return True
# XXX workaround because bug 1110465 is hard
return self.buildbot_config['properties']['stage_platform'] in ('linux64-cc',)
return self.buildbot_config['properties']['stage_platform'] in ('linux64-ccov',)
except (AttributeError, KeyError, TypeError):
return False