Update variable setting in scripts (#4603)
author오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Thu, 7 Mar 2019 01:10:19 +0000 (10:10 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Thu, 7 Mar 2019 01:10:19 +0000 (10:10 +0900)
- Remove export in scripts/standalone

We can remove them because we call other script using source

- Remove setting BENCHMARK_ACL_BUILD

- Use make command more lines

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
scripts/standalone/docker_build_cross_arm.sh
scripts/standalone/docker_build_cross_arm_release.sh
scripts/standalone/docker_build_test_x64.sh
scripts/standalone/docker_build_tizen_cross.sh
scripts/standalone/docker_build_tizen_gbs.sh
scripts/standalone/test_arm.sh

index dfa2ed9..9f0b505 100755 (executable)
@@ -17,33 +17,27 @@ fi
 
 DOCKER_VOLUMES=" -v $ROOTFS_DIR:/opt/rootfs"
 DOCKER_VOLUMES+=" -v $EXT_ACL_FOLDER:/opt/acl"
-export DOCKER_VOLUMES
 
 # docker image name
 if [[ -z $DOCKER_IMAGE_NAME ]]; then
   echo "It will use default docker image name"
-else
-  export DOCKER_IMAGE_NAME
 fi
 
 DOCKER_ENV_VARS=" -e TARGET_ARCH=armv7l"
 DOCKER_ENV_VARS+=" -e CROSS_BUILD=1"
 DOCKER_ENV_VARS+=" -e ROOTFS_DIR=/opt/rootfs"
 DOCKER_ENV_VARS+=" -e EXT_ACL_FOLDER=/opt/acl"
-DOCKER_ENV_VARS+=" -e BENCHMARK_ACL_BUILD=1"
-
 # Mirror server setting
 if [[ -z $EXTERNAL_DOWNLOAD_SERVER ]]; then
   echo "It will not use mirror server"
-else
-  DOCKER_ENV_VARS+=" -e EXTERNAL_DOWNLOAD_SERVER=$EXTERNAL_DOWNLOAD_SERVER"
 fi
-export DOCKER_ENV_VARS
 
 pushd $ROOT_PATH > /dev/null
 
 # TODO use command instead of makefile
-CMD="make && make install && make build_test_suite"
+CMD="make && \
+     make install && \
+     make build_test_suite"
 source nnfw docker-run-user bash -c "${CMD}"
 
 popd > /dev/null
index 94d1272..0bb5260 100755 (executable)
@@ -17,34 +17,29 @@ fi
 
 DOCKER_VOLUMES=" -v $ROOTFS_DIR:/opt/rootfs"
 DOCKER_VOLUMES+=" -v $EXT_ACL_FOLDER:/opt/acl"
-export DOCKER_VOLUMES
 
 # docker image name
 if [[ -z $DOCKER_IMAGE_NAME ]]; then
   echo "It will use default docker image name"
-else
-  export DOCKER_IMAGE_NAME
 fi
 
 DOCKER_ENV_VARS=" -e TARGET_ARCH=armv7l"
 DOCKER_ENV_VARS+=" -e CROSS_BUILD=1"
 DOCKER_ENV_VARS+=" -e ROOTFS_DIR=/opt/rootfs"
 DOCKER_ENV_VARS+=" -e EXT_ACL_FOLDER=/opt/acl"
-DOCKER_ENV_VARS+=" -e BENCHMARK_ACL_BUILD=1"
 DOCKER_ENV_VARS+=" -e BUILD_TYPE=release"
 
 # Mirror server setting
 if [[ -z $EXTERNAL_DOWNLOAD_SERVER ]]; then
   echo "It will not use mirror server"
-else
-  DOCKER_ENV_VARS+=" -e EXTERNAL_DOWNLOAD_SERVER=$EXTERNAL_DOWNLOAD_SERVER"
 fi
-export DOCKER_ENV_VARS
 
 pushd $ROOT_PATH > /dev/null
 
 # TODO use command instead of makefile
-CMD="make && make install && make build_test_suite"
+CMD="make && \
+     make install && \
+     make build_test_suite"
 source nnfw docker-run-user bash -c "${CMD}"
 
 popd > /dev/null
index 0848452..e76c358 100755 (executable)
@@ -6,17 +6,12 @@ ROOT_PATH="$CURRENT_PATH/../../"
 # docker image name
 if [[ -z $DOCKER_IMAGE_NAME ]]; then
   echo "It will use default docker image name"
-else
-  export DOCKER_IMAGE_NAME
 fi
 
 # Mirror server setting
 if [[ -z $EXTERNAL_DOWNLOAD_SERVER ]]; then
   echo "It will not use mirror server"
-else
-  DOCKER_ENV_VARS=" -e EXTERNAL_DOWNLOAD_SERVER=$EXTERNAL_DOWNLOAD_SERVER"
 fi
-export DOCKER_ENV_VARS
 
 pushd $ROOT_PATH > /dev/null
 
index 8f79ecf..6c5585a 100755 (executable)
@@ -10,13 +10,10 @@ if [[ ! -d $ROOTFS_DIR ]]; then
 fi
 
 DOCKER_VOLUMES=" -v $ROOTFS_DIR/:/opt/rootfs"
-export DOCKER_VOLUMES
 
 # docker image name
 if [[ -z $DOCKER_IMAGE_NAME ]]; then
   echo "It will use default docker image name"
-else
-  export DOCKER_IMAGE_NAME
 fi
 
 DOCKER_ENV_VARS=" -e TARGET_ARCH=armv7l"
@@ -30,11 +27,7 @@ DOCKER_ENV_VARS+=" -e OPTIONS=-DBUILD_ARMCOMPUTE=OFF"
 # Mirror server setting
 if [[ -z $EXTERNAL_DOWNLOAD_SERVER ]]; then
   echo "It will not use mirror server"
-else
-  DOCKER_ENV_VARS+=" -e EXTERNAL_DOWNLOAD_SERVER=$EXTERNAL_DOWNLOAD_SERVER"
 fi
-export DOCKER_ENV_VARS
-
 pushd $ROOT_PATH > /dev/null
 
 CMD="make && \
index 028c323..36ef1a6 100755 (executable)
@@ -6,17 +6,13 @@ ROOT_PATH="$CURRENT_PATH/../../"
 GBS_RPM_DIR=$ROOT_PATH/Product/out/rpm
 mkdir -p $GBS_RPM_DIR
 DOCKER_VOLUMES=" -v $GBS_RPM_DIR:/opt/rpm"
-export DOCKER_VOLUMES
 
 if [[ -z $DOCKER_IMAGE_NAME ]]; then
   echo "It will use default docker image name for tizen gbs build"
-  export DOCKER_IMAGE_NAME="nnfw_docker_tizen"
-else
-  export DOCKER_IMAGE_NAME
+  DOCKER_IMAGE_NAME="nnfw_docker_tizen"
 fi
 
 DOCKER_ENV_VARS=" --privileged"
-export DOCKER_ENV_VARS
 
 pushd $ROOT_PATH > /dev/null
 
index 34dc935..7206e6a 100755 (executable)
@@ -8,7 +8,6 @@ if [[ -z $MODELFILE_SERVER ]]; then
   echo "Need model file server setting"
   exit 1
 fi
-export $MODELFILE_SERVER
 
 pushd $ROOT_PATH > /dev/null