Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
~笨蛋陪你哭
TDengine
提交
416859c0
T
TDengine
项目概览
~笨蛋陪你哭
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
416859c0
编写于
8月 05, 2020
作者:
S
Shuduo Sang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update coverage test script.
上级
a5261db4
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
28 addition
and
15 deletion
+28
-15
tests/perftest-scripts/coverage_test.sh
tests/perftest-scripts/coverage_test.sh
+16
-10
tests/perftest-scripts/tdinternal_coverage_test.sh
tests/perftest-scripts/tdinternal_coverage_test.sh
+12
-5
未找到文件。
tests/perftest-scripts/coverage_test.sh
浏览文件 @
416859c0
...
@@ -32,7 +32,14 @@ function buildTDengine {
...
@@ -32,7 +32,14 @@ function buildTDengine {
echo
"repo need to pull"
echo
"repo need to pull"
git reset
--hard
git reset
--hard
git pull
git pull
fi
[
-d
$TDENGINE_DIR
/debug
]
||
mkdir
$TDENGINE_DIR
/debug
cd
$TDENGINE_DIR
/debug
[
-f
$TDENGINE_DIR
/debug/build/bin/taosd
]
||
need_rebuild
=
true
if
$need_rebuild
;
then
echo
"rebuild.."
LOCAL_COMMIT
=
`
git rev-parse
--short
@
`
LOCAL_COMMIT
=
`
git rev-parse
--short
@
`
rm
-rf
*
rm
-rf
*
...
@@ -46,10 +53,9 @@ function buildTDengine {
...
@@ -46,10 +53,9 @@ function buildTDengine {
function
runGeneralCaseOneByOne
{
function
runGeneralCaseOneByOne
{
while
read
-r
line
;
do
while
read
-r
line
;
do
if
[[
$line
=
~ ^./test.sh
*
]]
;
then
if
[[
$line
=
~ ^./test.sh
*
]]
;
then
general_case
=
`
echo
$line
|
grep
-w
general
`
case
=
`
echo
$line
|
grep
-w
"general
\|
unique
\/
mnode
\/
mgmt33.sim
\|
unique
\/
stable
\/
dnode3.sim
\|
unique
\/
cluster
\/
balance3.sim
\|
unique
\/
arbitrator
\/
offline_replica2_alterTable_online.sim"
|awk
'{print $NF}'
`
if
[
-n
"
$general_case
"
]
;
then
if
[
-n
"
$case
"
]
;
then
case
=
`
echo
$line
|grep general|
awk
'{print $NF}'
`
./test.sh
-f
$case
>
/dev/null 2>&1
&&
\
./test.sh
-f
$case
>
/dev/null 2>&1
&&
\
echo
-e
"
${
GREEN
}
$case
success
${
NC
}
"
|
tee
-a
$TDENGINE_COVERAGE_REPORT
||
\
echo
-e
"
${
GREEN
}
$case
success
${
NC
}
"
|
tee
-a
$TDENGINE_COVERAGE_REPORT
||
\
echo
-e
"
${
RED
}
$case
failed
${
NC
}
"
|
tee
-a
$TDENGINE_COVERAGE_REPORT
echo
-e
"
${
RED
}
$case
failed
${
NC
}
"
|
tee
-a
$TDENGINE_COVERAGE_REPORT
...
@@ -90,14 +96,14 @@ function runTest {
...
@@ -90,14 +96,14 @@ function runTest {
sleep
10
sleep
10
cd
$TDENGINE_DIR
/src/connector/jdbc
cd
$TDENGINE_DIR
/src/connector/jdbc
mvn clean package
mvn clean package
>
/dev/null 2>&1
mvn
test
|
tee
-a
$TDENGINE_COVERAGE_REPORT
mvn
test
>
/dev/null 2>&1
|
tee
-a
$TDENGINE_COVERAGE_REPORT
# Test C Demo
# Test C Demo
stopTaosd
stopTaosd
$TDENGINE_DIR
/debug/build/bin/taosd
-c
$TDENGINE_DIR
/debug/test/cfg
>
/dev/null &
$TDENGINE_DIR
/debug/build/bin/taosd
-c
$TDENGINE_DIR
/debug/test/cfg
>
/dev/null &
sleep
10
sleep
10
yes
|
$TDENGINE_DIR
/debug/build/bin/demo 127.0.0.1
|
tee
-a
$TDENGINE_COVERAGE_REPORT
yes
|
$TDENGINE_DIR
/debug/build/bin/demo 127.0.0.1
>
/dev/null 2>&1
|
tee
-a
$TDENGINE_COVERAGE_REPORT
# Test waltest
# Test waltest
dataDir
=
`
grep
dataDir
$TDENGINE_DIR
/debug/test/cfg/taos.cfg|awk
'{print $2}'
`
dataDir
=
`
grep
dataDir
$TDENGINE_DIR
/debug/test/cfg/taos.cfg|awk
'{print $2}'
`
...
@@ -105,14 +111,14 @@ function runTest {
...
@@ -105,14 +111,14 @@ function runTest {
echo
"dataDir:
$dataDir
"
|
tee
-a
$TDENGINE_COVERAGE_REPORT
echo
"dataDir:
$dataDir
"
|
tee
-a
$TDENGINE_COVERAGE_REPORT
echo
"walDir:
$walDir
"
|
tee
-a
$TDENGINE_COVERAGE_REPORT
echo
"walDir:
$walDir
"
|
tee
-a
$TDENGINE_COVERAGE_REPORT
if
[
-n
"
$walDir
"
]
;
then
if
[
-n
"
$walDir
"
]
;
then
yes
|
$TDENGINE_DIR
/debug/build/bin/waltest
-p
$walDir
|
tee
-a
$TDENGINE_COVERAGE_REPORT
yes
|
$TDENGINE_DIR
/debug/build/bin/waltest
-p
$walDir
>
dev/null 2>&1
|
tee
-a
$TDENGINE_COVERAGE_REPORT
fi
fi
# run Unit Test
# run Unit Test
echo
"Run Unit Test: utilTest, queryTest and cliTest"
echo
"Run Unit Test: utilTest, queryTest and cliTest"
$TDENGINE_DIR
/debug/build/bin/utilTest
>
/dev/null
&&
echo
"utilTest pass!"
||
echo
"utilTest failed!"
$TDENGINE_DIR
/debug/build/bin/utilTest
>
/dev/null
2>&1
&&
echo
"utilTest pass!"
||
echo
"utilTest failed!"
$TDENGINE_DIR
/debug/build/bin/queryTest
>
/dev/null
&&
echo
"queryTest pass!"
||
echo
"queryTest failed!"
$TDENGINE_DIR
/debug/build/bin/queryTest
>
/dev/null
2>&1
&&
echo
"queryTest pass!"
||
echo
"queryTest failed!"
$TDENGINE_DIR
/debug/build/bin/cliTest
>
/dev/null
&&
echo
"cliTest pass!"
||
echo
"cliTest failed!"
$TDENGINE_DIR
/debug/build/bin/cliTest
>
/dev/null
2>&1
&&
echo
"cliTest pass!"
||
echo
"cliTest failed!"
stopTaosd
stopTaosd
}
}
...
...
tests/perftest-scripts/tdinternal_coverage_test.sh
浏览文件 @
416859c0
...
@@ -100,23 +100,30 @@ function runTest {
...
@@ -100,23 +100,30 @@ function runTest {
sleep
10
sleep
10
cd
$TDINTERNAL_DIR
/community/src/connector/jdbc
cd
$TDINTERNAL_DIR
/community/src/connector/jdbc
mvn clean package
mvn clean package
>
/dev/null
mvn
test
|
tee
-a
$TDINTERNAL_COVERAGE_REPORT
mvn
test
>
/dev/null
|
tee
-a
$TDINTERNAL_COVERAGE_REPORT
# Test C Demo
# Test C Demo
stopTaosd
stopTaosd
$TDINTERNAL_DIR
/debug/build/bin/taosd
-c
$TDINTERNAL_DIR
/debug/test/cfg
>
/dev/null &
$TDINTERNAL_DIR
/debug/build/bin/taosd
-c
$TDINTERNAL_DIR
/debug/test/cfg
>
/dev/null &
sleep
10
sleep
10
yes
|
$TDINTERNAL_DIR
/debug/build/bin/demo 127.0.0.1
|
tee
-a
$TDINTERNAL_COVERAGE_REPORT
yes
|
$TDINTERNAL_DIR
/debug/build/bin/demo 127.0.0.1
>
/dev/null
|
tee
-a
$TDINTERNAL_COVERAGE_REPORT
# Test waltest
# Test waltest
dataDir
=
`
grep
dataDir
$TDINTERNAL_DIR
/debug/test/cfg/taos.cfg|awk
'{print $2}'
`
dataDir
=
`
grep
dataDir
$TDINTERNAL_DIR
/debug/test/cfg/taos.cfg|awk
'{print $2}'
`
walDir
=
`
find
$dataDir
-name
"wal"
|head
-n1
`
walDir
=
`
find
$dataDir
-name
"wal"
|head
-n1
`
echo
"dataDir:
$dataDir
\n
walDir:
$walDir
"
|
tee
-a
$TDINTERNAL_COVERAGE_REPORT
echo
"dataDir:
$dataDir
"
|
tee
-a
$TDINTERNAL_COVERAGE_REPORT
echo
"walDir:
$walDir
"
|
tee
-a
$TDINTERNAL_COVERAGE_REPORT
if
[
-n
"
$walDir
"
]
;
then
if
[
-n
"
$walDir
"
]
;
then
yes
|
$TDINTERNAL_DIR
/debug/build/bin/waltest
-p
$walDir
|
tee
-a
$TDINTERNAL_COVERAGE_REPORT
yes
|
$TDINTERNAL_DIR
/debug/build/bin/waltest
-p
$walDir
>
/dev/null
|
tee
-a
$TDINTERNAL_COVERAGE_REPORT
fi
fi
# run Unit Test
echo
"Run Unit Test: utilTest, queryTest and cliTest"
$TDINTERNAL_DIR
/debug/build/bin/utilTest
>
/dev/null 2>&1
&&
echo
"utilTest pass!"
||
echo
"utilTest failed!"
$TDINTERNAL_DIR
/debug/build/bin/queryTest
>
/dev/null 2>&1
&&
echo
"queryTest pass!"
||
echo
"queryTest failed!"
$TDINTERNAL_DIR
/debug/build/bin/cliTest
>
/dev/null 2>&1
&&
echo
"cliTest pass!"
||
echo
"cliTest failed!"
stopTaosd
stopTaosd
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录