[libvirt] How to get GCOV result of make check?

Zhangbo (Oscar) oscar.zhangbo at huawei.com
Fri Apr 8 08:10:56 UTC 2016


Hi all:
    I want to get the coverage result of 'make check', here is my way:
    1.  ./configure *****
    2.  make clean -j
    *3*.  find ./ -name Makefile |xargs sed -i "s/\= gcc/= gcc -fprofile-arcs -ftest-coverage/g"      # add gcov-related cflags
    4.  make check -j
    5.  lcov -d . -c -o libvirt.info
    6.  genhtml libvirt.info -o libvirtresult

    My key work Is step 3, however, I don't think it's a graceful way to get gcov result. 
    How do you usually get the gcov results, thanks!

Oscar.




More information about the libvir-list mailing list