Lines Matching +full:clang +full:- +full:tools +full:- +full:extra
1 ---
6 permalink: /advanced-topics/code-coverage/
7 ---
12 For projects written in C/C++, Rust, Go, Swift or Java and other JVM-based languages,
13 you can generate code coverage reports using Clang source-based code coverage.
15 For more details on C/C++ coverage, see [Clang's documentation].
19 - TOC
21 ---
25 Docker images get regularly updated with a newer version of build tools, build
40 $ python infra/helper.py build_fuzzers --sanitizer=coverage $PROJECT_NAME
47 aggregated by OSS-Fuzz. Set up `gsutil` and ensure that you have access to the
54 $ gsutil ls gs://${PROJECT_NAME}-corpus.clusterfuzz-external.appspot.com/
70 OSS-Fuzz, run this command:
82 $ python infra/helper.py coverage --no-corpus-download $PROJECT_NAME
88 the `--fuzz-target` argument:
91 $ python infra/helper.py coverage --fuzz-target=<fuzz_target_name> $PROJECT_NAME
95 (instead of the corpus downloaded from OSS-Fuzz) by using `--corpus-dir`:
98 $ python infra/helper.py coverage --fuzz-target=<fuzz_target_name> \
99 --corpus-dir=<my_local_corpus_dir> $PROJECT_NAME
102 ### Additional arguments for `llvm-cov` (C/C++ only)
104 You may want to use some of the options provided by the [llvm-cov tool], like
105 `-ignore-filename-regex=`. You can pass these to the helper script after `--`:
108 $ python infra/helper.py coverage $PROJECT_NAME -- \
109 -ignore-filename-regex=.*code/to/be/ignored/.* <other_extra_args>
113 report, list their paths at the end of the extra arguments sequence:
116 $ python infra/helper.py coverage zlib -- \
120 If you want OSS-Fuzz to use extra arguments when generating code coverage
125 coverage_extra_args: -ignore-filename-regex=.*crc.* -ignore-filename-regex=.*adler.* <other_extra_a…
128 [Clang's documentation]: https://clang.llvm.org/docs/SourceBasedCodeCoverage.html
130 [llvm-cov tool]: https://llvm.org/docs/CommandGuide/llvm-cov.html