From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mogw1106.ocn.ad.jp (mogw1106.ocn.ad.jp [153.149.229.7]) by dpdk.org (Postfix) with ESMTP id 633761D8CF for ; Fri, 15 Jun 2018 10:38:14 +0200 (CEST) Received: from mf-smf-ucb031c1 (mf-smf-ucb031c1.ocn.ad.jp [153.153.66.200]) by mogw1106.ocn.ad.jp (Postfix) with ESMTP id EB1E1E00246; Fri, 15 Jun 2018 17:38:12 +0900 (JST) Received: from ntt.pod01.mv-mta-ucb027 ([153.149.142.101]) by mf-smf-ucb031c1 with ESMTP id TkFIf2DkFxhxrTkFIf12oe; Fri, 15 Jun 2018 17:38:12 +0900 Received: from smtp.ocn.ne.jp ([153.149.227.166]) by ntt.pod01.mv-mta-ucb027 with id yweC1x00m3c2f7501weCyP; Fri, 15 Jun 2018 08:38:12 +0000 Received: from localhost.localdomain (p5164-ipngn8501marunouchi.tokyo.ocn.ne.jp [153.214.228.164]) by smtp.ocn.ne.jp (Postfix) with ESMTPA; Fri, 15 Jun 2018 17:38:12 +0900 (JST) From: ogawa.yasufumi@lab.ntt.co.jp To: ferruh.yigit@intel.com, spp@dpdk.org Cc: Yasufumi Ogawa Date: Fri, 15 Jun 2018 17:37:53 +0900 Message-Id: <20180615083754.20220-15-ogawa.yasufumi@lab.ntt.co.jp> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180615083754.20220-1-ogawa.yasufumi@lab.ntt.co.jp> References: <20180615083754.20220-1-ogawa.yasufumi@lab.ntt.co.jp> Subject: [spp] [PATCH 14/15] tools/sppc: add helper script for build X-BeenThere: spp@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Soft Patch Panel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jun 2018 08:38:14 -0000 From: Yasufumi Ogawa 'build/run.sh' is a helper script to inspect inside the container. You can run bash on the container to confirm behaviour of targetting application, or run any of command. Signed-off-by: Yasufumi Ogawa --- tools/sppc/build/run.sh | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 tools/sppc/build/run.sh diff --git a/tools/sppc/build/run.sh b/tools/sppc/build/run.sh new file mode 100755 index 0000000..ace7ee8 --- /dev/null +++ b/tools/sppc/build/run.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Nippon Telegraph and Telephone Corporation + +CONTAINER_IMG_NAME=$1 +CMD=$2 +APP_DIR=`dirname ${0}` +ENVSH=${APP_DIR}/ubuntu/dpdk/env.sh + +# Include env.sh +if [ -e ${ENVSH} ];then + . ${ENVSH} +else + _build_env='./build/main.py --only-envsh' + echo "[Error] ${ENVSH} does not exist!" + echo "You have to build image or run '${_build_env}' to create it." + exit +fi + +if [ ! $2 ]; then + echo "usage: $0 [IMAGE] [COMMAND]" + exit +fi + +#cd ${APP_DIR}; \ +sudo docker run -i -t \ + -e http_proxy=${http_proxy} \ + -e https_proxy=${https_proxy} \ + -e HTTP_PROXY=${http_proxy} \ + -e HTTPS_PROXY=${https_proxy} \ + -e RTE_SDK=${RTE_SDK} \ + -e RTE_TARGET=${RTE_TARGET} \ + ${CONTAINER_IMG_NAME} \ + ${CMD} -- 2.17.1