mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +00:00
gcov: mount criu sources into a test mount tree
CRIU processes save *.gcda and *.gcno files near source files, so when we restore tests into another mount namespace, we need to have access to sources from this namespace. Cc: Sergey Bronnikov <sergeyb@openvz.org> Reported-by: Sergey Bronnikov <sergeyb@openvz.org> Signed-off-by: Andrew Vagin <avagin@virtuozzo.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
parent
aa40501d95
commit
615465498f
3 changed files with 27 additions and 7 deletions
7
Makefile
7
Makefile
|
|
@ -202,13 +202,8 @@ PHONY += cscope
|
|||
gcov:
|
||||
$(E) " GCOV"
|
||||
$(Q) test -d gcov || mkdir gcov && \
|
||||
cp criu/*.{gcno,c,h} test/`pwd`/criu/ && \
|
||||
geninfo --output-filename gcov/crtools.h.info --no-recursion criu/ && \
|
||||
geninfo --output-filename gcov/crtools.ns.info --no-recursion test/`pwd`/criu/ && \
|
||||
sed -i "s#/test`pwd`##" gcov/crtools.ns.info && \
|
||||
geninfo --output-filename gcov/criu.info --no-recursion criu/ && \
|
||||
cd gcov && \
|
||||
lcov --rc lcov_branch_coverage=1 --add-tracefile crtools.h.info \
|
||||
--add-tracefile crtools.ns.info --output-file criu.info && \
|
||||
genhtml --rc lcov_branch_coverage=1 --output-directory html criu.info
|
||||
@echo "Code coverage report is in `pwd`/gcov/html/ directory."
|
||||
PHONY += gcov
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue