• Home
  • Raw
  • Download

Lines Matching +full:report +full:- +full:coverage

1 # Code Coverage Support for PDFium
5 This guide explains how to generate code coverage information for the PDFium
13 The tools used for code coverage are known to work on Ubuntu and Debian. They
17 Previously, the code coverage scripts required specific versions of `lcov` and
18 `llvm-cov` to be present. This is no longer true, so if you have no other need
22 ## Generating Code Coverage
29 Before generating code coverage information, you will need to have a build
30 directory with coverage enabled. This can be done by running the `gn args`
33 If not using the default directory, `out/Coverage`, then replace it with the
37 gn args out/Coverage
40 If you already have a build directory, you can append the coverage flag to the
42 `out/Coverage`, then replace it with the correct location in the following
46 echo "use_clang_coverage = true" >> out/Coverage/args.gn
49 Previous versions of code coverage used **use_coverage = true** in args.gn; this
54 Generating code coverage information is done via the
55 `testing/tools/coverage/coverage_report.py` script. This script will download
56 the Clang coverage tools if needed, build any binaries that it needs, perform
57 test runs, collect coverage data, and generate a HTML coverage report. It is
58 based on the Chromium coverage scripts, so will generate the same style of
59 report.
63 `./out/Coverage/` and that HTML should be outputted to `./coverage_report/`.
66 testing/tools/coverage/coverage_report.py
70 you will need to pass in `--source-directory` with the appropriate directory. If
71 you are using a different build directory, then `--build-directory` will need to
72 be passed in. Finally, if you want the HTML report in a different location then
73 you will need to pass in `--output-directory`.
78 testing/tools/coverage/coverage_report.py \
79 --source-directory ~/pdfium/pdfium \
80 --build-directory ~/pdfium/pdfium/out/Debug_with_Coverage \
81 --output-directory ~/Documents/PDFium_coverage
86 tests can be found by running the script with `--help`.
91 testing/tools/coverage/coverage_report.py pdfium_unittests pdfium_embeddertests
96 the tests to be included in the report in a single invocation. Alternatively,
98 invoke `tools/code_coverage/coverage.py` to generate a combined report.
100 There are additional developer debugging flags available, `--dry-run` and
101 `--verbose`. `--dry-run` will output a trace of commands that would have been
102 run, but doesn't actually execute them. `--verbose` turns on outputting
108 containing the coverage report.
117 For help with using the code coverage tools please contact the PDFium
121 Please file bugs against the code coverage