diff options
author | Evan Benn <evanbenn@chromium.org> | 2022-11-07 14:50:35 +1100 |
---|---|---|
committer | Anastasia Klimchuk <aklm@chromium.org> | 2022-12-11 21:27:27 +0000 |
commit | 048aab6d66c45423386d0216fd7bf445fbd1dc7f (patch) | |
tree | 874616e6fe90975fdd041d6fd35cdbd1c846fad9 /Documentation/building.md | |
parent | 80408ceafc2a9a550bb5ef7aabd772dbf5d34487 (diff) | |
download | flashrom-048aab6d66c45423386d0216fd7bf445fbd1dc7f.tar.gz flashrom-048aab6d66c45423386d0216fd7bf445fbd1dc7f.tar.bz2 flashrom-048aab6d66c45423386d0216fd7bf445fbd1dc7f.zip |
tests: Add llvm-cov option and run target for code coverage
Code coverage can be requested with -Dllvm_cov and run with ninja
llvm-cov-tests or llvm-cov-cli.
BUG=b:187647884
BRANCH=None
TEST=meson test; ninja llvm-cov-tests
TEST=ran test_build.sh with coverage enabled
TEST=jenkins ran test_build.sh with coverage disabled
Change-Id: Id6c73bff46e7b88d425956a80def97082b201f56
Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/69268
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Diffstat (limited to 'Documentation/building.md')
-rw-r--r-- | Documentation/building.md | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Documentation/building.md b/Documentation/building.md index e25482e5..e5d9412b 100644 --- a/Documentation/building.md +++ b/Documentation/building.md @@ -63,12 +63,9 @@ ninja -C buildcov coverage #### llvm https://clang.llvm.org/docs/SourceBasedCodeCoverage.html ``` -env CFLAGS="-fprofile-instr-generate -fcoverage-mapping" CC=clang meson setup buildclangcov -env LLVM_PROFILE_FILE=default.profraw ninja -C buildclangcov test -cd buildclangcov -llvm-profdata merge -sparse default.profraw -o default.profdata -llvm-cov show ./flashrom_unit_tests -instr-profile=default.profdata --format=html --output-dir=. -open index.html +env CC=clang meson setup buildclangcov -Dllvm_cov=enabled +ninja -C buildclangcov test +ninja -C buildclangcov llvm-cov-tests ``` ## System specific information |