From 3c4aa087c63e9b9933c86598301f1ae7d6a2d5bf Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Tue, 2 Jun 2020 14:28:13 +0800 Subject: [PATCH] suport build from community. --- tests/script/sh/cfg.sh | 9 +++++++-- tests/script/sh/clear.sh | 9 +++++++-- tests/script/sh/deploy.sh | 9 +++++++-- tests/script/sh/exec.sh | 9 +++++++-- tests/script/sh/exec_tarbitrator.sh | 9 +++++++-- tests/script/test.sh | 9 +++++++-- 6 files changed, 42 insertions(+), 12 deletions(-) diff --git a/tests/script/sh/cfg.sh b/tests/script/sh/cfg.sh index 0c240ca451..0c28a8edce 100755 --- a/tests/script/sh/cfg.sh +++ b/tests/script/sh/cfg.sh @@ -41,10 +41,15 @@ else fi TAOS_DIR=`pwd` +TAOSD_DIR=`find . -name "taosd"|grep bin|head -n1` -BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' --fields=2,3` +if [[ "$TAOSD_DIR" == *"$IN_TDINTERNAL"* ]]; then + BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' --fields=2,3` +else + BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' --fields=2` +fi -BUILD_DIR=$TAOS_DIR/$BIN_DIR +BUILD_DIR=$TAOS_DIR/$BIN_DIR/build SIM_DIR=$TAOS_DIR/sim diff --git a/tests/script/sh/clear.sh b/tests/script/sh/clear.sh index af14c61c79..d8af2dd10b 100755 --- a/tests/script/sh/clear.sh +++ b/tests/script/sh/clear.sh @@ -44,10 +44,15 @@ else fi TAOS_DIR=`pwd` +TAOSD_DIR=`find . -name "taosd"|grep bin|head -n1` -BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' --fields=2,3` +if [[ "$TAOSD_DIR" == *"$IN_TDINTERNAL"* ]]; then + BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' --fields=2,3` +else + BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' --fields=2` +fi -BUILD_DIR=$TAOS_DIR/$BIN_DIR +BUILD_DIR=$TAOS_DIR/$BIN_DIR/build SIM_DIR=$TAOS_DIR/sim NODE_DIR=$SIM_DIR/$NODE_NAME diff --git a/tests/script/sh/deploy.sh b/tests/script/sh/deploy.sh index 94499a50cb..5837cf5a1a 100755 --- a/tests/script/sh/deploy.sh +++ b/tests/script/sh/deploy.sh @@ -39,10 +39,15 @@ else fi TAOS_DIR=`pwd` +TAOSD_DIR=`find . -name "taosd"|grep bin|head -n1` -BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' --fields=2,3` +if [[ "$TAOSD_DIR" == *"$IN_TDINTERNAL"* ]]; then + BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' --fields=2,3` +else + BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' --fields=2` +fi -BUILD_DIR=$TAOS_DIR/$BIN_DIR +BUILD_DIR=$TAOS_DIR/$BIN_DIR/build SIM_DIR=$TAOS_DIR/sim diff --git a/tests/script/sh/exec.sh b/tests/script/sh/exec.sh index 2682cac65f..1e033071f7 100755 --- a/tests/script/sh/exec.sh +++ b/tests/script/sh/exec.sh @@ -50,10 +50,15 @@ else fi TAOS_DIR=`pwd` +TAOSD_DIR=`find . -name "taosd"|grep bin|head -n1` -BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' --fields=2,3` +if [[ "$TAOSD_DIR" == *"$IN_TDINTERNAL"* ]]; then + BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' --fields=2,3` +else + BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' --fields=2` +fi -BUILD_DIR=$TAOS_DIR/$BIN_DIR +BUILD_DIR=$TAOS_DIR/$BIN_DIR/build SIM_DIR=$TAOS_DIR/sim NODE_DIR=$SIM_DIR/$NODE_NAME diff --git a/tests/script/sh/exec_tarbitrator.sh b/tests/script/sh/exec_tarbitrator.sh index cb4d86915c..496b3e4ed6 100755 --- a/tests/script/sh/exec_tarbitrator.sh +++ b/tests/script/sh/exec_tarbitrator.sh @@ -47,10 +47,15 @@ else fi TAOS_DIR=`pwd` +TAOSD_DIR=`find . -name "taosd"|grep bin|head -n1` -BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' --fields=2,3` +if [[ "$TAOSD_DIR" == *"$IN_TDINTERNAL"* ]]; then + BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' --fields=2,3` +else + BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' --fields=2` +fi -BUILD_DIR=$TAOS_DIR/$BIN_DIR +BUILD_DIR=$TAOS_DIR/$BIN_DIR/build SIM_DIR=$TAOS_DIR/sim NODE_DIR=$SIM_DIR/arbitrator diff --git a/tests/script/test.sh b/tests/script/test.sh index ccb9fac4c0..a6d57e548a 100755 --- a/tests/script/test.sh +++ b/tests/script/test.sh @@ -49,10 +49,15 @@ else fi TOP_DIR=`pwd` +TAOSD_DIR=`find . -name "taosd"|grep bin|head -n1` -BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' --fields=2,3` +if [[ "$TAOSD_DIR" == *"$IN_TDINTERNAL"* ]]; then + BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' --fields=2,3` +else + BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' --fields=2` +fi -BUILD_DIR=$TOP_DIR/$BIN_DIR +BUILD_DIR=$TOP_DIR/$BIN_DIR/build SIM_DIR=$TOP_DIR/sim -- GitLab