Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
1e9bca79
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看板
提交
1e9bca79
编写于
5月 05, 2023
作者:
P
Ping Xiao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update crash gen push message
上级
a16ca94e
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
32 addition
and
38 deletion
+32
-38
tests/pytest/auto_crash_gen.py
tests/pytest/auto_crash_gen.py
+12
-14
tests/pytest/auto_crash_gen_valgrind.py
tests/pytest/auto_crash_gen_valgrind.py
+9
-11
tests/pytest/auto_crash_gen_valgrind_cluster.py
tests/pytest/auto_crash_gen_valgrind_cluster.py
+11
-13
未找到文件。
tests/pytest/auto_crash_gen.py
浏览文件 @
1e9bca79
import
datetime
import
os
import
socket
import
requests
...
...
@@ -238,17 +239,7 @@ def start_taosd():
start_cmd
=
'cd %s && python3 test.py >>/dev/null '
%
(
start_path
)
os
.
system
(
start_cmd
)
def
get_cmds
(
args_list
):
# build_path = get_path()
# if repo == "community":
# crash_gen_path = build_path[:-5]+"community/tests/pytest/"
# elif repo == "TDengine":
# crash_gen_path = build_path[:-5]+"/tests/pytest/"
# else:
# pass
# crash_gen_cmd = 'cd %s && ./crash_gen.sh --valgrind -p -t 10 -s 1000 -g 0x32c,0x32d,0x3d3,0x18,0x2501,0x369,0x388,0x061a,0x2550 '%(crash_gen_path)
def
get_cmds
(
args_list
):
crash_gen_cmd
=
get_auto_mix_cmds
(
args_list
,
valgrind
=
valgrind_mode
)
return
crash_gen_cmd
...
...
@@ -295,7 +286,7 @@ def check_status():
elif
"Crash_Gen is now exiting with status code: 0"
in
run_code
:
return
0
else
:
return
2
return
2
def
main
():
...
...
@@ -310,7 +301,7 @@ def main():
build_path
=
get_path
()
os
.
system
(
"pip install git+https://github.com/taosdata/taos-connector-python.git"
)
if
repo
==
"community"
:
crash_gen_path
=
build_path
[:
-
5
]
+
"community/tests/pytest/"
elif
repo
==
"TDengine"
:
...
...
@@ -334,7 +325,9 @@ def main():
if
not
os
.
path
.
exists
(
run_dir
):
os
.
mkdir
(
run_dir
)
print
(
crash_cmds
)
starttime
=
datetime
.
datetime
.
now
()
run_crash_gen
(
crash_cmds
)
endtime
=
datetime
.
datetime
.
now
()
status
=
check_status
()
print
(
"exit status : "
,
status
)
...
...
@@ -349,7 +342,12 @@ def main():
print
(
'======== crash_gen run sucess and exit as expected ========'
)
try
:
text
=
f
"crash_gen instance exit status of docker [
{
hostname
}
] is :
{
msg_dict
[
status
]
}
\n
"
+
f
" and git commit :
{
git_commit
}
"
text
=
f
'''exit status:
{
msg_dict
[
status
]
}
git commit :
{
git_commit
}
hostname:
{
hostname
}
start time:
{
starttime
}
end time:
{
endtime
}
cmd:
{
crash_cmds
}
'''
send_msg
(
get_msg
(
text
))
except
Exception
as
e
:
print
(
"exception:"
,
e
)
...
...
tests/pytest/auto_crash_gen_valgrind.py
浏览文件 @
1e9bca79
#!/usr/bin/python3
import
datetime
import
os
import
socket
import
requests
...
...
@@ -241,15 +242,6 @@ def start_taosd():
os
.
system
(
start_cmd
+
">>/dev/null"
)
def
get_cmds
(
args_list
):
# build_path = get_path()
# if repo == "community":
# crash_gen_path = build_path[:-5]+"community/tests/pytest/"
# elif repo == "TDengine":
# crash_gen_path = build_path[:-5]+"/tests/pytest/"
# else:
# pass
# crash_gen_cmd = 'cd %s && ./crash_gen.sh --valgrind -p -t 10 -s 1000 -g 0x32c,0x32d,0x3d3,0x18,0x2501,0x369,0x388,0x061a,0x2550 '%(crash_gen_path)
crash_gen_cmd
=
get_auto_mix_cmds
(
args_list
,
valgrind
=
valgrind_mode
)
return
crash_gen_cmd
...
...
@@ -343,7 +335,6 @@ def main():
args
=
limits
(
args
)
build_path
=
get_path
()
os
.
system
(
"pip install git+https://github.com/taosdata/taos-connector-python.git >>/dev/null"
)
if
repo
==
"community"
:
crash_gen_path
=
build_path
[:
-
5
]
+
"community/tests/pytest/"
elif
repo
==
"TDengine"
:
...
...
@@ -368,7 +359,9 @@ def main():
if
not
os
.
path
.
exists
(
run_dir
):
os
.
mkdir
(
run_dir
)
print
(
crash_cmds
)
starttime
=
datetime
.
datetime
.
now
()
run_crash_gen
(
crash_cmds
)
endtime
=
datetime
.
datetime
.
now
()
status
=
check_status
()
# back_path = os.path.join(core_path,"valgrind_report")
...
...
@@ -384,7 +377,12 @@ def main():
print
(
'======== crash_gen run sucess and exit as expected ========'
)
try
:
text
=
f
"crash_gen instance exit status of docker [
{
hostname
}
] is :
{
msg_dict
[
status
]
}
\n
"
+
f
" and git commit :
{
git_commit
}
"
text
=
f
'''exit status:
{
msg_dict
[
status
]
}
git commit :
{
git_commit
}
hostname:
{
hostname
}
start time:
{
starttime
}
end time:
{
endtime
}
cmd:
{
crash_cmds
}
'''
send_msg
(
get_msg
(
text
))
except
Exception
as
e
:
print
(
"exception:"
,
e
)
...
...
tests/pytest/auto_crash_gen_valgrind_cluster.py
浏览文件 @
1e9bca79
#!/usr/bin/python3
import
datetime
import
os
import
socket
import
requests
...
...
@@ -241,16 +242,7 @@ def start_taosd():
os
.
system
(
start_cmd
+
">>/dev/null"
)
def
get_cmds
(
args_list
):
# build_path = get_path()
# if repo == "community":
# crash_gen_path = build_path[:-5]+"community/tests/pytest/"
# elif repo == "TDengine":
# crash_gen_path = build_path[:-5]+"/tests/pytest/"
# else:
# pass
# crash_gen_cmd = 'cd %s && ./crash_gen.sh --valgrind -p -t 10 -s 1000 -g 0x32c,0x32d,0x3d3,0x18,0x2501,0x369,0x388,0x061a,0x2550 '%(crash_gen_path)
crash_gen_cmd
=
get_auto_mix_cmds
(
args_list
,
valgrind
=
valgrind_mode
)
return
crash_gen_cmd
...
...
@@ -342,8 +334,7 @@ def main():
args
=
random_args
(
args_list
)
args
=
limits
(
args
)
build_path
=
get_path
()
os
.
system
(
"pip install git+https://github.com/taosdata/taos-connector-python.git >>/dev/null"
)
build_path
=
get_path
()
if
repo
==
"community"
:
crash_gen_path
=
build_path
[:
-
5
]
+
"community/tests/pytest/"
elif
repo
==
"TDengine"
:
...
...
@@ -368,7 +359,9 @@ def main():
if
not
os
.
path
.
exists
(
run_dir
):
os
.
mkdir
(
run_dir
)
print
(
crash_cmds
)
starttime
=
datetime
.
datetime
.
now
()
run_crash_gen
(
crash_cmds
)
endtime
=
datetime
.
datetime
.
now
()
status
=
check_status
()
# back_path = os.path.join(core_path,"valgrind_report")
...
...
@@ -384,7 +377,12 @@ def main():
print
(
'======== crash_gen run sucess and exit as expected ========'
)
try
:
text
=
f
"crash_gen instance exit status of docker [
{
hostname
}
] is :
{
msg_dict
[
status
]
}
\n
"
+
f
" and git commit :
{
git_commit
}
"
text
=
f
'''exit status:
{
msg_dict
[
status
]
}
git commit :
{
git_commit
}
hostname:
{
hostname
}
start time:
{
starttime
}
end time:
{
endtime
}
cmd:
{
crash_cmds
}
'''
send_msg
(
get_msg
(
text
))
except
Exception
as
e
:
print
(
"exception:"
,
e
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录