Replace coverage report command (#6476)
author오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Mon, 12 Aug 2019 09:13:09 +0000 (18:13 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Mon, 12 Aug 2019 09:13:09 +0000 (18:13 +0900)
- Replace nncc's coverage report command into infra/command
- Introduce build.configuration setting
  - Default workspace: build/

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
infra/command/gen-coverage-report [moved from infra/nncc/command/gen-coverage-report with 86% similarity]
infra/config/build.configuration [new file with mode: 0644]

similarity index 86%
rename from infra/nncc/command/gen-coverage-report
rename to infra/command/gen-coverage-report
index 67a9418..ce81c51 100644 (file)
@@ -2,7 +2,7 @@
 
 import "build.configuration"
 
-BUILD_WORKSPACE_PATH="${NNCC_PROJECT_PATH}/${BUILD_WORKSPACE_RPATH}"
+BUILD_WORKSPACE_PATH="${NNAS_PROJECT_PATH}/${BUILD_WORKSPACE_RPATH}"
 
 LCOV_PATH=$(command -v lcov)
 GENHTML_PATH=$(command -v genhtml)
@@ -17,8 +17,8 @@ if [[ -z "${GENHTML_PATH}" ]]; then
   exit 255
 fi
 
-OUTPUT_TAG="${NNCC_COVERAGE:-coverage}"
-OUTPUT_PATH="${NNCC_COVERAGE_PATH:-${NNCC_PROJECT_PATH}/${OUTPUT_TAG}}"
+OUTPUT_TAG="${NNAS_COVERAGE:-coverage}"
+OUTPUT_PATH="${NNAS_COVERAGE_PATH:-${NNAS_PROJECT_PATH}/${OUTPUT_TAG}}"
 
 if [[ -e "${OUTPUT_PATH}" ]]; then
   echo "ERROR: '${OUTPUT_PATH}' already exists"
@@ -38,7 +38,7 @@ CANDIDATES=()
 
 for CANDIDATE in "$@";
 do
-  CANDIDATES+=("${NNCC_PROJECT_PATH}/${CANDIDATE}/*")
+  CANDIDATES+=("${NNAS_PROJECT_PATH}/${CANDIDATE}/*")
 done
 
 # Capture initial zero coverage data
@@ -62,5 +62,5 @@ done
 
 # Gen html
 "${GENHTML_PATH}" "${EXCLUDED_COVERAGE_INFO_PATH}" \
-  --prefix "${NNCC_PROJECT_PATH}" \
+  --prefix "${NNAS_PROJECT_PATH}" \
   --output-directory "${HTML_PATH}"
diff --git a/infra/config/build.configuration b/infra/config/build.configuration
new file mode 100644 (file)
index 0000000..10e4187
--- /dev/null
@@ -0,0 +1 @@
+BUILD_WORKSPACE_RPATH=${NNAS_WORKSPACE:-build}