Update variable name in scripts to keep consistency (#1181)
author최형규/동작제어Lab(SR)/Senior Engineer/삼성전자 <hk0110.choi@samsung.com>
Mon, 14 May 2018 00:03:53 +0000 (09:03 +0900)
committer서상민/동작제어Lab(SR)/Senior Engineer/삼성전자 <sangmin7.seo@samsung.com>
Mon, 14 May 2018 00:03:53 +0000 (09:03 +0900)
- Update variable name in scripts to keep consistency

Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
scripts/command/docker_gbs_build.sh
scripts/command/docker_run_test.sh
scripts/command/gen_coverage_report.sh
scripts/command/tizen_xu4_test.sh

index 2ea989d..6fcc2f1 100755 (executable)
@@ -5,13 +5,13 @@ SCRIPT_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 # DOCKER_HOME and DOCKER_ENV_VARS
 source $SCRIPT_ROOT/nnfw_docker_tizen
 
-NNFW_ROOT=$SCRIPT_ROOT/../..
+HOST_HOME=$SCRIPT_ROOT/../..
 DOCKER_NNFW_HOME=${DOCKER_HOME}
 DOCKER_RPM_HOME=/home/rpm
 
 if [ "${GBS_RPM_DIR}" == "" ];
 then
-    GBS_RPM_DIR=$NNFW_ROOT/Product/out/rpm
+    GBS_RPM_DIR=$HOST_HOME/Product/out/rpm
     mkdir -p ${GBS_RPM_DIR}
 fi
 
@@ -22,7 +22,7 @@ then
 fi
 
 
-DOCKER_VOLUMES+=" -v ${GBS_RPM_DIR}:${DOCKER_RPM_HOME} -v $NNFW_ROOT:${DOCKER_NNFW_HOME}"
+DOCKER_VOLUMES+=" -v ${GBS_RPM_DIR}:${DOCKER_RPM_HOME} -v $HOST_HOME:${DOCKER_NNFW_HOME}"
 DOCKER_RUN_OPTS+=" --rm"
 DOCKER_RUN_OPTS+=" -w ${DOCKER_NNFW_HOME}"
 
@@ -32,8 +32,8 @@ docker run $DOCKER_RUN_OPTS $DOCKER_VOLUMES ${DOCKER_ENV_VARS:-} ${DOCKER_IMAGE}
 BUILD_RESULT=$?
 
 # change owner of root dir and delete rootfs dir
-NNFW_OWNER_UID=$(stat -c "%u" $NNFW_ROOT)
-NNFW_OWNER_GID=$(stat -c "%g" $NNFW_ROOT)
+NNFW_OWNER_UID=$(stat -c "%u" $HOST_HOME)
+NNFW_OWNER_GID=$(stat -c "%g" $HOST_HOME)
 
 CMD="chown -R $NNFW_OWNER_UID:$NNFW_OWNER_GID ${DOCKER_NNFW_HOME} && chown -R $NNFW_OWNER_UID:$NNFW_OWNER_GID ${DOCKER_RPM_HOME}"
 docker run $DOCKER_RUN_OPTS $DOCKER_ENV_VARS $DOCKER_VOLUMES $DOCKER_IMAGE sh -c "$CMD"
index 4584476..899820c 100755 (executable)
@@ -5,10 +5,10 @@ SCRIPT_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 # DOCKER_HOME and DOCKER_ENV_VARS
 source $SCRIPT_ROOT/nnfw_docker
 
-HOST_PATH=$SCRIPT_ROOT/../..
+HOST_HOME=$SCRIPT_ROOT/../..
 
 DOCKER_VOLUMES=" -v /dev/null:/dev/raw1394"
-DOCKER_VOLUMES+=" -v $HOST_PATH:$DOCKER_HOME"
+DOCKER_VOLUMES+=" -v $HOST_HOME:$DOCKER_HOME"
 
 DOCKER_RUN_OPTS="--rm"
 DOCKER_RUN_OPTS+=" -w $DOCKER_HOME"
@@ -29,8 +29,8 @@ BUILD_RESULT=$?
 # can't remove built files due to lack of permission.
 # To address this issue, let's change owner of all files
 # in NPU_Compiler to owner of NPU_Compiler.
-NNFW_OWNER_UID=$(stat -c "%u" $HOST_PATH)
-NNFW_OWNER_GID=$(stat -c "%g" $HOST_PATH)
+NNFW_OWNER_UID=$(stat -c "%u" $HOST_HOME)
+NNFW_OWNER_GID=$(stat -c "%g" $HOST_HOME)
 
 CMD="chown -R $NNFW_OWNER_UID:$NNFW_OWNER_GID $DOCKER_HOME"
 docker run $DOCKER_RUN_OPTS $DOCKER_ENV_VARS $DOCKER_VOLUMES $DOCKER_IMAGE_NAME $CMD
index a7e4d96..902e24e 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,7 +43,7 @@ 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}" -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/*
index a150071..d56dae2 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 SCRIPT_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-NNFW_ROOT=$SCRIPT_ROOT/../..
+HOST_HOME=$SCRIPT_ROOT/../..
 if [ -z "$TEST_ROOT" ]; then
     TEST_ROOT=/opt/usr/nnfw-test
 fi
@@ -33,7 +33,7 @@ function prepare_rpm_test()
     done
 
     # download tflite model files
-    pushd $NNFW_ROOT
+    pushd $HOST_HOME
     tests/framework/run_test.sh --download=on
     tar -zcf cache.tar.gz tests/framework/cache
     $SDB_CMD push cache.tar.gz $TEST_ROOT/.
@@ -53,7 +53,7 @@ function prepare_suite_test()
     $SDB_CMD shell tar -zxf $TEST_ROOT/$(basename $TEST_SUITE_PATH) -C $TEST_ROOT
 
     # download tflite model files
-    pushd $NNFW_ROOT
+    pushd $HOST_HOME
     tests/framework/run_test.sh --download=on
     tar -zcf cache.tar.gz tests/framework/cache
     $SDB_CMD push cache.tar.gz $TEST_ROOT/.