Bug 1399917 - Create --enable-address-sanitizer-reporter TC build. r?aobreja draft
authorChristian Holler <choller@mozilla.com>
Thu, 14 Sep 2017 17:52:09 +0200
changeset 664922 99f879112cdbf3aca4d776d3005d5fc174e2f226
parent 664921 bad8adc4d1de2d2957740babe98d55356275e0d7
child 731587 dffdfa6df0d507eddbd803eb78bd93704e0ebc44
push id79856
push usercholler@mozilla.com
push dateThu, 14 Sep 2017 15:55:05 +0000
reviewersaobreja
bugs1399917
milestone57.0a1
Bug 1399917 - Create --enable-address-sanitizer-reporter TC build. r?aobreja MozReview-Commit-ID: 7tYSTeU8D73
browser/config/mozconfigs/linux64/nightly-asan-reporter
taskcluster/ci/build/linux.yml
taskcluster/taskgraph/transforms/gecko_v2_whitelist.py
testing/mozharness/configs/builds/releng_sub_linux_configs/64_asan_reporter_tc.py
testing/mozharness/mozharness/mozilla/building/buildbase.py
new file mode 100644
--- /dev/null
+++ b/browser/config/mozconfigs/linux64/nightly-asan-reporter
@@ -0,0 +1,20 @@
+# We still need to build with debug symbols
+ac_add_options --disable-debug
+ac_add_options --enable-optimize="-O2 -gline-tables-only"
+
+. $topsrcdir/build/mozconfig.stylo
+
+# ASan specific options on Linux
+ac_add_options --enable-valgrind
+
+. $topsrcdir/build/unix/mozconfig.asan
+
+ac_add_options --enable-address-sanitizer-reporter
+
+export PKG_CONFIG_LIBDIR=/usr/lib64/pkgconfig:/usr/share/pkgconfig
+. $topsrcdir/build/unix/mozconfig.gtk
+
+# Need this to prevent name conflicts with the normal nightly build packages
+export MOZ_PKG_SPECIAL=asan-reporter
+
+. "$topsrcdir/build/mozconfig.common.override"
--- a/taskcluster/ci/build/linux.yml
+++ b/taskcluster/ci/build/linux.yml
@@ -416,16 +416,46 @@ linux64-asan-fuzzing/opt:
         custom-build-variant-cfg: fuzzing-asan-tc
         tooltool-downloads: public
         need-xvfb: true
     toolchains:
         - linux64-clang-4
         - linux64-gcc
         - linux64-sccache
 
+linux64-asan-reporter/opt:
+    description: "Linux64 Opt ASAN Reporter Nightly"
+    index:
+        product: firefox
+        job-name: linux64-asan-reporter-opt
+    treeherder:
+        platform: linux64/asan
+        symbol: tc(BoR)
+    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
+    worker:
+        env:
+            PERFHERDER_EXTRA_OPTIONS: asan-reporter
+            TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/linux64/releng.manifest"
+        max-run-time: 36000
+    run:
+        using: mozharness
+        actions: [get-secrets build check-test 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: asan-reporter-tc
+        tooltool-downloads: public
+        need-xvfb: true
+    toolchains:
+        - linux64-clang-4
+        - linux64-gcc
+        - linux64-sccache
+
 linux64-asan/debug:
     description: "Linux64 Debug ASAN"
     index:
         product: firefox
         job-name: linux64-asan-debug
     treeherder:
         platform: linux64/asan
         symbol: tc(Bd)
--- a/taskcluster/taskgraph/transforms/gecko_v2_whitelist.py
+++ b/taskcluster/taskgraph/transforms/gecko_v2_whitelist.py
@@ -36,16 +36,17 @@ JOB_NAME_WHITELIST = set([
     'linux-nightly-repackage',
     'linux-nightly-repackage-signing',
     'linux-opt',
     'linux-pgo',
     'linux64-add-on-devel',
     'linux64-artifact-opt',
     'linux64-asan-debug',
     'linux64-asan-opt',
+    'linux64-asan-reporter-opt',
     'linux64-base-toolchains-debug',
     'linux64-base-toolchains-opt',
     'linux64-fuzzing-asan-opt',
     'linux64-ccov-opt',
     'linux64-clang-tidy',
     'linux64-debug',
     'linux64-devedition',
     'linux64-devedition-nightly-repackage',
new file mode 100644
--- /dev/null
+++ b/testing/mozharness/configs/builds/releng_sub_linux_configs/64_asan_reporter_tc.py
@@ -0,0 +1,46 @@
+import os
+
+MOZ_OBJDIR = 'obj-firefox'
+
+config = {
+    'default_actions': [
+        'clobber',
+        'clone-tools',
+        'checkout-sources',
+        'setup-mock',
+        'build',
+        'upload-files',
+        'sendchange',
+        'check-test',
+        # 'update',
+    ],
+    'stage_platform': 'linux64-asan-reporter',
+    'publish_nightly_en_US_routes': False,
+    'build_type': 'asan',
+    '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',
+        'ASAN_OPTIONS': 'detect_leaks=0',
+        ## 64 bit specific
+        'PATH': '/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/nightly-asan-reporter',
+    #######################
+}
--- a/testing/mozharness/mozharness/mozilla/building/buildbase.py
+++ b/testing/mozharness/mozharness/mozilla/building/buildbase.py
@@ -341,16 +341,17 @@ class BuildOptionParser(object):
     # and the script will pull up the appropriate path for the config
     # against the current platform and bits.
     # *It will warn and fail if there is not a config for the current
     # platform/bits
     build_variants = {
         'add-on-devel': 'builds/releng_sub_%s_configs/%s_add-on-devel.py',
         'asan': 'builds/releng_sub_%s_configs/%s_asan.py',
         'asan-tc': 'builds/releng_sub_%s_configs/%s_asan_tc.py',
+        'asan-reporter-tc': 'builds/releng_sub_%s_configs/%s_asan_reporter_tc.py',
         'fuzzing-asan-tc': 'builds/releng_sub_%s_configs/%s_fuzzing_asan_tc.py',
         'tsan': 'builds/releng_sub_%s_configs/%s_tsan.py',
         'cross-debug': 'builds/releng_sub_%s_configs/%s_cross_debug.py',
         'cross-debug-artifact': 'builds/releng_sub_%s_configs/%s_cross_debug_artifact.py',
         'cross-noopt-debug': 'builds/releng_sub_%s_configs/%s_cross_noopt_debug.py',
         'cross-artifact': 'builds/releng_sub_%s_configs/%s_cross_artifact.py',
         'debug': 'builds/releng_sub_%s_configs/%s_debug.py',
         'asan-and-debug': 'builds/releng_sub_%s_configs/%s_asan_and_debug.py',