aboutsummaryrefslogtreecommitdiffhomepage
path: root/docs
diff options
context:
space:
mode:
authorGravatar Max Moroz <dor3s1@gmail.com>2018-06-18 14:19:48 -0700
committerGravatar GitHub <noreply@github.com>2018-06-18 14:19:48 -0700
commit9874e09f53596e2f5279bb0292b713882cfe8f1b (patch)
tree53b24e100ee1675144933cca3808261baaf2c327 /docs
parentd48b11f529e0b71b73e6ab2243fc4763bcdc011d (diff)
[infra] helper.py: support "profile" command for a single fuzz target with arbitrary corpus location. (#1535)
* [infra] helper.py: support "profile" command for a single fuzz target with arbitrary corpus location. * Address review feedback. * Update code_coverage.md page.
Diffstat (limited to 'docs')
-rw-r--r--docs/code_coverage.md18
1 files changed, 18 insertions, 0 deletions
diff --git a/docs/code_coverage.md b/docs/code_coverage.md
index 28564393..b37f03a7 100644
--- a/docs/code_coverage.md
+++ b/docs/code_coverage.md
@@ -40,6 +40,8 @@ and try again. Once `gsutil` works, you can run the report generation.
## Generating code coverage reports
+### Full project report
+
To generate code coverage report using the corpus aggregated on OSS-Fuzz, run:
```bash
@@ -54,6 +56,22 @@ each fuzz target, then run:
python infra/helper.py profile --no-corpus-download $project_name
```
+### Single fuzz target
+
+You can generate a code coverage report for a particular fuzz target with
+`--fuzz-target` argument:
+
+```bash
+python infra/helper.py profile --fuzz-target=<fuzz_target_name> $project_name
+```
+
+In this mode, you can specify an arbitrary corpus location for the fuzz target
+via `--corpus-dir` to be used instead of the corpus downloaded from OSS-Fuzz:
+
+```bash
+python infra/helper.py profile --fuzz-target=<fuzz_target_name> --corpus-dir=<my_local_corpus_dir> $project_name
+```
+
[Clang Source-based Code Coverage]: https://clang.llvm.org/docs/SourceBasedCodeCoverage.html
[gsutil tool]: https://cloud.google.com/storage/docs/gsutil_install