Commit 125c6010 authored by Jim Harris's avatar Jim Harris Committed by Konrad Sztyber
Browse files

test: only specify lcov --no-external when collecting coverage



This eliminates some annoying warning messages.

Signed-off-by: default avatarJim Harris <jim.harris@samsung.com>
Change-Id: I5cdbecfad7d34c8d36f88925b3e6400d93b38089
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/24840


Community-CI: Mellanox Build Bot
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@nvidia.com>
parent 7c65373e
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -69,7 +69,7 @@ if [[ $CONFIG_COVERAGE == y ]]; then
	# Print lcov version to log
	$LCOV --version
	# zero out coverage data
	$LCOV -q -c -i -t "Baseline" -d $src -o $out/cov_base.info
	$LCOV -q -c --no-external -i -t "Baseline" -d $src -o $out/cov_base.info
fi

# Make sure the disks are clean (no leftover partition tables)
@@ -390,10 +390,13 @@ chmod a+r $output_dir/timing.txt

if [[ $CONFIG_COVERAGE == y ]]; then
	# generate coverage data and combine with baseline
	$LCOV -q -c -d $src -t "$(hostname)" -o $out/cov_test.info
	$LCOV -q -c --no-external -d $src -t "$(hostname)" -o $out/cov_test.info
	$LCOV -q -a $out/cov_base.info -a $out/cov_test.info -o $out/cov_total.info
	$LCOV -q -r $out/cov_total.info '*/dpdk/*' -o $out/cov_total.info
	$LCOV -q -r $out/cov_total.info '/usr/*' -o $out/cov_total.info
	# C++ headers in /usr can sometimes generate data even when specifying
	# --no-external, so remove them. But we need to add an ignore-errors
	# flag to squash warnings on systems where they don't generate data.
	$LCOV -q -r $out/cov_total.info --ignore-errors unused,unused '/usr/*' -o $out/cov_total.info
	$LCOV -q -r $out/cov_total.info '*/examples/vmd/*' -o $out/cov_total.info
	$LCOV -q -r $out/cov_total.info '*/app/spdk_lspci/*' -o $out/cov_total.info
	$LCOV -q -r $out/cov_total.info '*/app/spdk_top/*' -o $out/cov_total.info
+1 −1
Original line number Diff line number Diff line
@@ -1691,5 +1691,5 @@ if [[ $CONFIG_COVERAGE == y ]]; then
		--rc geninfo_all_blocks=1
		$lcov_opt
		"
	export LCOV="lcov $LCOV_OPTS --no-external"
	export LCOV="lcov $LCOV_OPTS"
fi
+2 −2
Original line number Diff line number Diff line
@@ -181,7 +181,7 @@ if [[ $CONFIG_COVERAGE == y ]]; then
	UT_COVERAGE=$output_dir/ut_coverage
	mkdir -p "$UT_COVERAGE"
	# zero out coverage data
	$LCOV -q -c -i -d . -t "Baseline" -o $UT_COVERAGE/ut_cov_base.info
	$LCOV -q -c --no-external -i -d . -t "Baseline" -o $UT_COVERAGE/ut_cov_base.info
fi

# workaround for valgrind v3.13 on arm64
@@ -270,7 +270,7 @@ run_test "unittest_init" unittest_init
run_test "unittest_keyring" $valgrind "$testdir/lib/keyring/keyring.c/keyring_ut"

if [[ $CONFIG_COVERAGE == y ]]; then
	$LCOV -q -d . -c -t "$(hostname)" -o $UT_COVERAGE/ut_cov_test.info
	$LCOV -q -d . -c --no-external -t "$(hostname)" -o $UT_COVERAGE/ut_cov_test.info
	$LCOV -q -a $UT_COVERAGE/ut_cov_base.info -a $UT_COVERAGE/ut_cov_test.info -o $UT_COVERAGE/ut_cov_total.info
	$LCOV -q -a $UT_COVERAGE/ut_cov_total.info -o $UT_COVERAGE/ut_cov_unit.info
	$LCOV -q -r $UT_COVERAGE/ut_cov_unit.info "$rootdir/app/*" -o $UT_COVERAGE/ut_cov_unit.info