From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp50.i.mail.ru (smtp50.i.mail.ru [94.100.177.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id D1E9C4696C3 for ; Tue, 14 Apr 2020 12:55:10 +0300 (MSK) Date: Tue, 14 Apr 2020 12:55:08 +0300 From: Sergey Bronnikov Message-ID: <21f37877a919d3cea6ad93965d4ce4fe6b4d3102.1586857868.git.sergeyb@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Subject: [Tarantool-patches] [PATCH v1] Enable branch coverage in lcov List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tarantool-patches@dev.tarantool.org Cc: o.piskunov@tarantool.org By default lcov collects line coverage only. It would be useful to collect function and branch coverage too. Closes #4888 --- GH branch: https://github.com/tarantool/tarantool/tree/ligurio/gh-4888-branch-coverage GH issue: https://github.com/tarantool/tarantool/issues/4891 Example on Coveralls (column "Run details"): https://coveralls.io/builds/30058630 .travis.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.mk b/.travis.mk index f709a18b6..a92efbcd6 100644 --- a/.travis.mk +++ b/.travis.mk @@ -96,9 +96,10 @@ build_coverage_debian: test_coverage_debian_no_deps: build_coverage_debian # Enable --long tests for coverage cd test && /usr/bin/python test-run.py --force $(TEST_RUN_EXTRA_PARAMS) --long - lcov --compat-libtool --directory src/ --capture --output-file coverage.info.tmp + lcov --compat-libtool --directory src/ --capture --output-file coverage.info.tmp \ + --rc lcov_branch_coverage=1 --rc lcov_function_coverage=1 lcov --compat-libtool --remove coverage.info.tmp 'tests/*' 'third_party/*' '/usr/*' \ - --output-file coverage.info + --rc lcov_branch_coverage=1 --rc lcov_function_coverage=1 --output-file coverage.info lcov --list coverage.info @if [ -n "$(COVERALLS_TOKEN)" ]; then \ echo "Exporting code coverage information to coveralls.io"; \ -- 2.23.0 -- sergeyb@