diff options
author | Dave Wallace <dwallacelf@gmail.com> | 2023-06-21 23:14:38 -0400 |
---|---|---|
committer | Andrew Yourtchenko <ayourtch@gmail.com> | 2023-06-22 13:35:28 +0000 |
commit | 1c95e12b0dd2b4902a289328e8e54fde6eed0623 (patch) | |
tree | da7dd11cd7fc638f1189238bf2180aa6ce3f987a /extras | |
parent | fdf6fbe2e771d88beddb6ca8d8bbd39599beeb9c (diff) |
tests docs: fix lcov code coverage report generation
- Updated/rebased version of https://gerrit.fd.io/r/c/vpp/+/34199
Type: test
Change-Id: I43913ecfd11a4578bdb10c4be76253fe38d57976
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Diffstat (limited to 'extras')
-rw-r--r-- | extras/lcov/README.rst | 48 | ||||
-rwxr-xr-x | extras/lcov/lcov_post | 12 | ||||
-rwxr-xr-x | extras/lcov/lcov_prep | 7 |
3 files changed, 0 insertions, 67 deletions
diff --git a/extras/lcov/README.rst b/extras/lcov/README.rst deleted file mode 100644 index 3dab9510215..00000000000 --- a/extras/lcov/README.rst +++ /dev/null @@ -1,48 +0,0 @@ -.. _lcov_code_coverage: - -Code coverage with lcov -======================= - -Prerequisites -------------- - -The Linux gcov and lcov tools are fussy about gcc / g++ compiler -versions. As of this writing, Ubuntu 18.04 gcov / lcov work with these -toolchain versions: - -$ gcc –version gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0 $ g++ –version -g++ (Ubuntu 8.3.0-6ubuntu1~18.04.1) 8.3.0 - -Refer to -https://askubuntu.com/questions/26498/how-to-choose-the-default-gcc-and-g-version -for information on how to install multiple gcc / g++ versions, and -switch between them. - -You’ll need to install the following additional packages: - -$ sudo apt-get install gcovr ggcov lcov - -Compile an instrumented vpp image ---------------------------------- - -Two ways: - -$ cd $ make test-gcov $ ## interrupt compilation after building the -image - -or $ cd /build-root $ make PLATFORM=vpp TAG=vpp_gcov vpp-install - -Initialize the lcov database ----------------------------- - -$ cd $ ./extras/lcov/lcov_prep $ make test-gcov or make TEST=my_test -test-gcov $ # repeat or vary as desired to increase reported coverage $ -# Generate the report: $ ./extras/lcov/lcov_post - -You can run vpp manually, do anything you like. Results are cumulative -until you re-run the “prep” script. - -Look at the results -------------------- - -Point a browser at file:////build-root/html/index.html diff --git a/extras/lcov/lcov_post b/extras/lcov/lcov_post deleted file mode 100755 index 1aaf9865d24..00000000000 --- a/extras/lcov/lcov_post +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -set -e - -cd build-root -rm -rf html -mkdir html -lcov --no-checksum --directory . --capture --output-file out.info -lcov --remove out.info \ - "/usr/include/*" "*/build-root/*" "/opt/*" "/usr/lib/*" \ - -o filtered.info -genhtml filtered.info -o html diff --git a/extras/lcov/lcov_prep b/extras/lcov/lcov_prep deleted file mode 100755 index 1212d0470a2..00000000000 --- a/extras/lcov/lcov_prep +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -set -e - -cd build-root -rm -rf html -lcov --capture --initial --directory . --output-file lcov.out |