Increase ClangTidy code coverage by enabling features.

Change-Id: Ibb296dde9a412bf7f9de23f08cd4db700843729f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307557
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
This commit is contained in:
John Stiles 2020-08-03 10:55:40 -04:00 committed by Skia Commit-Bot
parent 4b9b34558f
commit 789578011e
3 changed files with 10 additions and 2 deletions

View File

@ -19,7 +19,7 @@ infra/bots/recipes). They are all Skia-specific and some are interrelated:
When you change a recipe module, you generally need to re-train the simulation
test:
$ python infra/bots/recipes.py test run --train
$ python infra/bots/infra_tests.py --train
Or:

View File

@ -176,6 +176,14 @@ def compile_fn(api, checkout_root, out_dir):
# Swap in clang-tidy.sh for clang++, but update PATH so it can find clang++.
cxx = skia_dir.join("tools/clang-tidy.sh")
env['PATH'] = '%s:%%(PATH)s' % (clang_linux + '/bin')
# Increase ClangTidy code coverage by enabling features.
args.update({
'skia_enable_fontmgr_empty': 'true',
'skia_enable_pdf': 'true',
'skia_use_expat': 'true',
'skia_use_freetype': 'true',
'skia_use_vulkan': 'true',
})
if 'Coverage' in extra_tokens:
# See https://clang.llvm.org/docs/SourceBasedCodeCoverage.html for

View File

@ -36,7 +36,7 @@
"[START_DIR]/cache/work/skia/bin/gn",
"gen",
"[START_DIR]/cache/work/skia/out/Build-Debian10-Clang-x86_64-Debug-Tidy/Debug",
"--args=cc=\"[START_DIR]/clang_linux/bin/clang\" cxx=\"[START_DIR]/cache/work/skia/tools/clang-tidy.sh\" extra_cflags=[\"-B[START_DIR]/clang_linux/bin\", \"-DDUMMY_clang_linux_version=42\", \"-O1\"] extra_ldflags=[\"-B[START_DIR]/clang_linux/bin\", \"-fuse-ld=lld\", \"-L[START_DIR]/clang_linux/lib\"] target_cpu=\"x86_64\" werror=true"
"--args=cc=\"[START_DIR]/clang_linux/bin/clang\" cxx=\"[START_DIR]/cache/work/skia/tools/clang-tidy.sh\" extra_cflags=[\"-B[START_DIR]/clang_linux/bin\", \"-DDUMMY_clang_linux_version=42\", \"-O1\"] extra_ldflags=[\"-B[START_DIR]/clang_linux/bin\", \"-fuse-ld=lld\", \"-L[START_DIR]/clang_linux/lib\"] skia_enable_fontmgr_empty=true skia_enable_pdf=true skia_use_expat=true skia_use_freetype=true skia_use_vulkan=true target_cpu=\"x86_64\" werror=true"
],
"cwd": "[START_DIR]/cache/work/skia",
"env": {