From 9b2e80068799f685e054f631b72b0cf26388bc90 Mon Sep 17 00:00:00 2001 From: lianghc Date: Thu, 26 Dec 2019 14:06:00 +0800 Subject: [PATCH] =?UTF-8?q?If=20the=20Intranet=20machine=20server=20is=20n?= =?UTF-8?q?ot=20networked,=20the=20test=20cannot=20be=20performed=E3=80=82?= =?UTF-8?q?Intranet=20machines=20do=20not=20need=20to=20check=20for=20the?= =?UTF-8?q?=20latest=20version=20of=20the=20code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tpch.sh | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/tpch.sh b/tpch.sh index 72d91099..308b9a44 100755 --- a/tpch.sh +++ b/tpch.sh @@ -266,9 +266,22 @@ echo_variables() check_user check_variables -yum_installs -repo_init -script_check + +for j in $(curl www.baidu.com 2>&1 | grep "Couldn't resolve host"); do + internet_down="1" +done + +if [ "$internet_down" -eq "0" ]; then + yum_installs + repo_init + script_check +else + echo "############################################################################" + echo "Couldn't resolve host,The local code is not checked for the latest version." + echo "############################################################################" + echo "" +fi + echo_variables su --session-command="cd \"$INSTALL_DIR/$REPO\"; ./rollout.sh $GEN_DATA_SCALE $EXPLAIN_ANALYZE $RANDOM_DISTRIBUTION $MULTI_USER_COUNT $RUN_COMPILE_TPCH $RUN_GEN_DATA $RUN_INIT $RUN_DDL $RUN_LOAD $RUN_SQL $RUN_SINGLE_USER_REPORT $RUN_MULTI_USER $RUN_MULTI_USER_REPORT $SINGLE_USER_ITERATIONS" $ADMIN_USER