diff --git a/autotest.sh b/autotest.sh index f9c7f6086..f2d7a1224 100755 --- a/autotest.sh +++ b/autotest.sh @@ -66,8 +66,6 @@ freebsd_update_contigmem_mod # More information: https://github.com/spdk/spdk/issues/1693 CC_TYPE=$(grep CC_TYPE mk/cc.mk) if hash lcov && ! [[ "$CC_TYPE" == *"clang"* ]]; then - # setup output dir for unittest.sh - export UT_COVERAGE=$out/ut_coverage export LCOV_OPTS=" --rc lcov_branch_coverage=1 --rc lcov_function_coverage=1 diff --git a/test/unit/unittest.sh b/test/unit/unittest.sh index 1777325e5..95c3a8417 100755 --- a/test/unit/unittest.sh +++ b/test/unit/unittest.sh @@ -180,8 +180,10 @@ else fi if [ "$cov_avail" = "yes" ]; then # set unit test output dir if not specified in env var - if [ -z ${UT_COVERAGE+x} ]; then + if [[ -z $output_dir ]]; then UT_COVERAGE="ut_coverage" + else + UT_COVERAGE=$output_dir/ut_coverage fi mkdir -p $UT_COVERAGE export LCOV_OPTS="