mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
Avoid recursive make for code coverage.
(This used to be commit 2d1ca8cb7a
)
This commit is contained in:
parent
bbb826bdac
commit
ab07a60d6e
@ -313,28 +313,31 @@ locktest_OBJ_FILES = torture/locktest.o
|
||||
|
||||
MANPAGES += torture/man/locktest.1
|
||||
|
||||
ifeq ($(MAKECMDGOALS),gcov)
|
||||
GCOV?=1
|
||||
endif
|
||||
|
||||
ifeq ($(MAKECMDGOALS),lcov)
|
||||
GCOV?=1
|
||||
endif
|
||||
|
||||
ifeq ($(MAKECMDGOALS),testcov-html)
|
||||
GCOV?=1
|
||||
endif
|
||||
|
||||
ifdef GCOV
|
||||
CFLAGS += --coverage
|
||||
LDFLAGS += --coverage
|
||||
endif
|
||||
|
||||
COV_TARGET = test
|
||||
|
||||
COV_VARS = \
|
||||
CFLAGS="$(CFLAGS) --coverage" \
|
||||
LDFLAGS="$(LDFLAGS) --coverage"
|
||||
|
||||
test_cov:
|
||||
-$(MAKE) $(COV_TARGET) $(COV_VARS)
|
||||
|
||||
gcov: test_cov
|
||||
gcov: test
|
||||
for I in $(sort $(dir $(ALL_OBJS))); \
|
||||
do $(GCOV) -p -o $$I $$I/*.c; \
|
||||
done
|
||||
|
||||
lcov-split:
|
||||
rm -f samba.info
|
||||
@$(MAKE) $(COV_TARGET) $(COV_VARS) \
|
||||
TEST_OPTIONS="--analyse-cmd=\"lcov --base-directory `pwd` --directory . --capture --output-file samba.info -t\""
|
||||
-rm heimdal/lib/*/{lex,parse}.{gcda,gcno}
|
||||
genhtml -o coverage samba.info
|
||||
|
||||
lcov: test_cov
|
||||
lcov: test
|
||||
-rm heimdal/lib/*/{lex,parse}.{gcda,gcno}
|
||||
lcov --base-directory `pwd` --directory . --capture --output-file samba.info
|
||||
genhtml -o coverage samba.info
|
||||
|
Loading…
Reference in New Issue
Block a user