autotest: Make UT coverage setup independent from autotest.sh

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: Idacba4abc5a33492e2de06522c446fd68230ea6b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15080
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
This commit is contained in:
Michal Berger 2022-11-18 10:35:01 +01:00 committed by Tomasz Zawadzki
parent 4eb8f5b4d1
commit fa030043df
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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="