pushd $UTIL_HOME
pushd $SOURCE_ROOT
+VERSION=`cat packaging/npu-engine.spec | grep Version | awk '{print $2}'`
+COMMIT=`git rev-parse HEAD`
+
rm -rf build
# 1. build project
if [[ $1 == "gcovr" ]];
then
gcovr -r .. --html --html-details \
- --html-title "NPU SystemService Coverage" \
+ --html-title "npu-engine v${VERSION}-${COMMIT}" \
--filter ../src/ --exclude ".*\.h" \
--exclude ../src/core/npu/NPUdrvAPI_triv2.cc \
-o index.html
popd
lcov -t 'NPU-Engine Unit Test Coverage' -o unittest.info -c -d . -b build --no-external
lcov -r unittest.info "*/tests/*" "*/NPUdrvAPI_triv2.cc" -o unittest-filtered.info
- genhtml -o coverage_result unittest-filtered.info -t "npu-engine 2.3.8" -p $PWD
+ genhtml -o coverage_result unittest-filtered.info -t "npu-engine v${VERSION}-${COMMIT}" -p $PWD
fi
popd