Quote pattern on lcov (#1217)
author이춘석/동작제어Lab(SR)/Senior Engineer/삼성전자 <chunseok.lee@samsung.com>
Wed, 16 May 2018 00:29:25 +0000 (09:29 +0900)
committerChunseok Lee <chunseok.lee@samsung.com>
Fri, 18 May 2018 06:52:51 +0000 (15:52 +0900)
* [cherry-pick] Quote pattern on lcov

To fix daily-arm-coverage, quote patterns during lcov

Signed-off-by: Chunseok Lee <chunseok.lee@samsung.com>
* NNFW_ROOT to HOST_HOME

change NNFW_ROOT to HOST_HOME

Change-Id: I3b7294a6b0f2faa1c7bb9405183b345647099aa0
Signed-off-by: Chunseok Lee <chunseok.lee@samsung.com>
scripts/command/gen_coverage_report.sh

index a7e4d96..cff7594 100755 (executable)
@@ -3,7 +3,7 @@
 # This file is based on https://github.sec.samsung.net/STAR/nncc/pull/80
 
 SCRIPT_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-NNFW_ROOT=$SCRIPT_ROOT/../..
+HOST_HOME=$SCRIPT_ROOT/../..
 
 LCOV_PATH=$(command -v lcov)
 GENHTML_PATH=$(command -v genhtml)
@@ -24,7 +24,7 @@ fi
 OUTPUT_PATH="$1"
 
 if [[ -z "${OUTPUT_PATH}" ]]; then
-  OUTPUT_PATH="$NNFW_ROOT/coverage"
+  OUTPUT_PATH="$HOST_HOME/coverage"
 fi
 
 if [[ -e "${OUTPUT_PATH}" ]]; then
@@ -43,16 +43,16 @@ FINAL_COVERAGE_INFO_PATH="${OUTPUT_PATH}/coverage.info"
 HTML_PATH="${OUTPUT_PATH}/html"
 COVERTURA_PATH="${OUTPUT_PATH}/nnfw_coverage.xml"
 
-"${LCOV_PATH}" -c -d "${NNFW_ROOT}" -o "${RAW_COVERAGE_INFO_PATH}"
-"${LCOV_PATH}" -e "${RAW_COVERAGE_INFO_PATH}" -o "${LIBS_COVERAGE_INFO_PATH}" ${SRC_PREFIX}/libs/*
-"${LCOV_PATH}" -e "${RAW_COVERAGE_INFO_PATH}" -o "${INCLUDE_COVERAGE_INFO_PATH}" ${SRC_PREFIX}/include/*
-"${LCOV_PATH}" -e "${RAW_COVERAGE_INFO_PATH}" -o "${RUNTIMES_COVERAGE_INFO_PATH}" ${SRC_PREFIX}/runtimes/*
-"${LCOV_PATH}" -e "${RAW_COVERAGE_INFO_PATH}" -o "${TOOLS_COVERAGE_INFO_PATH}" ${SRC_PREFIX}/tools/*
+"${LCOV_PATH}" -c -d "${HOST_HOME}" -o "${RAW_COVERAGE_INFO_PATH}"
+"${LCOV_PATH}" -e "${RAW_COVERAGE_INFO_PATH}" -o "${LIBS_COVERAGE_INFO_PATH}" "${SRC_PREFIX}/libs/*"
+"${LCOV_PATH}" -e "${RAW_COVERAGE_INFO_PATH}" -o "${INCLUDE_COVERAGE_INFO_PATH}" "${SRC_PREFIX}/include/*"
+"${LCOV_PATH}" -e "${RAW_COVERAGE_INFO_PATH}" -o "${RUNTIMES_COVERAGE_INFO_PATH}" "${SRC_PREFIX}/runtimes/*"
+"${LCOV_PATH}" -e "${RAW_COVERAGE_INFO_PATH}" -o "${TOOLS_COVERAGE_INFO_PATH}" "${SRC_PREFIX}/tools/*"
 "${LCOV_PATH}" -a "${LIBS_COVERAGE_INFO_PATH}" -a "${INCLUDE_COVERAGE_INFO_PATH}" \
                -a "${RUNTIMES_COVERAGE_INFO_PATH}" -a "${TOOLS_COVERAGE_INFO_PATH}" \
                -o "${FINAL_COVERAGE_INFO_PATH}"
-"${LCOV_PATH}" -r "${FINAL_COVERAGE_INFO_PATH}" -o "${FINAL_COVERAGE_INFO_PATH}" ${SRC_PREFIX}/runtimes/tests/*
-"${LCOV_PATH}" -r "${FINAL_COVERAGE_INFO_PATH}" -o "${FINAL_COVERAGE_INFO_PATH}" ${SRC_PREFIX}/runtimes/nn/depend/*
+"${LCOV_PATH}" -r "${FINAL_COVERAGE_INFO_PATH}" -o "${FINAL_COVERAGE_INFO_PATH}" "${SRC_PREFIX}/runtimes/tests/*"
+"${LCOV_PATH}" -r "${FINAL_COVERAGE_INFO_PATH}" -o "${FINAL_COVERAGE_INFO_PATH}" "${SRC_PREFIX}/runtimes/nn/depend/*"
 "${GENHTML_PATH}" "${FINAL_COVERAGE_INFO_PATH}" --output-directory "${HTML_PATH}" ${GENHTML_FLAG:-}
 
 tar -zcf "${OUTPUT_PATH}"/coverage_report.tar.gz "${HTML_PATH}"