[TD-6035]add connector test in CI
This commit is contained in:
parent
4c07b00472
commit
d7eb5a22fe
|
@ -160,7 +160,6 @@ pipeline {
|
||||||
skipbuild='2'
|
skipbuild='2'
|
||||||
skipbuild=sh(script: "git log -2 --pretty=%B | fgrep -ie '[skip ci]' -e '[ci skip]' && echo 1 || echo 2", returnStdout:true)
|
skipbuild=sh(script: "git log -2 --pretty=%B | fgrep -ie '[skip ci]' -e '[ci skip]' && echo 1 || echo 2", returnStdout:true)
|
||||||
println skipbuild
|
println skipbuild
|
||||||
|
|
||||||
}
|
}
|
||||||
sh'''
|
sh'''
|
||||||
rm -rf ${WORKSPACE}.tes
|
rm -rf ${WORKSPACE}.tes
|
||||||
|
@ -225,6 +224,26 @@ pipeline {
|
||||||
steps {
|
steps {
|
||||||
timeout(time: 55, unit: 'MINUTES'){
|
timeout(time: 55, unit: 'MINUTES'){
|
||||||
pre_test()
|
pre_test()
|
||||||
|
sh '''
|
||||||
|
rm -rf /var/lib/taos/*
|
||||||
|
rm -rf /var/log/taos/*
|
||||||
|
nohup taosd >/dev/null &
|
||||||
|
sleep 10
|
||||||
|
'''
|
||||||
|
sh '''
|
||||||
|
cd ${WKC}/tests/examples/nodejs
|
||||||
|
npm install td2.0-connector > /dev/null 2>&1
|
||||||
|
node nodejsChecker.js host=localhost
|
||||||
|
'''
|
||||||
|
sh '''
|
||||||
|
cd ${WKC}/tests/examples/C#/taosdemo
|
||||||
|
mcs -out:taosdemo *.cs > /dev/null 2>&1
|
||||||
|
echo '' |./taosdemo
|
||||||
|
'''
|
||||||
|
sh '''
|
||||||
|
cd ${WKC}/tests/gotest
|
||||||
|
bash batchtest.sh
|
||||||
|
'''
|
||||||
sh '''
|
sh '''
|
||||||
cd ${WKC}/tests
|
cd ${WKC}/tests
|
||||||
./test-all.sh b1fq
|
./test-all.sh b1fq
|
||||||
|
|
|
@ -15,7 +15,8 @@ script_dir="$(dirname $(readlink -f $0))"
|
||||||
###### step 3: start build
|
###### step 3: start build
|
||||||
cd $script_dir
|
cd $script_dir
|
||||||
rm -f go.*
|
rm -f go.*
|
||||||
go mod init demotest
|
go mod init demotest > /dev/null 2>&1
|
||||||
go build
|
go mod tidy > /dev/null 2>&1
|
||||||
|
go build > /dev/null 2>&1
|
||||||
sleep 1s
|
sleep 1s
|
||||||
./demotest -h $1 -p $2
|
./demotest -h $1 -p $2
|
||||||
|
|
|
@ -12,7 +12,7 @@ IN_TDINTERNAL="community"
|
||||||
|
|
||||||
function stopTaosd {
|
function stopTaosd {
|
||||||
echo "Stop taosd"
|
echo "Stop taosd"
|
||||||
sudo systemctl stop taosd
|
sudo systemctl stop taosd || echo 'no sudo or systemctl or stop fail'
|
||||||
PID=`ps -ef|grep -w taosd | grep -v grep | awk '{print $2}'`
|
PID=`ps -ef|grep -w taosd | grep -v grep | awk '{print $2}'`
|
||||||
while [ -n "$PID" ]
|
while [ -n "$PID" ]
|
||||||
do
|
do
|
||||||
|
@ -24,9 +24,9 @@ function stopTaosd {
|
||||||
|
|
||||||
function dohavecore(){
|
function dohavecore(){
|
||||||
corefile=`find $corepath -mmin 1`
|
corefile=`find $corepath -mmin 1`
|
||||||
core_file=`echo $corefile|cut -d " " -f2`
|
|
||||||
proc=`echo $corefile|cut -d "_" -f3`
|
|
||||||
if [ -n "$corefile" ];then
|
if [ -n "$corefile" ];then
|
||||||
|
core_file=`echo $corefile|cut -d " " -f2`
|
||||||
|
proc=`file $core_file|awk -F "execfn:" '/execfn:/{print $2}'|tr -d \' |awk '{print $1}'|tr -d \,`
|
||||||
echo 'taosd or taos has generated core'
|
echo 'taosd or taos has generated core'
|
||||||
rm case.log
|
rm case.log
|
||||||
if [[ "$tests_dir" == *"$IN_TDINTERNAL"* ]] && [[ $1 == 1 ]]; then
|
if [[ "$tests_dir" == *"$IN_TDINTERNAL"* ]] && [[ $1 == 1 ]]; then
|
||||||
|
@ -46,7 +46,7 @@ function dohavecore(){
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [[ $1 == 1 ]];then
|
if [[ $1 == 1 ]];then
|
||||||
echo '\n'|gdb /usr/local/taos/bin/$proc $core_file -ex "bt 10" -ex quit
|
echo '\n'|gdb $proc $core_file -ex "bt 10" -ex quit
|
||||||
exit 8
|
exit 8
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue