Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
9ea0e2f7
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
9ea0e2f7
编写于
5月 31, 2020
作者:
S
Shuduo Sang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix test scripts according to jeff's suggestion.
上级
423fa696
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
115 addition
and
52 deletion
+115
-52
.travis.yml
.travis.yml
+5
-5
tests/pytest/fulltest.sh
tests/pytest/fulltest.sh
+2
-0
tests/pytest/smoketest.sh
tests/pytest/smoketest.sh
+2
-0
tests/pytest/util/dnodes.py
tests/pytest/util/dnodes.py
+10
-10
tests/script/sh/cfg.sh
tests/script/sh/cfg.sh
+12
-3
tests/script/sh/clear.sh
tests/script/sh/clear.sh
+11
-3
tests/script/sh/deploy.sh
tests/script/sh/deploy.sh
+12
-3
tests/script/sh/exec.sh
tests/script/sh/exec.sh
+14
-5
tests/script/sh/exec_tarbitrator.sh
tests/script/sh/exec_tarbitrator.sh
+13
-4
tests/script/sh/exec_up.sh
tests/script/sh/exec_up.sh
+13
-4
tests/script/test.sh
tests/script/test.sh
+13
-7
tests/test-all.sh
tests/test-all.sh
+8
-8
未找到文件。
.travis.yml
浏览文件 @
9ea0e2f7
...
...
@@ -51,7 +51,7 @@ matrix:
./test-all.sh $TRAVIS_EVENT_TYPE || travis_terminate $?
cd ${TRAVIS_BUILD_DIR}/tests/pytest
./valgrind-test.sh 2>&1 > mem-error-out.
txt
./valgrind-test.sh 2>&1 > mem-error-out.
log
sleep 1
# Color setting
...
...
@@ -61,9 +61,9 @@ matrix:
GREEN_UNDERLINE='\033[4;32m'
NC='\033[0m'
grep 'start to execute\|ERROR SUMMARY' mem-error-out.
txt|grep -v 'grep'|uniq|tee uniq-mem-error-out.txt
grep 'start to execute\|ERROR SUMMARY' mem-error-out.
log|grep -v 'grep'|uniq|tee uniq-mem-error-out.log
for memError in `grep 'ERROR SUMMARY' uniq-mem-error-out.
txt | awk '{print $4}'`
for memError in `grep 'ERROR SUMMARY' uniq-mem-error-out.
log | awk '{print $4}'`
do
if [ -n "$memError" ]; then
if [ "$memError" -gt 12 ]; then
...
...
@@ -74,8 +74,8 @@ matrix:
fi
done
grep 'start to execute\|definitely lost:' mem-error-out.
txt|grep -v 'grep'|uniq|tee uniq-definitely-lost-out.txt
for defiMemError in `grep 'definitely lost:' uniq-definitely-lost-out.
txt
| awk '{print $7}'`
grep 'start to execute\|definitely lost:' mem-error-out.
log|grep -v 'grep'|uniq|tee uniq-definitely-lost-out.log
for defiMemError in `grep 'definitely lost:' uniq-definitely-lost-out.
log
| awk '{print $7}'`
do
if [ -n "$defiMemError" ]; then
if [ "$defiMemError" -gt 13 ]; then
...
...
tests/pytest/fulltest.sh
浏览文件 @
9ea0e2f7
#!/bin/bash
ulimit
-c
unlimited
python3 ./test.py
-f
insert/basic.py
python3 ./test.py
-f
insert/int.py
python3 ./test.py
-f
insert/float.py
...
...
tests/pytest/smoketest.sh
浏览文件 @
9ea0e2f7
#!/bin/bash
ulimit
-c
unlimited
# insert
python3 ./test.py
$1
-f
insert/basic.py
python3 ./test.py
$1
-s
&&
sleep
1
...
...
tests/pytest/util/dnodes.py
浏览文件 @
9ea0e2f7
...
...
@@ -38,9 +38,9 @@ class TDSimClient:
tdLog
.
exit
(
cmd
)
def
deploy
(
self
):
self
.
logDir
=
"%s/
py
sim/psim/log"
%
(
self
.
path
,)
self
.
cfgDir
=
"%s/
py
sim/psim/cfg"
%
(
self
.
path
)
self
.
cfgPath
=
"%s/
py
sim/psim/cfg/taos.cfg"
%
(
self
.
path
)
self
.
logDir
=
"%s/sim/psim/log"
%
(
self
.
path
,)
self
.
cfgDir
=
"%s/sim/psim/cfg"
%
(
self
.
path
)
self
.
cfgPath
=
"%s/sim/psim/cfg/taos.cfg"
%
(
self
.
path
)
cmd
=
"rm -rf "
+
self
.
logDir
if
os
.
system
(
cmd
)
!=
0
:
...
...
@@ -113,10 +113,10 @@ class TDDnode:
return
totalSize
def
deploy
(
self
):
self
.
logDir
=
"%s/
py
sim/dnode%d/log"
%
(
self
.
path
,
self
.
index
)
self
.
dataDir
=
"%s/
py
sim/dnode%d/data"
%
(
self
.
path
,
self
.
index
)
self
.
cfgDir
=
"%s/
py
sim/dnode%d/cfg"
%
(
self
.
path
,
self
.
index
)
self
.
cfgPath
=
"%s/
py
sim/dnode%d/cfg/taos.cfg"
%
(
self
.
logDir
=
"%s/sim/dnode%d/log"
%
(
self
.
path
,
self
.
index
)
self
.
dataDir
=
"%s/sim/dnode%d/data"
%
(
self
.
path
,
self
.
index
)
self
.
cfgDir
=
"%s/sim/dnode%d/cfg"
%
(
self
.
path
,
self
.
index
)
self
.
cfgPath
=
"%s/sim/dnode%d/cfg/taos.cfg"
%
(
self
.
path
,
self
.
index
)
cmd
=
"rm -rf "
+
self
.
dataDir
...
...
@@ -298,11 +298,11 @@ class TDDnode:
tdLog
.
exit
(
cmd
)
def
getDnodeRootDir
(
self
,
index
):
dnodeRootDir
=
"%s/
py
sim/psim/dnode%d"
%
(
self
.
path
,
index
)
dnodeRootDir
=
"%s/sim/psim/dnode%d"
%
(
self
.
path
,
index
)
return
dnodeRootDir
def
getDnodesRootDir
(
self
):
dnodesRootDir
=
"%s/
py
sim/psim"
%
(
self
.
path
)
dnodesRootDir
=
"%s/sim/psim"
%
(
self
.
path
)
return
dnodesRootDir
...
...
@@ -455,7 +455,7 @@ class TDDnodes:
# tdLog.exit(cmd)
def
getDnodesRootDir
(
self
):
dnodesRootDir
=
"%s/
py
sim"
%
(
self
.
path
)
dnodesRootDir
=
"%s/sim"
%
(
self
.
path
)
return
dnodesRootDir
def
getSimCfgPath
(
self
):
...
...
tests/script/sh/cfg.sh
浏览文件 @
9ea0e2f7
#!/bin/sh
#!/bin/
ba
sh
if
[
$#
!=
6
]
;
then
echo
"argument list need input : "
...
...
@@ -33,10 +33,19 @@ SCRIPT_DIR=`dirname $0`
cd
$SCRIPT_DIR
/../
SCRIPT_DIR
=
`
pwd
`
cd
../../
TDINTERNAL
=
"TDinternal"
if
[[
"
$SCRIPT_DIR
"
==
*
"
$TDINTERNAL
"
*
]]
;
then
cd
../../..
else
cd
../../
fi
TAOS_DIR
=
`
pwd
`
BUILD_DIR
=
$TAOS_DIR
/debug/build
BIN_DIR
=
`
find
.
-name
"taosd"
|grep bin|
cut
-d
'/'
--fields
=
2,3
`
BUILD_DIR
=
$TAOS_DIR
/
$BIN_DIR
SIM_DIR
=
$TAOS_DIR
/sim
NODE_DIR
=
$SIM_DIR
/
$NODE_NAME
...
...
tests/script/sh/clear.sh
浏览文件 @
9ea0e2f7
...
...
@@ -36,12 +36,20 @@ cd $SCRIPT_DIR/../
SCRIPT_DIR
=
`
pwd
`
echo
"SCRIPT_DIR:
$SCRIPT_DIR
"
cd
../../
TDINTERNAL
=
"TDinternal"
if
[[
"
$SCRIPT_DIR
"
==
*
"
$TDINTERNAL
"
*
]]
;
then
cd
../../..
else
cd
../../
fi
TAOS_DIR
=
`
pwd
`
BUILD_DIR
=
$TAOS_DIR
/debug/build
SIM_DIR
=
$TAOS_DIR
/sim
BIN_DIR
=
`
find
.
-name
"taosd"
|grep bin|
cut
-d
'/'
--fields
=
2,3
`
BUILD_DIR
=
$TAOS_DIR
/
$BIN_DIR
SIM_DIR
=
$TAOS_DIR
/sim
NODE_DIR
=
$SIM_DIR
/
$NODE_NAME
EXE_DIR
=
$BUILD_DIR
/bin
CFG_DIR
=
$NODE_DIR
/cfg
...
...
tests/script/sh/deploy.sh
浏览文件 @
9ea0e2f7
#!/bin/sh
#!/bin/
ba
sh
echo
"Executing deploy.sh"
...
...
@@ -31,10 +31,19 @@ cd $SCRIPT_DIR/../
SCRIPT_DIR
=
`
pwd
`
echo
"SCRIPT_DIR:
$SCRIPT_DIR
"
cd
../../
TDINTERNAL
=
"TDinternal"
if
[[
"
$SCRIPT_DIR
"
==
*
"
$TDINTERNAL
"
*
]]
;
then
cd
../../..
else
cd
../../
fi
TAOS_DIR
=
`
pwd
`
BUILD_DIR
=
$TAOS_DIR
/debug/build
BIN_DIR
=
`
find
.
-name
"taosd"
|grep bin|
cut
-d
'/'
--fields
=
2,3
`
BUILD_DIR
=
$TAOS_DIR
/
$BIN_DIR
SIM_DIR
=
$TAOS_DIR
/sim
NODE_DIR
=
$SIM_DIR
/
$NODE_NAME
...
...
tests/script/sh/exec.sh
浏览文件 @
9ea0e2f7
#!/bin/sh
#!/bin/
ba
sh
# if [ $# != 4 || $# != 5 ]; then
# echo "argument list need input : "
...
...
@@ -42,10 +42,19 @@ SCRIPT_DIR=`dirname $0`
cd
$SCRIPT_DIR
/../
SCRIPT_DIR
=
`
pwd
`
cd
../../
TDINTERNAL
=
"TDinternal"
if
[[
"
$SCRIPT_DIR
"
==
*
"
$TDINTERNAL
"
*
]]
;
then
cd
../../..
else
cd
../../
fi
TAOS_DIR
=
`
pwd
`
BUILD_DIR
=
$TAOS_DIR
/debug/build
BIN_DIR
=
`
find
.
-name
"taosd"
|grep bin|
cut
-d
'/'
--fields
=
2,3
`
BUILD_DIR
=
$TAOS_DIR
/
$BIN_DIR
SIM_DIR
=
$TAOS_DIR
/sim
NODE_DIR
=
$SIM_DIR
/
$NODE_NAME
EXE_DIR
=
$BUILD_DIR
/bin
...
...
@@ -86,9 +95,9 @@ else
if
[
-n
"
$PID
"
]
;
then
if
[
"
$SIGNAL
"
=
"SIGINT"
]
;
then
echo
killed by signal
sudo
kill
-sigint
$PID
kill
-sigint
$PID
else
sudo
kill
-9
$PID
kill
-9
$PID
fi
fi
fi
...
...
tests/script/sh/exec_tarbitrator.sh
浏览文件 @
9ea0e2f7
...
...
@@ -39,10 +39,19 @@ SCRIPT_DIR=`dirname $0`
cd
$SCRIPT_DIR
/../
SCRIPT_DIR
=
`
pwd
`
cd
../../
TDINTERNAL
=
"TDinternal"
if
[[
"
$SCRIPT_DIR
"
==
*
"
$TDINTERNAL
"
*
]]
;
then
cd
../../..
else
cd
../../
fi
TAOS_DIR
=
`
pwd
`
BUILD_DIR
=
$TAOS_DIR
/../debug/build
BIN_DIR
=
`
find
.
-name
"taosd"
|grep bin|
cut
-d
'/'
--fields
=
2,3
`
BUILD_DIR
=
$TAOS_DIR
/
$BIN_DIR
SIM_DIR
=
$TAOS_DIR
/sim
NODE_DIR
=
$SIM_DIR
/arbitrator
EXE_DIR
=
$BUILD_DIR
/bin
...
...
@@ -57,8 +66,8 @@ else
#relative path
PID
=
`
ps
-ef
|grep tarbitrator |
grep
-v
grep
|
awk
'{print $2}'
`
if
[
-n
"
$PID
"
]
;
then
sudo
kill
-9
$PID
sudo
pkill
-9
tarbitrator
kill
-9
$PID
pkill
-9
tarbitrator
fi
fi
tests/script/sh/exec_up.sh
浏览文件 @
9ea0e2f7
...
...
@@ -42,10 +42,19 @@ SCRIPT_DIR=`dirname $0`
cd
$SCRIPT_DIR
/../
SCRIPT_DIR
=
`
pwd
`
cd
../../
TDINTERNAL
=
"TDinternal"
if
[[
"
$SCRIPT_DIR
"
==
*
"
$TDINTERNAL
"
*
]]
;
then
cd
../../..
else
cd
../../
fi
TAOS_DIR
=
`
pwd
`
BUILD_DIR
=
$TAOS_DIR
/../debug/build
BIN_DIR
=
`
find
.
-name
"taosd"
|grep bin|
cut
-d
'/'
--fields
=
2,3
`
BUILD_DIR
=
$TAOS_DIR
/
$BIN_DIR
SIM_DIR
=
$TAOS_DIR
/sim
NODE_DIR
=
$SIM_DIR
/
$NODE_NAME
EXE_DIR
=
$BUILD_DIR
/bin
...
...
@@ -91,9 +100,9 @@ else
if
[
-n
"
$PID
"
]
;
then
if
[
"
$SIGNAL
"
=
"SIGINT"
]
;
then
echo
killed by signal
sudo
kill
-sigint
$PID
kill
-sigint
$PID
else
sudo
kill
-9
$PID
kill
-9
$PID
fi
fi
fi
...
...
tests/script/test.sh
浏览文件 @
9ea0e2f7
...
...
@@ -40,9 +40,20 @@ cd .
# Get responsible directories
CODE_DIR
=
`
dirname
$0
`
CODE_DIR
=
`
pwd
`
cd
../../
TDINTERNAL
=
"TDinternal"
if
[[
"
$CODE_DIR
"
==
*
"
$TDINTERNAL
"
*
]]
;
then
cd
../../..
else
cd
../../
fi
TOP_DIR
=
`
pwd
`
BUILD_DIR
=
$TOP_DIR
/debug/build
BIN_DIR
=
`
find
.
-name
"taosd"
|grep bin|
cut
-d
'/'
--fields
=
2,3
`
BUILD_DIR
=
$TOP_DIR
/
$BIN_DIR
SIM_DIR
=
$TOP_DIR
/sim
if
[
$ASYNC
-eq
0
]
;
then
...
...
@@ -51,11 +62,6 @@ else
PROGRAM
=
"
$BUILD_DIR
/bin/tsim -a"
fi
if
[
$UNIQUE
-eq
0
]
;
then
PROGRAM
=
$BUILD_DIR
/bin/tsim
else
PROGRAM
=
"
$TOP_DIR
/../debug/build/bin/tsim"
fi
PRG_DIR
=
$SIM_DIR
/tsim
CFG_DIR
=
$PRG_DIR
/cfg
...
...
tests/test-all.sh
浏览文件 @
9ea0e2f7
...
...
@@ -9,10 +9,10 @@ NC='\033[0m'
echo
"### run TSIM script ###"
cd
script
./test.sh
-f
basicSuite.sim 2>&1 |
grep
'success\|failed\|fault'
|
grep
-v
'default'
|
tee
out.
txt
./test.sh
-f
basicSuite.sim 2>&1 |
grep
'success\|failed\|fault'
|
grep
-v
'default'
|
tee
out.
log
totalSuccess
=
`
grep
'success'
out.
txt
|
wc
-l
`
totalBasic
=
`
grep
success out.
txt
|
grep
Suite |
wc
-l
`
totalSuccess
=
`
grep
'success'
out.
log
|
wc
-l
`
totalBasic
=
`
grep
success out.
log
|
grep
Suite |
wc
-l
`
if
[
"
$totalSuccess
"
-gt
"0"
]
;
then
totalSuccess
=
`
expr
$totalSuccess
-
$totalBasic
`
...
...
@@ -20,7 +20,7 @@ fi
echo
-e
"
${
GREEN
}
### Total
$totalSuccess
TSIM case(s) succeed! ###
${
NC
}
"
totalFailed
=
`
grep
'failed\|fault'
out.
txt
|
wc
-l
`
totalFailed
=
`
grep
'failed\|fault'
out.
log
|
wc
-l
`
# echo -e "${RED} ### Total $totalFailed TSIM case(s) failed! ### ${NC}"
if
[
"
$totalFailed
"
-ne
"0"
]
;
then
...
...
@@ -33,17 +33,17 @@ echo "### run Python script ###"
cd
../pytest
if
[
"
$1
"
==
"cron"
]
;
then
./fulltest.sh 2>&1 |
grep
'successfully executed\|failed\|fault'
|
grep
-v
'default'
|
tee
pytest-out.
txt
./fulltest.sh 2>&1 |
grep
'successfully executed\|failed\|fault'
|
grep
-v
'default'
|
tee
pytest-out.
log
else
./smoketest.sh 2>&1 |
grep
'successfully executed\|failed\|fault'
|
grep
-v
'default'
|
tee
pytest-out.
txt
./smoketest.sh 2>&1 |
grep
'successfully executed\|failed\|fault'
|
grep
-v
'default'
|
tee
pytest-out.
log
fi
totalPySuccess
=
`
grep
'successfully executed'
pytest-out.
txt
|
wc
-l
`
totalPySuccess
=
`
grep
'successfully executed'
pytest-out.
log
|
wc
-l
`
if
[
"
$totalPySuccess
"
-gt
"0"
]
;
then
echo
-e
"
${
GREEN
}
### Total
$totalPySuccess
python case(s) succeed! ###
${
NC
}
"
fi
totalPyFailed
=
`
grep
'failed\|fault'
pytest-out.
txt
|
wc
-l
`
totalPyFailed
=
`
grep
'failed\|fault'
pytest-out.
log
|
wc
-l
`
if
[
"
$totalPyFailed
"
-ne
"0"
]
;
then
echo
-e
"
${
RED
}
### Total
$totalPyFailed
python case(s) failed! ###
${
NC
}
"
# exit $totalPyFailed
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录