Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
fa6e18e2
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22017
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
fa6e18e2
编写于
4月 15, 2022
作者:
P
plum-lihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[test: support valgrind run all sim cases, and save valgrind log file]
上级
3fad3b68
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
70 addition
and
9 deletion
+70
-9
tests/script/runAllSimCases.sh
tests/script/runAllSimCases.sh
+63
-3
tests/script/sh/exec.sh
tests/script/sh/exec.sh
+5
-4
tests/script/test.sh
tests/script/test.sh
+1
-1
tests/script/tsim/insert/basic0.sim
tests/script/tsim/insert/basic0.sim
+1
-1
未找到文件。
tests/script/runAllSimCases.sh
浏览文件 @
fa6e18e2
#
!/bin/bash
!
/bin/bash
##################################################
#
...
...
@@ -8,13 +8,73 @@
set
-e
#set -x
VALGRIND
=
0
LOG_BK_DIR
=
/data/valgrind_log_backup
# 192.168.0.203
while
getopts
"v:r"
arg
do
case
$arg
in
v
)
VALGRIND
=
1
;;
r
)
LOG_BK_DIR
=
$(
echo
$OPTARG
)
;;
?
)
#unknow option
echo
"unkonw argument"
exit
1
;;
esac
done
echo
"VALGRIND:
$VALGRIND
, LOG_BK_DIR:
$LOG_BK_DIR
"
CURRENT_DIR
=
`
pwd
`
TSIM_LOG_DIR
=
$CURRENT_DIR
/../../sim/tsim/log
TAOSD_LOG_DIR
=
$CURRENT_DIR
/../../sim
echo
"tsim log dir:
$TSIM_LOG_DIR
"
echo
"taosd log dir:
$TAOSD_LOG_DIR
"
if
[[
$VALGRIND
-eq
1
]]
;
then
if
[
-d
${
LOG_BK_DIR
}
]
;
then
rm
-rf
${
LOG_BK_DIR
}
/
*
else
mkdir
-p
$LOG_BK_DIR
/
fi
fi
while
read
line
do
firstChar
=
`
echo
${
line
:0:1
}
`
if
[[
-n
"
$line
"
]]
&&
[[
$firstChar
!=
"#"
]]
;
then
echo
"========
$line
========"
$line
if
[[
$VALGRIND
-eq
1
]]
;
then
echo
"========
$line
-v ========"
$line
-v
# move all valgrind log files of the sim case to valgrind back dir
# get current sim case name for
result
=
`
echo
${
line
%sim*
}
`
result
=
`
echo
${
result
#*/
}
`
result
=
`
echo
${
result
#*/
}
`
result
=
`
echo
${
result
////-
}
`
tsimLogFile
=
valgrind-
${
result
}
sim.log
echo
"cp
${
TSIM_LOG_DIR
}
/valgrind-tsim.log
${
LOG_BK_DIR
}
/
${
tsimLogFile
}
"
cp
${
TSIM_LOG_DIR
}
/valgrind-tsim.log
${
LOG_BK_DIR
}
/
${
tsimLogFile
}
cp
${
TAOSD_LOG_DIR
}
/dnode1/log/valgrind
*
.log
${
LOG_BK_DIR
}
/
||
:
cp
${
TAOSD_LOG_DIR
}
/dnode2/log/valgrind
*
.log
${
LOG_BK_DIR
}
/
||
:
cp
${
TAOSD_LOG_DIR
}
/dnode3/log/valgrind
*
.log
${
LOG_BK_DIR
}
/
||
:
cp
${
TAOSD_LOG_DIR
}
/dnode4/log/valgrind
*
.log
${
LOG_BK_DIR
}
/
||
:
cp
${
TAOSD_LOG_DIR
}
/dnode5/log/valgrind
*
.log
${
LOG_BK_DIR
}
/
||
:
cp
${
TAOSD_LOG_DIR
}
/dnode6/log/valgrind
*
.log
${
LOG_BK_DIR
}
/
||
:
cp
${
TAOSD_LOG_DIR
}
/dnode7/log/valgrind
*
.log
${
LOG_BK_DIR
}
/
||
:
cp
${
TAOSD_LOG_DIR
}
/dnode8/log/valgrind
*
.log
${
LOG_BK_DIR
}
/
||
:
cp
${
TAOSD_LOG_DIR
}
/dnode9/log/valgrind
*
.log
${
LOG_BK_DIR
}
/
||
:
else
echo
"========
$line
========"
$line
fi
fi
done
< ./jenkins/basic.txt
...
...
tests/script/sh/exec.sh
浏览文件 @
fa6e18e2
...
...
@@ -97,13 +97,14 @@ if [ "$CLEAR_OPTION" = "clear" ]; then
fi
if
[
"
$EXEC_OPTON
"
=
"start"
]
;
then
echo
"ExcuteCmd:"
$EXE_DIR
/taosd
-c
$CFG_DIR
#echo "ExcuteCmd:" $EXE_DIR/taosd -c $CFG_DIR
if
[
"
$VALGRIND_OPTION
"
=
"true"
]
;
then
TT
=
`
date
+%s
`
mkdir
${
LOG_DIR
}
/
${
TT
}
nohup
valgrind
--log-file
=
${
LOG_DIR
}
/
${
TT
}
/valgrind.log
--tool
=
memcheck
--leak-check
=
full
--show-reachable
=
no
--track-origins
=
yes
--show-leak-kinds
=
all
-v
--workaround-gcc296-bugs
=
yes
$EXE_DIR
/taosd
-c
$CFG_DIR
>
/dev/null 2>&1 &
#mkdir ${LOG_DIR}/${TT}
echo
"nohup valgrind --log-file=
${
LOG_DIR
}
/valgrind-taosd-
${
TT
}
.log --tool=memcheck --leak-check=full --show-reachable=no --track-origins=yes --show-leak-kinds=all -v --workaround-gcc296-bugs=yes
$EXE_DIR
/taosd -c
$CFG_DIR
> /dev/null 2>&1 &"
nohup
valgrind
--log-file
=
${
LOG_DIR
}
/valgrind-taosd-
${
TT
}
.log
--tool
=
memcheck
--leak-check
=
full
--show-reachable
=
no
--track-origins
=
yes
--show-leak-kinds
=
all
-v
--workaround-gcc296-bugs
=
yes
$EXE_DIR
/taosd
-c
$CFG_DIR
>
/dev/null 2>&1 &
else
echo
"nohup
$EXE_DIR
/taosd -c
$CFG_DIR
> /dev/null 2>&1 &"
nohup
$EXE_DIR
/taosd
-c
$CFG_DIR
>
/dev/null 2>&1 &
fi
...
...
tests/script/test.sh
浏览文件 @
fa6e18e2
...
...
@@ -126,7 +126,7 @@ if [ -n "$FILE_NAME" ]; then
echo
"------------------------------------------------------------------------"
if
[
$VALGRIND
-eq
1
]
;
then
echo
valgrind
--tool
=
memcheck
--leak-check
=
full
--show-reachable
=
no
--track-origins
=
yes
--show-leak-kinds
=
all
-v
--workaround-gcc296-bugs
=
yes
--log-file
=
${
CODE_DIR
}
/../script/valgrind.log
$PROGRAM
-c
$CFG_DIR
-f
$FILE_NAME
-v
valgrind
--tool
=
memcheck
--leak-check
=
full
--show-reachable
=
no
--track-origins
=
yes
--show-leak-kinds
=
all
-v
--workaround-gcc296-bugs
=
yes
--log-file
=
${
CODE_DIR
}
/../script/valgrind
.log
$PROGRAM
-c
$CFG_DIR
-f
$FILE_NAME
-v
valgrind
--tool
=
memcheck
--leak-check
=
full
--show-reachable
=
no
--track-origins
=
yes
--show-leak-kinds
=
all
-v
--workaround-gcc296-bugs
=
yes
--log-file
=
${
LOG_DIR
}
/valgrind-tsim
.log
$PROGRAM
-c
$CFG_DIR
-f
$FILE_NAME
-v
else
if
[[
$MULTIPROCESS
-eq
1
]]
;
then
echo
"ExcuteCmd(multiprocess):"
$PROGRAM
-m
-c
$CFG_DIR
-f
$FILE_NAME
...
...
tests/script/tsim/insert/basic0.sim
浏览文件 @
fa6e18e2
...
...
@@ -537,4 +537,4 @@ endi
#endi
#
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s stop -x SIGINT
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录