Bug 1470079 - Add fuzzing coverage build to taskcluster r=marco

MozReview-Commit-ID: 5TyxY2KmLCs

--HG--
extra : rebase_source : ad480d344e428ffcb1c31ab5bca1f6c9a468d6e1
This commit is contained in:
rforbes 2018-06-24 18:48:52 -07:00
Родитель 5c6e8a5e28
Коммит a9523d34ea
5 изменённых файлов: 106 добавлений и 2 удалений

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

@ -0,0 +1,38 @@
MOZ_AUTOMATION_L10N_CHECK=0
# We still need to build with debug symbols
ac_add_options --disable-debug
ac_add_options --enable-optimize="-O2 -gline-tables-only"
#add-on signing is checked but not enforced
MOZ_REQUIRE_SIGNING=0
# Enable MOZ_ALLOW_LEGACY_EXTENSIONS
ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1"
. $topsrcdir/build/mozconfig.stylo
# ASan specific options on Linux
ac_add_options --enable-valgrind
. $topsrcdir/build/unix/mozconfig.asan
ac_add_options --disable-elf-hack
ac_add_options --disable-sandbox
ac_add_options --disable-profiling
ac_add_options --disable-warnings-as-errors
ac_add_options --enable-coverage
export CFLAGS="--coverage"
export CXXFLAGS="--coverage"
export LDFLAGS="--coverage"
ac_add_options --enable-fuzzing
unset MOZ_STDCXX_COMPAT
# Package js shell.
export MOZ_PACKAGE_JSSHELL=1
# Need this to prevent name conflicts with the normal nightly build packages
export MOZ_PKG_SPECIAL=asan-cov
. "$topsrcdir/build/mozconfig.common.override"

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

@ -559,7 +559,6 @@ linux64-asan/opt:
- linux64-rust-size
- linux64-sccache
linux64-asan-fuzzing/opt:
description: "Linux64 Fuzzing Opt ASAN"
index:
@ -591,6 +590,38 @@ linux64-asan-fuzzing/opt:
- linux64-rust-size
- linux64-sccache
linux64-asan-fuzzing-ccov/opt:
description: "Linux64 Fuzzing Opt ASAN w/ Coverage"
index:
product: firefox
job-name: linux64-fuzzing-asan-opt-cov
treeherder:
platform: linux64/asan
symbol: Bocf
run-on-projects: ['mozilla-central', 'try']
worker-type: aws-provisioner-v1/gecko-{level}-b-linux
worker:
env:
PERFHERDER_EXTRA_OPTIONS: asan-fuzzing-ccov
max-run-time: 3600
run:
using: mozharness
actions: [get-secrets build check-test update]
config:
- builds/releng_base_firefox.py
- builds/releng_base_linux_64_builds.py
script: "mozharness/scripts/fx_desktop_build.py"
secrets: true
custom-build-variant-cfg: fuzzing-cov
tooltool-downloads: public
need-xvfb: true
toolchains:
- linux64-clang
- linux64-gcc
- linux64-rust
- linux64-rust-size
- linux64-sccache
linux64-asan-reporter-nightly/opt:
description: "Linux64 Opt ASAN Reporter Nightly"
attributes:
@ -952,7 +983,7 @@ linux64-ccov/opt:
platform: linux64-ccov/opt
symbol: B
tier: 2
run-on-projects: ['try']
run-on-projects: ['mozilla-central', 'try']
worker-type: aws-provisioner-v1/gecko-{level}-b-linux
worker:
max-run-time: 7200

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

@ -706,6 +706,10 @@ def enable_code_coverage(config, tests):
"""Enable code coverage for the ccov and jsdcov build-platforms"""
for test in tests:
if 'ccov' in test['build-platform']:
# do not run tests on fuzzing or opt build
if 'opt' in test['build-platform'] or 'fuzzing' in test['build-platform']:
test['run-on-projects'] = []
continue
test['mozharness'].setdefault('extra-options', []).append('--code-coverage')
test['instance-size'] = 'xlarge'
# Ensure we always run on the projects defined by the build, unless the test

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

@ -0,0 +1,30 @@
import os
config = {
'default_actions': [
'clobber',
'build',
'check-test',
# 'update',
],
'stage_platform': 'linux64-fuzzing-cov',
#### 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': '%(abs_obj_dir)s',
'TINDERBOX_OUTPUT': '1',
'TOOLTOOL_CACHE': '/builds/tooltool_cache',
'TOOLTOOL_HOME': '/builds',
'MOZ_CRASHREPORTER_NO_REPORT': '1',
'LC_ALL': 'C',
'ASAN_OPTIONS': 'detect_leaks=0',
## 64 bit specific
'PATH': '/usr/local/bin:/bin:\
/usr/bin:/usr/local/sbin:/usr/sbin:/sbin',
},
'mozconfig_variant': 'nightly-fuzzing-cov',
#######################
}

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

@ -414,6 +414,7 @@ class BuildOptionParser(object):
'cross-artifact': 'builds/releng_sub_%s_configs/%s_cross_artifact.py',
'debug': 'builds/releng_sub_%s_configs/%s_debug.py',
'fuzzing-debug': 'builds/releng_sub_%s_configs/%s_fuzzing_debug.py',
'fuzzing-cov': 'builds/releng_sub_%s_configs/%s_fuzzing_cov.py',
'asan-and-debug': 'builds/releng_sub_%s_configs/%s_asan_and_debug.py',
'asan-tc-and-debug': 'builds/releng_sub_%s_configs/%s_asan_tc_and_debug.py',
'lto-tc': 'builds/releng_sub_%s_configs/%s_lto_tc.py',