Merge pull request #6895 from taosdata/fix/TD-5352
[TD-5352]<fix>: Unable to run tsim test script on MacOS
This commit is contained in:
commit
91774fda49
|
@ -8,6 +8,8 @@ if [ $# != 6 ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
UNAME_BIN=`which uname`
|
||||
OS_TYPE=`$UNAME_BIN`
|
||||
NODE_NAME=
|
||||
CONFIG_NAME=
|
||||
CONFIG_VALUE=
|
||||
|
@ -43,10 +45,16 @@ fi
|
|||
TAOS_DIR=`pwd`
|
||||
TAOSD_DIR=`find . -name "taosd"|grep bin|head -n1`
|
||||
|
||||
if [[ "$TAOSD_DIR" == *"$IN_TDINTERNAL"* ]]; then
|
||||
BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' --fields=2,3`
|
||||
if [[ "$OS_TYPE" != "Darwin" ]]; then
|
||||
cut_opt="--field="
|
||||
else
|
||||
BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' --fields=2`
|
||||
cut_opt="-f "
|
||||
fi
|
||||
|
||||
if [[ "$TAOSD_DIR" == *"$IN_TDINTERNAL"* ]]; then
|
||||
BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' ${cut_opt}2,3`
|
||||
else
|
||||
BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' ${cut_opt}2`
|
||||
fi
|
||||
|
||||
BUILD_DIR=$TAOS_DIR/$BIN_DIR/build
|
||||
|
|
|
@ -10,6 +10,8 @@ if [ $# != 6 ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
UNAME_BIN=`which uname`
|
||||
OS_TYPE=`$UNAME_BIN`
|
||||
NODE_NAME=
|
||||
NODE_IP=
|
||||
MSATER_IP=
|
||||
|
@ -46,10 +48,16 @@ fi
|
|||
TAOS_DIR=`pwd`
|
||||
TAOSD_DIR=`find . -name "taosd"|grep bin|head -n1`
|
||||
|
||||
if [[ "$TAOSD_DIR" == *"$IN_TDINTERNAL"* ]]; then
|
||||
BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' --fields=2,3`
|
||||
if [[ "$OS_TYPE" != "Darwin" ]]; then
|
||||
cut_opt="--field="
|
||||
else
|
||||
BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' --fields=2`
|
||||
cut_opt="-f "
|
||||
fi
|
||||
|
||||
if [[ "$TAOSD_DIR" == *"$IN_TDINTERNAL"* ]]; then
|
||||
BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' ${cut_opt}2,3`
|
||||
else
|
||||
BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' ${cut_opt}2`
|
||||
fi
|
||||
|
||||
BUILD_DIR=$TAOS_DIR/$BIN_DIR/build
|
||||
|
|
|
@ -9,6 +9,8 @@ if [ $# != 4 ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
UNAME_BIN=`which uname`
|
||||
OS_TYPE=`$UNAME_BIN`
|
||||
NODE_NAME=
|
||||
NODE=
|
||||
while getopts "n:i:" arg
|
||||
|
@ -41,10 +43,16 @@ fi
|
|||
TAOS_DIR=`pwd`
|
||||
TAOSD_DIR=`find . -name "taosd"|grep bin|head -n1`
|
||||
|
||||
if [[ "$TAOSD_DIR" == *"$IN_TDINTERNAL"* ]]; then
|
||||
BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' --fields=2,3`
|
||||
if [[ "$OS_TYPE" != "Darwin" ]]; then
|
||||
cut_opt="--field="
|
||||
else
|
||||
BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' --fields=2`
|
||||
cut_opt="-f "
|
||||
fi
|
||||
|
||||
if [[ "$TAOSD_DIR" == *"$IN_TDINTERNAL"* ]]; then
|
||||
BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' ${cut_opt}2,3`
|
||||
else
|
||||
BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' ${cut_opt}2`
|
||||
fi
|
||||
|
||||
BUILD_DIR=$TAOS_DIR/$BIN_DIR/build
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
# exit 1
|
||||
# fi
|
||||
|
||||
UNAME_BIN=`which uname`
|
||||
OS_TYPE=`$UNAME_BIN`
|
||||
NODE_NAME=
|
||||
EXEC_OPTON=
|
||||
CLEAR_OPTION="false"
|
||||
|
@ -52,10 +54,16 @@ fi
|
|||
TAOS_DIR=`pwd`
|
||||
TAOSD_DIR=`find . -name "taosd"|grep bin|head -n1`
|
||||
|
||||
if [[ "$TAOSD_DIR" == *"$IN_TDINTERNAL"* ]]; then
|
||||
BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' --fields=2,3`
|
||||
if [[ "$OS_TYPE" != "Darwin" ]]; then
|
||||
cut_opt="--field="
|
||||
else
|
||||
BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' --fields=2`
|
||||
cut_opt="-f "
|
||||
fi
|
||||
|
||||
if [[ "$TAOSD_DIR" == *"$IN_TDINTERNAL"* ]]; then
|
||||
BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' ${cut_opt}2,3`
|
||||
else
|
||||
BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' ${cut_opt}2`
|
||||
fi
|
||||
|
||||
BUILD_DIR=$TAOS_DIR/$BIN_DIR/build
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
# exit 1
|
||||
# fi
|
||||
|
||||
UNAME_BIN=`which uname`
|
||||
OS_TYPE=`$UNAME_BIN`
|
||||
NODE_NAME=
|
||||
EXEC_OPTON=
|
||||
CLEAR_OPTION="false"
|
||||
|
@ -52,10 +54,16 @@ fi
|
|||
TAOS_DIR=`pwd`
|
||||
TAOSD_DIR=`find . -name "taosd"|grep bin|head -n1`
|
||||
|
||||
if [[ "$TAOSD_DIR" == *"$IN_TDINTERNAL"* ]]; then
|
||||
BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' --fields=2,3`
|
||||
if [[ "$OS_TYPE" != "Darwin" ]]; then
|
||||
cut_opt="--field="
|
||||
else
|
||||
BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' --fields=2`
|
||||
cut_opt="-f "
|
||||
fi
|
||||
|
||||
if [[ "$TAOSD_DIR" == *"$IN_TDINTERNAL"* ]]; then
|
||||
BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' ${cut_opt}2,3`
|
||||
else
|
||||
BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' ${cut_opt}2`
|
||||
fi
|
||||
|
||||
BUILD_DIR=$TAOS_DIR/$BIN_DIR/build
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
# exit 1
|
||||
# fi
|
||||
|
||||
UNAME_BIN=`which uname`
|
||||
OS_TYPE=`$UNAME_BIN`
|
||||
NODE_NAME=
|
||||
EXEC_OPTON=
|
||||
CLEAR_OPTION="false"
|
||||
|
@ -52,10 +54,16 @@ fi
|
|||
TAOS_DIR=`pwd`
|
||||
TAOSD_DIR=`find . -name "taosd"|grep bin|head -n1`
|
||||
|
||||
if [[ "$TAOSD_DIR" == *"$IN_TDINTERNAL"* ]]; then
|
||||
BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' --fields=2,3`
|
||||
if [[ "$OS_TYPE" != "Darwin" ]]; then
|
||||
cut_opt="--field="
|
||||
else
|
||||
BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' --fields=2`
|
||||
cut_opt="-f "
|
||||
fi
|
||||
|
||||
if [[ "$TAOSD_DIR" == *"$IN_TDINTERNAL"* ]]; then
|
||||
BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' ${cut_opt}2,3`
|
||||
else
|
||||
BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' ${cut_opt}2`
|
||||
fi
|
||||
|
||||
BUILD_DIR=$TAOS_DIR/$BIN_DIR/build
|
||||
|
|
|
@ -8,6 +8,9 @@
|
|||
# exit 1
|
||||
# fi
|
||||
|
||||
UNAME_BIN=`which uname`
|
||||
OS_TYPE=`$UNAME_BIN`
|
||||
|
||||
NODE_NAME=
|
||||
EXEC_OPTON=
|
||||
CLEAR_OPTION="false"
|
||||
|
@ -52,10 +55,16 @@ fi
|
|||
TAOS_DIR=`pwd`
|
||||
TAOSD_DIR=`find . -name "taosd"|grep bin|head -n1`
|
||||
|
||||
if [[ "$TAOSD_DIR" == *"$IN_TDINTERNAL"* ]]; then
|
||||
BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' --fields=2,3`
|
||||
if [[ "$OS_TYPE" != "Darwin" ]]; then
|
||||
cut_opt="--field="
|
||||
else
|
||||
BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' --fields=2`
|
||||
cut_opt="-f "
|
||||
fi
|
||||
|
||||
if [[ "$TAOSD_DIR" == *"$IN_TDINTERNAL"* ]]; then
|
||||
BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' ${cut_opt}2,3`
|
||||
else
|
||||
BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' ${cut_opt}2`
|
||||
fi
|
||||
|
||||
BUILD_DIR=$TAOS_DIR/$BIN_DIR/build
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
# exit 1
|
||||
# fi
|
||||
|
||||
UNAME_BIN=`which uname`
|
||||
OS_TYPE=`$UNAME_BIN`
|
||||
EXEC_OPTON=
|
||||
while getopts "n:s:u:x:ct" arg
|
||||
do
|
||||
|
@ -49,10 +51,16 @@ fi
|
|||
TAOS_DIR=`pwd`
|
||||
TAOSD_DIR=`find . -name "taosd"|grep bin|head -n1`
|
||||
|
||||
if [[ "$TAOSD_DIR" == *"$IN_TDINTERNAL"* ]]; then
|
||||
BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' --fields=2,3`
|
||||
if [[ "$OS_TYPE" != "Darwin" ]]; then
|
||||
cut_opt="--field="
|
||||
else
|
||||
BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' --fields=2`
|
||||
cut_opt="-f "
|
||||
fi
|
||||
|
||||
if [[ "$TAOSD_DIR" == *"$IN_TDINTERNAL"* ]]; then
|
||||
BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' ${cut_opt}2,3`
|
||||
else
|
||||
BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' ${cut_opt}2`
|
||||
fi
|
||||
|
||||
BUILD_DIR=$TAOS_DIR/$BIN_DIR/build
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
|
||||
echo "Executing move_dnode.sh"
|
||||
|
||||
UNAME_BIN=`which uname`
|
||||
OS_TYPE=`$UNAME_BIN`
|
||||
|
||||
SCRIPT_DIR=`dirname $0`
|
||||
cd $SCRIPT_DIR/../
|
||||
SCRIPT_DIR=`pwd`
|
||||
|
@ -17,10 +20,16 @@ fi
|
|||
TAOS_DIR=`pwd`
|
||||
TAOSD_DIR=`find . -name "taosd"|grep bin|head -n1`
|
||||
|
||||
if [[ "$TAOSD_DIR" == *"$IN_TDINTERNAL"* ]]; then
|
||||
BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' --fields=2,3`
|
||||
if [[ "$OS_TYPE" != "Darwin" ]]; then
|
||||
cut_opt="--field="
|
||||
else
|
||||
BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' --fields=2`
|
||||
cut_opt="-f "
|
||||
fi
|
||||
|
||||
if [[ "$TAOSD_DIR" == *"$IN_TDINTERNAL"* ]]; then
|
||||
BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' ${cut_opt}2,3`
|
||||
else
|
||||
BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' ${cut_opt}2`
|
||||
fi
|
||||
|
||||
BUILD_DIR=$TAOS_DIR/$BIN_DIR/build
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
|
||||
echo "Executing mv_old_data.sh"
|
||||
|
||||
UNAME_BIN=`which uname`
|
||||
OS_TYPE=`$UNAME_BIN`
|
||||
|
||||
SCRIPT_DIR=`dirname $0`
|
||||
cd $SCRIPT_DIR/../
|
||||
SCRIPT_DIR=`pwd`
|
||||
|
@ -17,10 +20,16 @@ fi
|
|||
TAOS_DIR=`pwd`
|
||||
TAOSD_DIR=`find . -name "taosd"|grep bin|head -n1`
|
||||
|
||||
if [[ "$TAOSD_DIR" == *"$IN_TDINTERNAL"* ]]; then
|
||||
BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' --fields=2,3`
|
||||
if [[ "$OS_TYPE" != "Darwin" ]]; then
|
||||
cut_opt="--field="
|
||||
else
|
||||
BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' --fields=2`
|
||||
cut_opt="-f "
|
||||
fi
|
||||
|
||||
if [[ "$TAOSD_DIR" == *"$IN_TDINTERNAL"* ]]; then
|
||||
BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' ${cut_opt}2,3`
|
||||
else
|
||||
BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' ${cut_opt}2`
|
||||
fi
|
||||
|
||||
BUILD_DIR=$TAOS_DIR/$BIN_DIR/build
|
||||
|
|
|
@ -1,24 +1,36 @@
|
|||
#!/bin/sh
|
||||
|
||||
UNAME_BIN=`which uname`
|
||||
OS_TYPE=`$UNAME_BIN`
|
||||
|
||||
PID=`ps -ef|grep /usr/bin/taosd | grep -v grep | awk '{print $2}'`
|
||||
if [ -n "$PID" ]; then
|
||||
echo systemctl stop taosd
|
||||
systemctl stop taosd
|
||||
echo systemctl stop taosd
|
||||
systemctl stop taosd
|
||||
fi
|
||||
|
||||
PID=`ps -ef|grep -w taosd | grep -v grep | awk '{print $2}'`
|
||||
while [ -n "$PID" ]; do
|
||||
echo kill -9 $PID
|
||||
pkill -9 taosd
|
||||
fuser -k -n tcp 6030
|
||||
echo kill -9 $PID
|
||||
pkill -9 taosd
|
||||
echo "Killing processes locking on port 6030"
|
||||
if [[ "$OS_TYPE" != "Darwin" ]]; then
|
||||
fuser -k -n tcp 6030
|
||||
else
|
||||
lsof -nti:6030 | xargs kill -9
|
||||
fi
|
||||
PID=`ps -ef|grep -w taosd | grep -v grep | awk '{print $2}'`
|
||||
done
|
||||
|
||||
PID=`ps -ef|grep -w tarbitrator | grep -v grep | awk '{print $2}'`
|
||||
while [ -n "$PID" ]; do
|
||||
echo kill -9 $PID
|
||||
pkill -9 tarbitrator
|
||||
fuser -k -n tcp 6040
|
||||
echo kill -9 $PID
|
||||
pkill -9 tarbitrator
|
||||
if [[ "$OS_TYPE" != "Darwin" ]]; then
|
||||
fuser -k -n tcp 6040
|
||||
else
|
||||
lsof -nti:6040 | xargs kill -9
|
||||
fi
|
||||
PID=`ps -ef|grep -w tarbitrator | grep -v grep | awk '{print $2}'`
|
||||
done
|
||||
|
||||
|
|
|
@ -14,6 +14,8 @@ RELEASE=0
|
|||
ASYNC=0
|
||||
VALGRIND=0
|
||||
UNIQUE=0
|
||||
UNAME_BIN=`which uname`
|
||||
OS_TYPE=`$UNAME_BIN`
|
||||
while getopts "f:avu" arg
|
||||
do
|
||||
case $arg in
|
||||
|
@ -51,10 +53,16 @@ fi
|
|||
TOP_DIR=`pwd`
|
||||
TAOSD_DIR=`find . -name "taosd"|grep bin|head -n1`
|
||||
|
||||
if [[ "$TAOSD_DIR" == *"$IN_TDINTERNAL"* ]]; then
|
||||
BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' --fields=2,3`
|
||||
if [[ "$OS_TYPE" != "Darwin" ]]; then
|
||||
cut_opt="--field="
|
||||
else
|
||||
BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' --fields=2`
|
||||
cut_opt="-f "
|
||||
fi
|
||||
|
||||
if [[ "$TAOSD_DIR" == *"$IN_TDINTERNAL"* ]]; then
|
||||
BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' ${cut_opt}2,3`
|
||||
else
|
||||
BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' ${cut_opt}2`
|
||||
fi
|
||||
|
||||
BUILD_DIR=$TOP_DIR/$BIN_DIR/build
|
||||
|
|
Loading…
Reference in New Issue