Thank you Dave. Regular gcov works now, but still facing some issues with lcov, will figure that out over time.
From: Dave Barach (dbarach) <dbar...@cisco.com> Sent: Monday, May 20, 2019 3:34 PM To: Sirshak Das <sirshak....@arm.com>; vpp-dev@lists.fd.io; Lijian Zhang (Arm Technology China) <lijian.zh...@arm.com>; Honnappa Nagarahalli <honnappa.nagaraha...@arm.com> Subject: RE: [vpp-dev] VPP Unit test framework questions The tests in src/vppinfra are lightly used - primarily by me - but yes, we do use them from time to time. test-gcov has worked as expected - at least on x86_64 - since we merged https://gerrit.fd.io/r/#/c/19379/. Running gcov manually is possible, but frankly it's not recommended. If you insist: * Either "make test-gcov" or run a "PLATFORM=vpp TAG=vpp_gcov" image. * For each file which managed to execute code, you should find a ".gcda" file. * To manufacture a .gcov file, "gcov xxx.gcda". * Look at the [set of] foo.c.gcov files in your favorite text editor. You'd be much better off running "lcov," which produces nice html reports and [importantly] understands multi-architecture executables. See attached scripts. $ cd <workspace-root> $ lcov_prep $ make test-gcov $ lcov_post Nice html output in build-root/html, point a browser at build-root/html/index.html HTH... Dave -----Original Message----- From: vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io> <vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>> On Behalf Of Sirshak Das Sent: Monday, May 20, 2019 4:12 PM To: vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>; Lijian Zhang (Arm Technology China) <lijian.zh...@arm.com<mailto:lijian.zh...@arm.com>>; Honnappa Nagarahalli <honnappa.nagaraha...@arm.com<mailto:honnappa.nagaraha...@arm.com>> Subject: [vpp-dev] VPP Unit test framework questions Hi all, I had a few naive questions related to unit test framework of VPP. 1. I see these files in test_xxx (e.g. test_mheap, test_fifo). Are these test programs still maintained ? If so, how are they invoked/run ? If I am correct Functional tests invoked from "make test" invoke the Python Functional test framework in (test/*) which seems more Traffic based Functional tests rather than unit tests. 2. What is the status on test-gcov ? As in is it still maintained. I tried running make test-gcov with subset of test to see the code coverage of the tests but failed to find any .gcov file getting generated. Do I have to do anything else ? Thank you Sirshak Das
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#13109): https://lists.fd.io/g/vpp-dev/message/13109 Mute This Topic: https://lists.fd.io/mt/31689617/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-