From f565a9fb04147c3a02ed28819902a528d99e682f Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Mon, 19 Mar 2018 14:02:59 -0700 Subject: [PATCH] test/unittest.sh: use absolute paths for lcov This fixes some versions of lcov that treat relative paths incorrectly when processing the -r option. Change-Id: I15325abc79c39022380c9cc142a48afa0335012b Signed-off-by: Daniel Verkamp Reviewed-on: https://review.gerrithub.io/404419 Tested-by: SPDK Automated Test System Reviewed-by: Paul Luse Reviewed-by: Jim Harris --- test/unit/unittest.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/unit/unittest.sh b/test/unit/unittest.sh index ee9217a66d..945ca02298 100755 --- a/test/unit/unittest.sh +++ b/test/unit/unittest.sh @@ -7,7 +7,7 @@ set -xe testdir=$(readlink -f $(dirname $0)) -rootdir=$testdir/../.. +rootdir=$(readlink -f $(dirname $0)/../..) # if ASAN is enabled, use it. If not use valgrind if installed but allow # the env variable to override the default shown below. @@ -125,11 +125,11 @@ if [ "$cov_avail" = "yes" ]; 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 - $LCOV -q -r $UT_COVERAGE/ut_cov_unit.info 'app/*' -o $UT_COVERAGE/ut_cov_unit.info - $LCOV -q -r $UT_COVERAGE/ut_cov_unit.info 'examples/*' -o $UT_COVERAGE/ut_cov_unit.info - $LCOV -q -r $UT_COVERAGE/ut_cov_unit.info 'include/*' -o $UT_COVERAGE/ut_cov_unit.info - $LCOV -q -r $UT_COVERAGE/ut_cov_unit.info 'lib/vhost/rte_vhost/*' -o $UT_COVERAGE/ut_cov_unit.info - $LCOV -q -r $UT_COVERAGE/ut_cov_unit.info 'test/*' -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 + $LCOV -q -r $UT_COVERAGE/ut_cov_unit.info "$rootdir/examples/*" -o $UT_COVERAGE/ut_cov_unit.info + $LCOV -q -r $UT_COVERAGE/ut_cov_unit.info "$rootdir/include/*" -o $UT_COVERAGE/ut_cov_unit.info + $LCOV -q -r $UT_COVERAGE/ut_cov_unit.info "$rootdir/lib/vhost/rte_vhost/*" -o $UT_COVERAGE/ut_cov_unit.info + $LCOV -q -r $UT_COVERAGE/ut_cov_unit.info "$rootdir/test/*" -o $UT_COVERAGE/ut_cov_unit.info rm -f $UT_COVERAGE/ut_cov_base.info $UT_COVERAGE/ut_cov_test.info genhtml $UT_COVERAGE/ut_cov_unit.info --output-directory $UT_COVERAGE # git -C option not used for compatibility reasons