test.sh 694 字节
Newer Older
H
Hui Li 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
#!/bin/bash

##################################################
# 
# Do go test 
#
##################################################

set +e
#set -x

FILE_NAME=
RELEASE=0
while getopts "f:" arg
do
  case $arg in
    f)
      FILE_NAME=$OPTARG
      echo "input file: $FILE_NAME"
      ;;
    ?)
      echo "unknow argument"
      ;;
  esac
done

# start one taosd
bash ../script/sh/stop_dnodes.sh
bash ../script/sh/deploy.sh -n dnode1 -i 1
bash ../script/sh/cfg.sh -n dnode1 -c walLevel -v 0
bash ../script/sh/exec.sh -n dnode1 -s start

# start build test go file
caseDir=`echo ${FILE_NAME%/*}`
echo "caseDir: $caseDir"
cd $caseDir
rm go.*
go mod init $caseDir
go build 
sleep 1s
./$caseDir