diff --git a/autotest.sh b/autotest.sh index e7d54d0fa..3c911a7bd 100755 --- a/autotest.sh +++ b/autotest.sh @@ -324,7 +324,11 @@ trap - SIGINT SIGTERM EXIT # catch any stray core files process_core -if hash lcov; then +# lcov takes considerable time to process clang coverage. +# Disabling lcov allow us to do this. +# More information: https://github.com/spdk/spdk/issues/1693 +CC_TYPE=$(grep CC_TYPE mk/cc.mk) +if hash lcov && ! [[ "$CC_TYPE" == *"clang"* ]]; then # generate coverage data and combine with baseline $LCOV -q -c -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 diff --git a/test/unit/unittest.sh b/test/unit/unittest.sh index f55290edd..c2264bb97 100755 --- a/test/unit/unittest.sh +++ b/test/unit/unittest.sh @@ -221,7 +221,11 @@ if grep -q '#define SPDK_CONFIG_VHOST 1' $rootdir/include/spdk/config.h; then fi # local unit test coverage -if [ "$cov_avail" = "yes" ]; then +# lcov takes considerable time to process clang coverage. +# Disabling lcov allow us to do this. +# More information: https://github.com/spdk/spdk/issues/1693 +CC_TYPE=$(grep CC_TYPE mk/cc.mk) +if [ "$cov_avail" = "yes" ] && ! [[ "$CC_TYPE" == *"clang"* ]]; then $LCOV -q -d . -c -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