3 The Linux gcov and lcov tools are fussy about gcc / g++ compiler
4 versions. As of this writing, Ubuntu 18.04 gcov / lcov work with
5 these toolchain versions:
8 gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
10 g++ (Ubuntu 8.3.0-6ubuntu1~18.04.1) 8.3.0
13 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
16 You'll need to install the following additional packages:
18 $ sudo apt-get install gcovr ggcov lcov
20 ## Compile an instrumented vpp image
26 $ ## interrupt compilation after building the image
29 $ cd <workspace-root>/build-root
30 $ make PLATFORM=vpp TAG=vpp_gcov vpp-install
32 ## Initialize the lcov database
35 $ ./extras/lcov/lcov_prep
36 $ make test-gcov or make TEST=my_test test-gcov
37 $ # repeat or vary as desired to increase reported coverage
38 $ # Generate the report:
39 $ ./extras/lcov/lcov_post
41 You can run vpp manually, do anything you like. Results are cumulative
42 until you re-run the "prep" script.
44 ## Look at the results
46 Point a browser at file:///<workspace-root>/build-root/html/index.html