Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
35dbb2c9
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
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看板
提交
35dbb2c9
编写于
6月 09, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/3.0' into fix/dnode
上级
74ced4e0
d71e160c
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
66 addition
and
15 deletion
+66
-15
source/libs/function/src/builtins.c
source/libs/function/src/builtins.c
+47
-0
tests/pytest/util/dnodes.py
tests/pytest/util/dnodes.py
+1
-2
tests/system-test/fulltest.bat
tests/system-test/fulltest.bat
+4
-4
tests/system-test/test-all.bat
tests/system-test/test-all.bat
+14
-9
未找到文件。
source/libs/function/src/builtins.c
浏览文件 @
35dbb2c9
...
...
@@ -1045,6 +1045,22 @@ static int32_t translateCast(SFunctionNode* pFunc, char* pErrBuf, int32_t len) {
*
*/
static
bool
validateHourRange
(
int8_t
hour
)
{
if
(
hour
<
0
||
hour
>
12
)
{
return
false
;
}
return
true
;
}
static
bool
validateMinuteRange
(
int8_t
hour
,
int8_t
minute
,
char
sign
)
{
if
(
minute
==
0
||
(
minute
==
30
&&
(
hour
==
3
||
hour
==
5
)
&&
sign
==
'-'
))
{
return
true
;
}
return
false
;
}
static
bool
validateTimezoneFormat
(
const
SValueNode
*
pVal
)
{
if
(
TSDB_DATA_TYPE_BINARY
!=
pVal
->
node
.
resType
.
type
)
{
return
false
;
...
...
@@ -1053,6 +1069,8 @@ static bool validateTimezoneFormat(const SValueNode* pVal) {
char
*
tz
=
varDataVal
(
pVal
->
datum
.
p
);
int32_t
len
=
varDataLen
(
pVal
->
datum
.
p
);
char
buf
[
3
]
=
{
0
};
int8_t
hour
=
-
1
,
minute
=
-
1
;
if
(
len
==
0
)
{
return
false
;
}
else
if
(
len
==
1
&&
(
tz
[
0
]
==
'z'
||
tz
[
0
]
==
'Z'
))
{
...
...
@@ -1065,6 +1083,20 @@ static bool validateTimezoneFormat(const SValueNode* pVal) {
if
(
!
isdigit
(
tz
[
i
]))
{
return
false
;
}
if
(
i
==
2
)
{
memcpy
(
buf
,
&
tz
[
i
-
1
],
2
);
hour
=
taosStr2Int8
(
buf
,
NULL
,
10
);
if
(
!
validateHourRange
(
hour
))
{
return
false
;
}
}
else
if
(
i
==
4
)
{
memcpy
(
buf
,
&
tz
[
i
-
1
],
2
);
minute
=
taosStr2Int8
(
buf
,
NULL
,
10
);
if
(
!
validateMinuteRange
(
hour
,
minute
,
tz
[
0
]))
{
return
false
;
}
}
}
break
;
}
...
...
@@ -1076,9 +1108,24 @@ static bool validateTimezoneFormat(const SValueNode* pVal) {
}
continue
;
}
if
(
!
isdigit
(
tz
[
i
]))
{
return
false
;
}
if
(
i
==
2
)
{
memcpy
(
buf
,
&
tz
[
i
-
1
],
2
);
hour
=
taosStr2Int8
(
buf
,
NULL
,
10
);
if
(
!
validateHourRange
(
hour
))
{
return
false
;
}
}
else
if
(
i
==
5
)
{
memcpy
(
buf
,
&
tz
[
i
-
1
],
2
);
minute
=
taosStr2Int8
(
buf
,
NULL
,
10
);
if
(
!
validateMinuteRange
(
hour
,
minute
,
tz
[
0
]))
{
return
false
;
}
}
}
break
;
}
...
...
tests/pytest/util/dnodes.py
浏览文件 @
35dbb2c9
...
...
@@ -321,6 +321,7 @@ class TDDnode:
self
.
remoteExec
(
self
.
cfgDict
,
"tdDnodes.dnodes[%d].deployed=1
\n
tdDnodes.dnodes[%d].logDir=
\"
%%s/sim/dnode%%d/log
\"
%%(tdDnodes.dnodes[%d].path,%d)
\n
tdDnodes.dnodes[%d].cfgDir=
\"
%%s/sim/dnode%%d/cfg
\"
%%(tdDnodes.dnodes[%d].path,%d)
\n
tdDnodes.start(%d)"
%
(
self
.
index
-
1
,
self
.
index
-
1
,
self
.
index
-
1
,
self
.
index
,
self
.
index
-
1
,
self
.
index
-
1
,
self
.
index
,
self
.
index
))
self
.
running
=
1
else
:
os
.
system
(
"rm -rf %s/taosdlog.0"
%
self
.
logDir
)
if
os
.
system
(
cmd
)
!=
0
:
tdLog
.
exit
(
cmd
)
self
.
running
=
1
...
...
@@ -338,8 +339,6 @@ class TDDnode:
if
i
>
50
:
break
tailCmdStr
=
'tail -f '
if
platform
.
system
().
lower
()
==
'windows'
:
tailCmdStr
=
'tail -n +0 -f '
popen
=
subprocess
.
Popen
(
tailCmdStr
+
logFile
,
stdout
=
subprocess
.
PIPE
,
...
...
tests/system-test/fulltest.bat
浏览文件 @
35dbb2c9
python3
.\test.py
-f
0
-others
\taosShell.py
python3
.\test.py
-f
0
-others
\taosShellError.py
@REM
python3 .\test.py -f 0-others\taosShell.py
@REM
python3 .\test.py -f 0-others\taosShellError.py
python3
.\test.py
-f
0
-others
\taosShellNetChk.py
python3
.\test.py
-f
0
-others
\telemetry.py
@REM
python3 .\test.py -f 0-others\taosdMonitor.py
python3
.\test.py
-f
0
-others
\taosdMonitor.py
python3
.\test.py
-f
0
-others
\udfTest.py
python3
.\test.py
-f
0
-others
\udf_create.py
python3
.\test.py
-f
0
-others
\udf_restart_taosd.py
@REM
python3 .\test.py -f 0-others\udf_restart_taosd.py
@REM python3 .\test.py -f 0-others\cachelast.py
@REM python3 .\test.py -f 0-others\user_control.py
...
...
tests/system-test/test-all.bat
浏览文件 @
35dbb2c9
...
...
@@ -2,14 +2,7 @@
SETLOCAL
EnableDelayedExpansion
for
/F
"tokens=1,2 delims=#"
%%a
in
(
'"prompt #$H#$E# & echo on & for
%%b
in (1) do rem"'
)
do
(
set
"DEL=
%%a
"
)
set
/a
a
=
0
@REM echo Windows Taosd Test
@REM for /F "usebackq tokens=*" %%i in (fulltest.bat) do (
@REM echo Processing %%i
@REM set /a a+=1
@REM call %%i ARG1 > result_!a!.txt 2>error_!a!.txt
@REM if errorlevel 1 ( call :colorEcho 0c "failed" &echo. && exit 8 ) else ( call :colorEcho 0a "Success" &echo. )
@REM )
echo
Linux
Taosd
Test
echo
Windows
Taosd
Test
for
/F
"usebackq tokens=*"
%%i
in
(
fulltest
.bat
)
do
(
for
/f
"tokens=1* delims= "
%%a
in
(
"
%%i
"
)
do
if
not
"
%%a
"
==
"@REM"
(
echo
Processing
%%i
...
...
@@ -17,10 +10,22 @@ for /F "usebackq tokens=*" %%i in (fulltest.bat) do (
set
time1
=
!_timeTemp!
echo
Start
at
%time%
set
/a
a
+=
1
call
%%i
ARG1
-m
%
1
>
result_
!a!
.txt
2
>
error_
!a!
.txt
call
%%i
ARG1
>
result_
!a!
.txt
2
>
error_
!a!
.txt
if
errorlevel
1
(
call
:colorEcho
0
c
"failed"
&
echo
.
&&
echo
result
:
&&
cat
result_
!a!
.txt
&&
echo
error
:
&&
cat
error_
!a!
.txt
&&
exit
8
)
else
(
call
:colorEcho
0
a
"Success"
&
echo
.
)
)
)
@REM echo Linux Taosd Test
@REM for /F "usebackq tokens=*" %%i in (fulltest.bat) do (
@REM for /f "tokens=1* delims= " %%a in ("%%i") do if not "%%a" == "@REM" (
@REM echo Processing %%i
@REM call :GetTimeSeconds %time%
@REM set time1=!_timeTemp!
@REM echo Start at %time%
@REM set /a a+=1
@REM call %%i ARG1 -m %1 > result_!a!.txt 2>error_!a!.txt
@REM if errorlevel 1 ( call :colorEcho 0c "failed" &echo. && echo result: && cat result_!a!.txt && echo error: && cat error_!a!.txt && exit 8 ) else ( call :colorEcho 0a "Success" &echo. )
@REM )
@REM )
exit
:colorEcho
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录