Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
d95b7a3d
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1187
Star
22018
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看板
提交
d95b7a3d
编写于
6月 09, 2022
作者:
wafwerar
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(os): add win32 taosd case
上级
93d549e3
变更
34
显示空白变更内容
内联
并排
Showing
34 changed file
with
275 addition
and
300 deletion
+275
-300
source/libs/scalar/src/sclvector.c
source/libs/scalar/src/sclvector.c
+1
-1
source/os/src/osTime.c
source/os/src/osTime.c
+190
-243
tests/pytest/util/dnodes.py
tests/pytest/util/dnodes.py
+3
-0
tests/system-test/0-others/taosdlog.py
tests/system-test/0-others/taosdlog.py
+1
-1
tests/system-test/0-others/udf_cluster.py
tests/system-test/0-others/udf_cluster.py
+1
-1
tests/system-test/0-others/udf_create.py
tests/system-test/0-others/udf_create.py
+13
-11
tests/system-test/0-others/user_control.py
tests/system-test/0-others/user_control.py
+2
-1
tests/system-test/1-insert/insertWithMoreVgroup.py
tests/system-test/1-insert/insertWithMoreVgroup.py
+1
-1
tests/system-test/1-insert/mutipythonnodebugtaosd.py
tests/system-test/1-insert/mutipythonnodebugtaosd.py
+1
-1
tests/system-test/1-insert/test_stmt_insert_query_ex.py
tests/system-test/1-insert/test_stmt_insert_query_ex.py
+1
-1
tests/system-test/1-insert/test_stmt_muti_insert_query.py
tests/system-test/1-insert/test_stmt_muti_insert_query.py
+1
-1
tests/system-test/1-insert/test_stmt_set_tbname_tag.py
tests/system-test/1-insert/test_stmt_set_tbname_tag.py
+1
-1
tests/system-test/2-query/histogram.py
tests/system-test/2-query/histogram.py
+1
-1
tests/system-test/2-query/timezone.py
tests/system-test/2-query/timezone.py
+15
-9
tests/system-test/7-tmq/basic5.py
tests/system-test/7-tmq/basic5.py
+19
-4
tests/system-test/7-tmq/db.py
tests/system-test/7-tmq/db.py
+1
-1
tests/system-test/7-tmq/schema.py
tests/system-test/7-tmq/schema.py
+1
-1
tests/system-test/7-tmq/subscribeDb.py
tests/system-test/7-tmq/subscribeDb.py
+1
-1
tests/system-test/7-tmq/subscribeDb0.py
tests/system-test/7-tmq/subscribeDb0.py
+1
-1
tests/system-test/7-tmq/subscribeDb1.py
tests/system-test/7-tmq/subscribeDb1.py
+1
-1
tests/system-test/7-tmq/subscribeStb.py
tests/system-test/7-tmq/subscribeStb.py
+1
-1
tests/system-test/7-tmq/subscribeStb0.py
tests/system-test/7-tmq/subscribeStb0.py
+1
-1
tests/system-test/7-tmq/subscribeStb1.py
tests/system-test/7-tmq/subscribeStb1.py
+1
-1
tests/system-test/7-tmq/subscribeStb2.py
tests/system-test/7-tmq/subscribeStb2.py
+1
-1
tests/system-test/7-tmq/subscribeStb3.py
tests/system-test/7-tmq/subscribeStb3.py
+1
-1
tests/system-test/7-tmq/subscribeStb4.py
tests/system-test/7-tmq/subscribeStb4.py
+1
-1
tests/system-test/7-tmq/tmqDnode.py
tests/system-test/7-tmq/tmqDnode.py
+1
-1
tests/system-test/7-tmq/tmqModule.py
tests/system-test/7-tmq/tmqModule.py
+1
-1
tests/system-test/99-TDcase/TD-15517.py
tests/system-test/99-TDcase/TD-15517.py
+1
-1
tests/system-test/99-TDcase/TD-15554.py
tests/system-test/99-TDcase/TD-15554.py
+1
-1
tests/system-test/99-TDcase/TD-15557.py
tests/system-test/99-TDcase/TD-15557.py
+1
-1
tests/system-test/99-TDcase/TD-15563.py
tests/system-test/99-TDcase/TD-15563.py
+1
-1
tests/system-test/99-TDcase/TD-16025.py
tests/system-test/99-TDcase/TD-16025.py
+1
-1
tests/system-test/test.py
tests/system-test/test.py
+6
-5
未找到文件。
source/libs/scalar/src/sclvector.c
浏览文件 @
d95b7a3d
...
@@ -348,7 +348,7 @@ static FORCE_INLINE void varToNchar(char* buf, SScalarParam* pOut, int32_t rowIn
...
@@ -348,7 +348,7 @@ static FORCE_INLINE void varToNchar(char* buf, SScalarParam* pOut, int32_t rowIn
int32_t
outputMaxLen
=
(
inputLen
+
1
)
*
TSDB_NCHAR_SIZE
+
VARSTR_HEADER_SIZE
;
int32_t
outputMaxLen
=
(
inputLen
+
1
)
*
TSDB_NCHAR_SIZE
+
VARSTR_HEADER_SIZE
;
char
*
t
=
taosMemoryCalloc
(
1
,
outputMaxLen
);
char
*
t
=
taosMemoryCalloc
(
1
,
outputMaxLen
);
/*int32_t resLen = */
taosMbsToUcs4
(
varDataVal
(
buf
),
inputLen
,
(
TdUcs4
*
)
varDataVal
(
t
),
outputMaxLen
,
&
len
);
/*int32_t resLen = */
taosMbsToUcs4
(
varDataVal
(
buf
),
inputLen
,
(
TdUcs4
*
)
varDataVal
(
t
),
outputMaxLen
-
VARSTR_HEADER_SIZE
,
&
len
);
varDataSetLen
(
t
,
len
);
varDataSetLen
(
t
,
len
);
colDataAppend
(
pOut
->
columnData
,
rowIndex
,
t
,
false
);
colDataAppend
(
pOut
->
columnData
,
rowIndex
,
t
,
false
);
...
...
source/os/src/osTime.c
浏览文件 @
d95b7a3d
...
@@ -28,29 +28,29 @@
...
@@ -28,29 +28,29 @@
#ifdef WINDOWS
#ifdef WINDOWS
#include <time.h>
#include <stdlib.h>
#include <stdlib.h>
#include <string.h>
#include <string.h>
#include <time.h>
//#define TM_YEAR_BASE 1970 //origin
//#define TM_YEAR_BASE 1970 //origin
#define TM_YEAR_BASE 1900
//
slguan
#define TM_YEAR_BASE 1900
//
slguan
/*
/*
* We do not implement alternate representations. However, we always
* We do not implement alternate representations. However, we always
* check whether a given modifier is allowed for a certain conversion.
* check whether a given modifier is allowed for a certain conversion.
*/
*/
#define ALT_E 0x01
#define ALT_E 0x01
#define ALT_O 0x02
#define ALT_O 0x02
#define LEGAL_ALT(x) { if (alt_format & ~(x)) return (0); }
#define LEGAL_ALT(x) \
{ \
if (alt_format & ~(x)) return (0); \
}
static
int
conv_num
(
const
char
**
buf
,
int
*
dest
,
int
llim
,
int
ulim
)
static
int
conv_num
(
const
char
**
buf
,
int
*
dest
,
int
llim
,
int
ulim
)
{
{
int
result
=
0
;
int
result
=
0
;
/* The limit also determines the number of valid digits. */
/* The limit also determines the number of valid digits. */
int
rulim
=
ulim
;
int
rulim
=
ulim
;
if
(
**
buf
<
'0'
||
**
buf
>
'9'
)
if
(
**
buf
<
'0'
||
**
buf
>
'9'
)
return
(
0
);
return
(
0
);
do
{
do
{
result
*=
10
;
result
*=
10
;
...
@@ -58,62 +58,18 @@ static int conv_num(const char **buf, int *dest, int llim, int ulim)
...
@@ -58,62 +58,18 @@ static int conv_num(const char **buf, int *dest, int llim, int ulim)
rulim
/=
10
;
rulim
/=
10
;
}
while
((
result
*
10
<=
ulim
)
&&
rulim
&&
**
buf
>=
'0'
&&
**
buf
<=
'9'
);
}
while
((
result
*
10
<=
ulim
)
&&
rulim
&&
**
buf
>=
'0'
&&
**
buf
<=
'9'
);
if
(
result
<
llim
||
result
>
ulim
)
if
(
result
<
llim
||
result
>
ulim
)
return
(
0
);
return
(
0
);
*
dest
=
result
;
*
dest
=
result
;
return
(
1
);
return
(
1
);
}
}
static
const
char
*
day
[
7
]
=
{
static
const
char
*
day
[
7
]
=
{
"Sunday"
,
"Monday"
,
"Tuesday"
,
"Wednesday"
,
"Thursday"
,
"Friday"
,
"Saturday"
};
"Sunday"
,
"Monday"
,
"Tuesday"
,
"Wednesday"
,
"Thursday"
,
static
const
char
*
abday
[
7
]
=
{
"Sun"
,
"Mon"
,
"Tue"
,
"Wed"
,
"Thu"
,
"Fri"
,
"Sat"
};
"Friday"
,
"Saturday"
static
const
char
*
mon
[
12
]
=
{
"January"
,
"February"
,
"March"
,
"April"
,
"May"
,
"June"
,
};
"July"
,
"August"
,
"September"
,
"October"
,
"November"
,
"December"
};
static
const
char
*
abday
[
7
]
=
{
static
const
char
*
abmon
[
12
]
=
{
"Jan"
,
"Feb"
,
"Mar"
,
"Apr"
,
"May"
,
"Jun"
,
"Jul"
,
"Aug"
,
"Sep"
,
"Oct"
,
"Nov"
,
"Dec"
};
"Sun"
,
"Mon"
,
"Tue"
,
"Wed"
,
"Thu"
,
"Fri"
,
"Sat"
static
const
char
*
am_pm
[
2
]
=
{
"AM"
,
"PM"
};
};
static
const
char
*
mon
[
12
]
=
{
"January"
,
"February"
,
"March"
,
"April"
,
"May"
,
"June"
,
"July"
,
"August"
,
"September"
,
"October"
,
"November"
,
"December"
};
static
const
char
*
abmon
[
12
]
=
{
"Jan"
,
"Feb"
,
"Mar"
,
"Apr"
,
"May"
,
"Jun"
,
"Jul"
,
"Aug"
,
"Sep"
,
"Oct"
,
"Nov"
,
"Dec"
};
static
const
char
*
am_pm
[
2
]
=
{
"AM"
,
"PM"
};
#define BILLION (1E9)
static
BOOL
g_first_time
=
1
;
static
LARGE_INTEGER
g_counts_per_sec
;
int
clock_gettime
(
int
dummy
,
struct
timespec
*
ct
)
{
LARGE_INTEGER
count
;
if
(
g_first_time
)
{
g_first_time
=
0
;
if
(
0
==
QueryPerformanceFrequency
(
&
g_counts_per_sec
))
{
g_counts_per_sec
.
QuadPart
=
0
;
}
}
if
((
NULL
==
ct
)
||
(
g_counts_per_sec
.
QuadPart
<=
0
)
||
(
0
==
QueryPerformanceCounter
(
&
count
)))
{
return
-
1
;
}
ct
->
tv_sec
=
count
.
QuadPart
/
g_counts_per_sec
.
QuadPart
;
ct
->
tv_nsec
=
((
count
.
QuadPart
%
g_counts_per_sec
.
QuadPart
)
*
BILLION
)
/
g_counts_per_sec
.
QuadPart
;
return
0
;
}
#else
#else
#include <sys/time.h>
#include <sys/time.h>
...
@@ -134,22 +90,19 @@ char *taosStrpTime(const char *buf, const char *fmt, struct tm *tm) {
...
@@ -134,22 +90,19 @@ char *taosStrpTime(const char *buf, const char *fmt, struct tm *tm) {
/* Eat up white-space. */
/* Eat up white-space. */
if
(
isspace
(
c
))
{
if
(
isspace
(
c
))
{
while
(
isspace
(
*
bp
))
while
(
isspace
(
*
bp
))
bp
++
;
bp
++
;
fmt
++
;
fmt
++
;
continue
;
continue
;
}
}
if
((
c
=
*
fmt
++
)
!=
'%'
)
if
((
c
=
*
fmt
++
)
!=
'%'
)
goto
literal
;
goto
literal
;
again:
switch
(
c
=
*
fmt
++
)
{
again:
switch
(
c
=
*
fmt
++
)
{
case
'%'
:
/* "%%" is converted to "%". */
case
'%'
:
/* "%%" is converted to "%". */
literal
:
literal:
if
(
c
!=
*
bp
++
)
if
(
c
!=
*
bp
++
)
return
(
0
);
return
(
0
);
break
;
break
;
/*
/*
...
@@ -171,44 +124,37 @@ char *taosStrpTime(const char *buf, const char *fmt, struct tm *tm) {
...
@@ -171,44 +124,37 @@ char *taosStrpTime(const char *buf, const char *fmt, struct tm *tm) {
*/
*/
case
'c'
:
/* Date and time, using the locale's format. */
case
'c'
:
/* Date and time, using the locale's format. */
LEGAL_ALT
(
ALT_E
);
LEGAL_ALT
(
ALT_E
);
if
(
!
(
bp
=
taosStrpTime
(
bp
,
"%x %X"
,
tm
)))
if
(
!
(
bp
=
taosStrpTime
(
bp
,
"%x %X"
,
tm
)))
return
(
0
);
return
(
0
);
break
;
break
;
case
'D'
:
/* The date as "%m/%d/%y". */
case
'D'
:
/* The date as "%m/%d/%y". */
LEGAL_ALT
(
0
);
LEGAL_ALT
(
0
);
if
(
!
(
bp
=
taosStrpTime
(
bp
,
"%m/%d/%y"
,
tm
)))
if
(
!
(
bp
=
taosStrpTime
(
bp
,
"%m/%d/%y"
,
tm
)))
return
(
0
);
return
(
0
);
break
;
break
;
case
'R'
:
/* The time as "%H:%M". */
case
'R'
:
/* The time as "%H:%M". */
LEGAL_ALT
(
0
);
LEGAL_ALT
(
0
);
if
(
!
(
bp
=
taosStrpTime
(
bp
,
"%H:%M"
,
tm
)))
if
(
!
(
bp
=
taosStrpTime
(
bp
,
"%H:%M"
,
tm
)))
return
(
0
);
return
(
0
);
break
;
break
;
case
'r'
:
/* The time in 12-hour clock representation. */
case
'r'
:
/* The time in 12-hour clock representation. */
LEGAL_ALT
(
0
);
LEGAL_ALT
(
0
);
if
(
!
(
bp
=
taosStrpTime
(
bp
,
"%I:%M:%S %p"
,
tm
)))
if
(
!
(
bp
=
taosStrpTime
(
bp
,
"%I:%M:%S %p"
,
tm
)))
return
(
0
);
return
(
0
);
break
;
break
;
case
'T'
:
/* The time as "%H:%M:%S". */
case
'T'
:
/* The time as "%H:%M:%S". */
LEGAL_ALT
(
0
);
LEGAL_ALT
(
0
);
if
(
!
(
bp
=
taosStrpTime
(
bp
,
"%H:%M:%S"
,
tm
)))
if
(
!
(
bp
=
taosStrpTime
(
bp
,
"%H:%M:%S"
,
tm
)))
return
(
0
);
return
(
0
);
break
;
break
;
case
'X'
:
/* The time, using the locale's format. */
case
'X'
:
/* The time, using the locale's format. */
LEGAL_ALT
(
ALT_E
);
LEGAL_ALT
(
ALT_E
);
if
(
!
(
bp
=
taosStrpTime
(
bp
,
"%H:%M:%S"
,
tm
)))
if
(
!
(
bp
=
taosStrpTime
(
bp
,
"%H:%M:%S"
,
tm
)))
return
(
0
);
return
(
0
);
break
;
break
;
case
'x'
:
/* The date, using the locale's format. */
case
'x'
:
/* The date, using the locale's format. */
LEGAL_ALT
(
ALT_E
);
LEGAL_ALT
(
ALT_E
);
if
(
!
(
bp
=
taosStrpTime
(
bp
,
"%m/%d/%y"
,
tm
)))
if
(
!
(
bp
=
taosStrpTime
(
bp
,
"%m/%d/%y"
,
tm
)))
return
(
0
);
return
(
0
);
break
;
break
;
/*
/*
...
@@ -220,18 +166,15 @@ char *taosStrpTime(const char *buf, const char *fmt, struct tm *tm) {
...
@@ -220,18 +166,15 @@ char *taosStrpTime(const char *buf, const char *fmt, struct tm *tm) {
for
(
i
=
0
;
i
<
7
;
i
++
)
{
for
(
i
=
0
;
i
<
7
;
i
++
)
{
/* Full name. */
/* Full name. */
len
=
strlen
(
day
[
i
]);
len
=
strlen
(
day
[
i
]);
if
(
strncmp
(
day
[
i
],
bp
,
len
)
==
0
)
if
(
strncmp
(
day
[
i
],
bp
,
len
)
==
0
)
break
;
break
;
/* Abbreviated name. */
/* Abbreviated name. */
len
=
strlen
(
abday
[
i
]);
len
=
strlen
(
abday
[
i
]);
if
(
strncmp
(
abday
[
i
],
bp
,
len
)
==
0
)
if
(
strncmp
(
abday
[
i
],
bp
,
len
)
==
0
)
break
;
break
;
}
}
/* Nothing matched. */
/* Nothing matched. */
if
(
i
==
7
)
if
(
i
==
7
)
return
(
0
);
return
(
0
);
tm
->
tm_wday
=
i
;
tm
->
tm_wday
=
i
;
bp
+=
len
;
bp
+=
len
;
...
@@ -244,18 +187,15 @@ char *taosStrpTime(const char *buf, const char *fmt, struct tm *tm) {
...
@@ -244,18 +187,15 @@ char *taosStrpTime(const char *buf, const char *fmt, struct tm *tm) {
for
(
i
=
0
;
i
<
12
;
i
++
)
{
for
(
i
=
0
;
i
<
12
;
i
++
)
{
/* Full name. */
/* Full name. */
len
=
strlen
(
mon
[
i
]);
len
=
strlen
(
mon
[
i
]);
if
(
strncmp
(
mon
[
i
],
bp
,
len
)
==
0
)
if
(
strncmp
(
mon
[
i
],
bp
,
len
)
==
0
)
break
;
break
;
/* Abbreviated name. */
/* Abbreviated name. */
len
=
strlen
(
abmon
[
i
]);
len
=
strlen
(
abmon
[
i
]);
if
(
strncmp
(
abmon
[
i
],
bp
,
len
)
==
0
)
if
(
strncmp
(
abmon
[
i
],
bp
,
len
)
==
0
)
break
;
break
;
}
}
/* Nothing matched. */
/* Nothing matched. */
if
(
i
==
12
)
if
(
i
==
12
)
return
(
0
);
return
(
0
);
tm
->
tm_mon
=
i
;
tm
->
tm_mon
=
i
;
bp
+=
len
;
bp
+=
len
;
...
@@ -263,13 +203,11 @@ char *taosStrpTime(const char *buf, const char *fmt, struct tm *tm) {
...
@@ -263,13 +203,11 @@ char *taosStrpTime(const char *buf, const char *fmt, struct tm *tm) {
case
'C'
:
/* The century number. */
case
'C'
:
/* The century number. */
LEGAL_ALT
(
ALT_E
);
LEGAL_ALT
(
ALT_E
);
if
(
!
(
conv_num
(
&
bp
,
&
i
,
0
,
99
)))
if
(
!
(
conv_num
(
&
bp
,
&
i
,
0
,
99
)))
return
(
0
);
return
(
0
);
if
(
split_year
)
{
if
(
split_year
)
{
tm
->
tm_year
=
(
tm
->
tm_year
%
100
)
+
(
i
*
100
);
tm
->
tm_year
=
(
tm
->
tm_year
%
100
)
+
(
i
*
100
);
}
}
else
{
else
{
tm
->
tm_year
=
i
*
100
;
tm
->
tm_year
=
i
*
100
;
split_year
=
1
;
split_year
=
1
;
}
}
...
@@ -278,8 +216,7 @@ char *taosStrpTime(const char *buf, const char *fmt, struct tm *tm) {
...
@@ -278,8 +216,7 @@ char *taosStrpTime(const char *buf, const char *fmt, struct tm *tm) {
case
'd'
:
/* The day of month. */
case
'd'
:
/* The day of month. */
case
'e'
:
case
'e'
:
LEGAL_ALT
(
ALT_O
);
LEGAL_ALT
(
ALT_O
);
if
(
!
(
conv_num
(
&
bp
,
&
tm
->
tm_mday
,
1
,
31
)))
if
(
!
(
conv_num
(
&
bp
,
&
tm
->
tm_mday
,
1
,
31
)))
return
(
0
);
return
(
0
);
break
;
break
;
case
'k'
:
/* The hour (24-hour clock representation). */
case
'k'
:
/* The hour (24-hour clock representation). */
...
@@ -287,8 +224,7 @@ char *taosStrpTime(const char *buf, const char *fmt, struct tm *tm) {
...
@@ -287,8 +224,7 @@ char *taosStrpTime(const char *buf, const char *fmt, struct tm *tm) {
/* FALLTHROUGH */
/* FALLTHROUGH */
case
'H'
:
case
'H'
:
LEGAL_ALT
(
ALT_O
);
LEGAL_ALT
(
ALT_O
);
if
(
!
(
conv_num
(
&
bp
,
&
tm
->
tm_hour
,
0
,
23
)))
if
(
!
(
conv_num
(
&
bp
,
&
tm
->
tm_hour
,
0
,
23
)))
return
(
0
);
return
(
0
);
break
;
break
;
case
'l'
:
/* The hour (12-hour clock representation). */
case
'l'
:
/* The hour (12-hour clock representation). */
...
@@ -296,29 +232,24 @@ char *taosStrpTime(const char *buf, const char *fmt, struct tm *tm) {
...
@@ -296,29 +232,24 @@ char *taosStrpTime(const char *buf, const char *fmt, struct tm *tm) {
/* FALLTHROUGH */
/* FALLTHROUGH */
case
'I'
:
case
'I'
:
LEGAL_ALT
(
ALT_O
);
LEGAL_ALT
(
ALT_O
);
if
(
!
(
conv_num
(
&
bp
,
&
tm
->
tm_hour
,
1
,
12
)))
if
(
!
(
conv_num
(
&
bp
,
&
tm
->
tm_hour
,
1
,
12
)))
return
(
0
);
return
(
0
);
if
(
tm
->
tm_hour
==
12
)
tm
->
tm_hour
=
0
;
if
(
tm
->
tm_hour
==
12
)
tm
->
tm_hour
=
0
;
break
;
break
;
case
'j'
:
/* The day of year. */
case
'j'
:
/* The day of year. */
LEGAL_ALT
(
0
);
LEGAL_ALT
(
0
);
if
(
!
(
conv_num
(
&
bp
,
&
i
,
1
,
366
)))
if
(
!
(
conv_num
(
&
bp
,
&
i
,
1
,
366
)))
return
(
0
);
return
(
0
);
tm
->
tm_yday
=
i
-
1
;
tm
->
tm_yday
=
i
-
1
;
break
;
break
;
case
'M'
:
/* The minute. */
case
'M'
:
/* The minute. */
LEGAL_ALT
(
ALT_O
);
LEGAL_ALT
(
ALT_O
);
if
(
!
(
conv_num
(
&
bp
,
&
tm
->
tm_min
,
0
,
59
)))
if
(
!
(
conv_num
(
&
bp
,
&
tm
->
tm_min
,
0
,
59
)))
return
(
0
);
return
(
0
);
break
;
break
;
case
'm'
:
/* The month. */
case
'm'
:
/* The month. */
LEGAL_ALT
(
ALT_O
);
LEGAL_ALT
(
ALT_O
);
if
(
!
(
conv_num
(
&
bp
,
&
i
,
1
,
12
)))
if
(
!
(
conv_num
(
&
bp
,
&
i
,
1
,
12
)))
return
(
0
);
return
(
0
);
tm
->
tm_mon
=
i
-
1
;
tm
->
tm_mon
=
i
-
1
;
break
;
break
;
...
@@ -326,16 +257,14 @@ char *taosStrpTime(const char *buf, const char *fmt, struct tm *tm) {
...
@@ -326,16 +257,14 @@ char *taosStrpTime(const char *buf, const char *fmt, struct tm *tm) {
LEGAL_ALT
(
0
);
LEGAL_ALT
(
0
);
/* AM? */
/* AM? */
if
(
strcmp
(
am_pm
[
0
],
bp
)
==
0
)
{
if
(
strcmp
(
am_pm
[
0
],
bp
)
==
0
)
{
if
(
tm
->
tm_hour
>
11
)
if
(
tm
->
tm_hour
>
11
)
return
(
0
);
return
(
0
);
bp
+=
strlen
(
am_pm
[
0
]);
bp
+=
strlen
(
am_pm
[
0
]);
break
;
break
;
}
}
/* PM? */
/* PM? */
else
if
(
strcmp
(
am_pm
[
1
],
bp
)
==
0
)
{
else
if
(
strcmp
(
am_pm
[
1
],
bp
)
==
0
)
{
if
(
tm
->
tm_hour
>
11
)
if
(
tm
->
tm_hour
>
11
)
return
(
0
);
return
(
0
);
tm
->
tm_hour
+=
12
;
tm
->
tm_hour
+=
12
;
bp
+=
strlen
(
am_pm
[
1
]);
bp
+=
strlen
(
am_pm
[
1
]);
...
@@ -347,8 +276,7 @@ char *taosStrpTime(const char *buf, const char *fmt, struct tm *tm) {
...
@@ -347,8 +276,7 @@ char *taosStrpTime(const char *buf, const char *fmt, struct tm *tm) {
case
'S'
:
/* The seconds. */
case
'S'
:
/* The seconds. */
LEGAL_ALT
(
ALT_O
);
LEGAL_ALT
(
ALT_O
);
if
(
!
(
conv_num
(
&
bp
,
&
tm
->
tm_sec
,
0
,
61
)))
if
(
!
(
conv_num
(
&
bp
,
&
tm
->
tm_sec
,
0
,
61
)))
return
(
0
);
return
(
0
);
break
;
break
;
case
'U'
:
/* The week of year, beginning on sunday. */
case
'U'
:
/* The week of year, beginning on sunday. */
...
@@ -360,28 +288,24 @@ char *taosStrpTime(const char *buf, const char *fmt, struct tm *tm) {
...
@@ -360,28 +288,24 @@ char *taosStrpTime(const char *buf, const char *fmt, struct tm *tm) {
* point to calculate a real value, so just check the
* point to calculate a real value, so just check the
* range for now.
* range for now.
*/
*/
if
(
!
(
conv_num
(
&
bp
,
&
i
,
0
,
53
)))
if
(
!
(
conv_num
(
&
bp
,
&
i
,
0
,
53
)))
return
(
0
);
return
(
0
);
break
;
break
;
case
'w'
:
/* The day of week, beginning on sunday. */
case
'w'
:
/* The day of week, beginning on sunday. */
LEGAL_ALT
(
ALT_O
);
LEGAL_ALT
(
ALT_O
);
if
(
!
(
conv_num
(
&
bp
,
&
tm
->
tm_wday
,
0
,
6
)))
if
(
!
(
conv_num
(
&
bp
,
&
tm
->
tm_wday
,
0
,
6
)))
return
(
0
);
return
(
0
);
break
;
break
;
case
'Y'
:
/* The year. */
case
'Y'
:
/* The year. */
LEGAL_ALT
(
ALT_E
);
LEGAL_ALT
(
ALT_E
);
if
(
!
(
conv_num
(
&
bp
,
&
i
,
0
,
9999
)))
if
(
!
(
conv_num
(
&
bp
,
&
i
,
0
,
9999
)))
return
(
0
);
return
(
0
);
tm
->
tm_year
=
i
-
TM_YEAR_BASE
;
tm
->
tm_year
=
i
-
TM_YEAR_BASE
;
break
;
break
;
case
'y'
:
/* The year within 100 years of the epoch. */
case
'y'
:
/* The year within 100 years of the epoch. */
LEGAL_ALT
(
ALT_E
|
ALT_O
);
LEGAL_ALT
(
ALT_E
|
ALT_O
);
if
(
!
(
conv_num
(
&
bp
,
&
i
,
0
,
99
)))
if
(
!
(
conv_num
(
&
bp
,
&
i
,
0
,
99
)))
return
(
0
);
return
(
0
);
if
(
split_year
)
{
if
(
split_year
)
{
tm
->
tm_year
=
((
tm
->
tm_year
/
100
)
*
100
)
+
i
;
tm
->
tm_year
=
((
tm
->
tm_year
/
100
)
*
100
)
+
i
;
...
@@ -400,16 +324,12 @@ char *taosStrpTime(const char *buf, const char *fmt, struct tm *tm) {
...
@@ -400,16 +324,12 @@ char *taosStrpTime(const char *buf, const char *fmt, struct tm *tm) {
case
'n'
:
/* Any kind of white-space. */
case
'n'
:
/* Any kind of white-space. */
case
't'
:
case
't'
:
LEGAL_ALT
(
0
);
LEGAL_ALT
(
0
);
while
(
isspace
(
*
bp
))
while
(
isspace
(
*
bp
))
bp
++
;
bp
++
;
break
;
break
;
default:
/* Unknown/unsupported conversion. */
default:
/* Unknown/unsupported conversion. */
return
(
0
);
return
(
0
);
}
}
}
}
/* LINTED functional specification */
/* LINTED functional specification */
...
@@ -435,13 +355,9 @@ FORCE_INLINE int32_t taosGetTimeOfDay(struct timeval *tv) {
...
@@ -435,13 +355,9 @@ FORCE_INLINE int32_t taosGetTimeOfDay(struct timeval *tv) {
#endif
#endif
}
}
time_t
taosTime
(
time_t
*
t
)
{
time_t
taosTime
(
time_t
*
t
)
{
return
time
(
t
);
}
return
time
(
t
);
}
time_t
taosMktime
(
struct
tm
*
timep
)
{
time_t
taosMktime
(
struct
tm
*
timep
)
{
return
mktime
(
timep
);
}
return
mktime
(
timep
);
}
struct
tm
*
taosLocalTime
(
const
time_t
*
timep
,
struct
tm
*
result
)
{
struct
tm
*
taosLocalTime
(
const
time_t
*
timep
,
struct
tm
*
result
)
{
if
(
result
==
NULL
)
{
if
(
result
==
NULL
)
{
...
@@ -456,5 +372,36 @@ struct tm *taosLocalTime(const time_t *timep, struct tm *result) {
...
@@ -456,5 +372,36 @@ struct tm *taosLocalTime(const time_t *timep, struct tm *result) {
}
}
int32_t
taosGetTimestampSec
()
{
return
(
int32_t
)
time
(
NULL
);
}
int32_t
taosGetTimestampSec
()
{
return
(
int32_t
)
time
(
NULL
);
}
int32_t
taosClockGetTime
(
int
clock_id
,
struct
timespec
*
pTS
)
{
int32_t
taosClockGetTime
(
int
clock_id
,
struct
timespec
*
pTS
)
{
return
clock_gettime
(
clock_id
,
pTS
);
}
#ifdef WINDOWS
\ No newline at end of file
LARGE_INTEGER
t
;
FILETIME
f
;
static
FILETIME
ff
;
static
SYSTEMTIME
ss
;
static
LARGE_INTEGER
offset
;
ss
.
wYear
=
1970
;
ss
.
wMonth
=
1
;
ss
.
wDay
=
1
;
ss
.
wHour
=
0
;
ss
.
wMinute
=
0
;
ss
.
wSecond
=
0
;
ss
.
wMilliseconds
=
0
;
SystemTimeToFileTime
(
&
ss
,
&
ff
);
offset
.
QuadPart
=
ff
.
dwHighDateTime
;
offset
.
QuadPart
<<=
32
;
offset
.
QuadPart
|=
ff
.
dwLowDateTime
;
GetSystemTimeAsFileTime
(
&
f
);
t
.
QuadPart
=
f
.
dwHighDateTime
;
t
.
QuadPart
<<=
32
;
t
.
QuadPart
|=
f
.
dwLowDateTime
;
t
.
QuadPart
-=
offset
.
QuadPart
;
pTS
->
tv_sec
=
t
.
QuadPart
/
10000000
;
pTS
->
tv_nsec
=
(
t
.
QuadPart
%
10000000
)
*
100
;
return
(
0
);
#else
return
clock_gettime
(
clock_id
,
pTS
);
#endif
}
\ No newline at end of file
tests/pytest/util/dnodes.py
浏览文件 @
d95b7a3d
...
@@ -574,6 +574,9 @@ class TDDnodes:
...
@@ -574,6 +574,9 @@ class TDDnodes:
def
stopAll
(
self
):
def
stopAll
(
self
):
tdLog
.
info
(
"stop all dnodes"
)
tdLog
.
info
(
"stop all dnodes"
)
if
(
not
self
.
dnodes
[
0
].
remoteIP
==
""
):
self
.
dnodes
[
0
].
remoteExec
(
self
.
dnodes
[
0
].
cfgDict
,
"for i in range(len(tdDnodes.dnodes)):
\n
tdDnodes.dnodes[i].running=1
\n
tdDnodes.stopAll()"
)
return
for
i
in
range
(
len
(
self
.
dnodes
)):
for
i
in
range
(
len
(
self
.
dnodes
)):
self
.
dnodes
[
i
].
stop
()
self
.
dnodes
[
i
].
stop
()
...
...
tests/system-test/0-others/taosdlog.py
浏览文件 @
d95b7a3d
...
@@ -23,7 +23,7 @@ class TDTestCase:
...
@@ -23,7 +23,7 @@ class TDTestCase:
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
if
(
"taosd"
in
files
):
if
(
"taosd"
in
files
or
"taosd.exe"
in
files
):
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
if
(
"packaging"
not
in
rootRealPath
):
if
(
"packaging"
not
in
rootRealPath
):
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
...
...
tests/system-test/0-others/udf_cluster.py
浏览文件 @
d95b7a3d
...
@@ -37,7 +37,7 @@ class TDTestCase:
...
@@ -37,7 +37,7 @@ class TDTestCase:
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
if
(
"taosd"
in
files
):
if
(
"taosd"
in
files
or
"taosd.exe"
in
files
):
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
if
(
"packaging"
not
in
rootRealPath
):
if
(
"packaging"
not
in
rootRealPath
):
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
...
...
tests/system-test/0-others/udf_create.py
浏览文件 @
d95b7a3d
...
@@ -9,8 +9,9 @@ from util.sql import *
...
@@ -9,8 +9,9 @@ from util.sql import *
from
util.cases
import
*
from
util.cases
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
import
subprocess
import
subprocess
# import win32gui
if
(
platform
.
system
().
lower
()
==
'windows'
):
# import threading
import
win32gui
import
threading
class
TDTestCase
:
class
TDTestCase
:
...
@@ -535,17 +536,18 @@ class TDTestCase:
...
@@ -535,17 +536,18 @@ class TDTestCase:
return
udf1_sqls
,
udf2_sqls
return
udf1_sqls
,
udf2_sqls
# def checkRunTimeError(self):
def
checkRunTimeError
(
self
):
# while 1:
if
(
platform
.
system
().
lower
()
==
'windows'
and
tdDnodes
.
dnodes
[
0
].
remoteIP
==
""
):
# time.sleep(1)
while
1
:
# hwnd = win32gui.FindWindow(None, "Microsoft Visual C++ Runtime Library")
time
.
sleep
(
1
)
# if hwnd:
hwnd
=
win32gui
.
FindWindow
(
None
,
"Microsoft Visual C++ Runtime Library"
)
# os.system("TASKKILL /F /IM udfd.exe")
if
hwnd
:
os
.
system
(
"TASKKILL /F /IM udfd.exe"
)
def
unexpected_create
(
self
):
def
unexpected_create
(
self
):
#
if (platform.system().lower() == 'windows' and tdDnodes.dnodes[0].remoteIP == ""):
if
(
platform
.
system
().
lower
()
==
'windows'
and
tdDnodes
.
dnodes
[
0
].
remoteIP
==
""
):
#
checkErrorThread = threading.Thread(target=self.checkRunTimeError,daemon=True)
checkErrorThread
=
threading
.
Thread
(
target
=
self
.
checkRunTimeError
,
daemon
=
True
)
#
checkErrorThread.start()
checkErrorThread
.
start
()
tdLog
.
info
(
" create function with out bufsize "
)
tdLog
.
info
(
" create function with out bufsize "
)
tdSql
.
query
(
"drop function udf1 "
)
tdSql
.
query
(
"drop function udf1 "
)
...
...
tests/system-test/0-others/user_control.py
浏览文件 @
d95b7a3d
...
@@ -3,6 +3,7 @@ import taos
...
@@ -3,6 +3,7 @@ import taos
import
time
import
time
import
inspect
import
inspect
import
traceback
import
traceback
import
socket
from
dataclasses
import
dataclass
from
dataclasses
import
dataclass
from
util.log
import
*
from
util.log
import
*
...
@@ -102,7 +103,7 @@ class TDconnect:
...
@@ -102,7 +103,7 @@ class TDconnect:
def
taos_connect
(
def
taos_connect
(
host
=
"127.0.0.1"
,
host
=
socket
.
gethostname
()
,
port
=
6030
,
port
=
6030
,
user
=
"root"
,
user
=
"root"
,
passwd
=
"taosdata"
,
passwd
=
"taosdata"
,
...
...
tests/system-test/1-insert/insertWithMoreVgroup.py
浏览文件 @
d95b7a3d
...
@@ -54,7 +54,7 @@ class TDTestCase:
...
@@ -54,7 +54,7 @@ class TDTestCase:
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
if
(
"taosd"
in
files
):
if
(
"taosd"
in
files
or
"taosd.exe"
in
files
):
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
if
(
"packaging"
not
in
rootRealPath
):
if
(
"packaging"
not
in
rootRealPath
):
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
...
...
tests/system-test/1-insert/mutipythonnodebugtaosd.py
浏览文件 @
d95b7a3d
...
@@ -52,7 +52,7 @@ class TDTestCase:
...
@@ -52,7 +52,7 @@ class TDTestCase:
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
if
(
"taosd"
in
files
):
if
(
"taosd"
in
files
or
"taosd.exe"
in
files
):
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
if
(
"packaging"
not
in
rootRealPath
):
if
(
"packaging"
not
in
rootRealPath
):
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
...
...
tests/system-test/1-insert/test_stmt_insert_query_ex.py
浏览文件 @
d95b7a3d
...
@@ -49,7 +49,7 @@ class TDTestCase:
...
@@ -49,7 +49,7 @@ class TDTestCase:
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
if
(
"taosd"
in
files
):
if
(
"taosd"
in
files
or
"taosd.exe"
in
files
):
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
if
(
"packaging"
not
in
rootRealPath
):
if
(
"packaging"
not
in
rootRealPath
):
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
...
...
tests/system-test/1-insert/test_stmt_muti_insert_query.py
浏览文件 @
d95b7a3d
...
@@ -49,7 +49,7 @@ class TDTestCase:
...
@@ -49,7 +49,7 @@ class TDTestCase:
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
if
(
"taosd"
in
files
):
if
(
"taosd"
in
files
or
"taosd.exe"
in
files
):
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
if
(
"packaging"
not
in
rootRealPath
):
if
(
"packaging"
not
in
rootRealPath
):
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
...
...
tests/system-test/1-insert/test_stmt_set_tbname_tag.py
浏览文件 @
d95b7a3d
...
@@ -49,7 +49,7 @@ class TDTestCase:
...
@@ -49,7 +49,7 @@ class TDTestCase:
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
if
(
"taosd"
in
files
):
if
(
"taosd"
in
files
or
"taosd.exe"
in
files
):
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
if
(
"packaging"
not
in
rootRealPath
):
if
(
"packaging"
not
in
rootRealPath
):
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
...
...
tests/system-test/2-query/histogram.py
浏览文件 @
d95b7a3d
...
@@ -400,7 +400,7 @@ class TDTestCase:
...
@@ -400,7 +400,7 @@ class TDTestCase:
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
if
(
"taosd"
in
files
):
if
(
"taosd"
in
files
or
"taosd.exe"
in
files
):
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
if
(
"packaging"
not
in
rootRealPath
):
if
(
"packaging"
not
in
rootRealPath
):
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
...
...
tests/system-test/2-query/timezone.py
浏览文件 @
d95b7a3d
...
@@ -3,6 +3,8 @@ from util.log import *
...
@@ -3,6 +3,8 @@ from util.log import *
from
util.sql
import
*
from
util.sql
import
*
from
util.cases
import
*
from
util.cases
import
*
import
tzlocal
import
platform
import
os
import
os
...
@@ -15,8 +17,12 @@ class TDTestCase:
...
@@ -15,8 +17,12 @@ class TDTestCase:
def
run
(
self
):
# sourcery skip: extract-duplicate-method
def
run
(
self
):
# sourcery skip: extract-duplicate-method
tdSql
.
prepare
()
tdSql
.
prepare
()
# get system timezone
# get system timezone
time_zone_arr
=
os
.
popen
(
'timedatectl | grep zone'
).
read
(
if
platform
.
system
().
lower
()
==
'windows'
:
).
strip
().
split
(
':'
)
time_zone_1
=
tzlocal
.
get_localzone_name
()
time_zone_2
=
time
.
strftime
(
'(UTC, %z)'
)
time_zone
=
time_zone_1
+
" "
+
time_zone_2
else
:
time_zone_arr
=
os
.
popen
(
'timedatectl | grep zone'
).
read
().
strip
().
split
(
':'
)
if
len
(
time_zone_arr
)
>
1
:
if
len
(
time_zone_arr
)
>
1
:
time_zone
=
time_zone_arr
[
1
].
lstrip
()
time_zone
=
time_zone_arr
[
1
].
lstrip
()
else
:
else
:
...
...
tests/system-test/7-tmq/basic5.py
浏览文件 @
d95b7a3d
...
@@ -13,6 +13,12 @@ from util.dnodes import *
...
@@ -13,6 +13,12 @@ from util.dnodes import *
class
TDTestCase
:
class
TDTestCase
:
hostname
=
socket
.
gethostname
()
hostname
=
socket
.
gethostname
()
if
(
platform
.
system
().
lower
()
==
'windows'
and
not
tdDnodes
.
dnodes
[
0
].
remoteIP
==
""
):
try
:
config
=
eval
(
tdDnodes
.
dnodes
[
0
].
remoteIP
)
hostname
=
config
[
"host"
]
except
Exception
:
hostname
=
tdDnodes
.
dnodes
[
0
].
remoteIP
#rpcDebugFlagVal = '143'
#rpcDebugFlagVal = '143'
#clientCfgDict = {'serverPort': '', 'firstEp': '', 'secondEp':'', 'rpcDebugFlag':'135', 'fqdn':''}
#clientCfgDict = {'serverPort': '', 'firstEp': '', 'secondEp':'', 'rpcDebugFlag':'135', 'fqdn':''}
#clientCfgDict["rpcDebugFlag"] = rpcDebugFlagVal
#clientCfgDict["rpcDebugFlag"] = rpcDebugFlagVal
...
@@ -34,7 +40,7 @@ class TDTestCase:
...
@@ -34,7 +40,7 @@ class TDTestCase:
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
if
(
"taosd"
in
files
):
if
(
"taosd"
in
files
or
"taosd.exe"
in
files
):
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
if
(
"packaging"
not
in
rootRealPath
):
if
(
"packaging"
not
in
rootRealPath
):
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
...
@@ -192,6 +198,9 @@ class TDTestCase:
...
@@ -192,6 +198,9 @@ class TDTestCase:
shellCmd
=
'nohup '
+
buildPath
+
'/build/bin/tmq_sim -c '
+
cfgPath
shellCmd
=
'nohup '
+
buildPath
+
'/build/bin/tmq_sim -c '
+
cfgPath
shellCmd
+=
" -y %d -d %s -g %d -r %d -w %s "
%
(
pollDelay
,
parameterDict
[
"dbName"
],
showMsg
,
showRow
,
cdbName
)
shellCmd
+=
" -y %d -d %s -g %d -r %d -w %s "
%
(
pollDelay
,
parameterDict
[
"dbName"
],
showMsg
,
showRow
,
cdbName
)
if
(
platform
.
system
().
lower
()
==
'windows'
):
shellCmd
+=
"> nul 2>&1 &"
else
:
shellCmd
+=
"> /dev/null 2>&1 &"
shellCmd
+=
"> /dev/null 2>&1 &"
tdLog
.
info
(
shellCmd
)
tdLog
.
info
(
shellCmd
)
os
.
system
(
shellCmd
)
os
.
system
(
shellCmd
)
...
@@ -306,6 +315,9 @@ class TDTestCase:
...
@@ -306,6 +315,9 @@ class TDTestCase:
shellCmd
=
'nohup '
+
buildPath
+
'/build/bin/tmq_sim -c '
+
cfgPath
shellCmd
=
'nohup '
+
buildPath
+
'/build/bin/tmq_sim -c '
+
cfgPath
shellCmd
+=
" -y %d -d %s -g %d -r %d -w %s "
%
(
pollDelay
,
parameterDict
[
"dbName"
],
showMsg
,
showRow
,
cdbName
)
shellCmd
+=
" -y %d -d %s -g %d -r %d -w %s "
%
(
pollDelay
,
parameterDict
[
"dbName"
],
showMsg
,
showRow
,
cdbName
)
if
(
platform
.
system
().
lower
()
==
'windows'
):
shellCmd
+=
"> nul 2>&1 &"
else
:
shellCmd
+=
"> /dev/null 2>&1 &"
shellCmd
+=
"> /dev/null 2>&1 &"
tdLog
.
info
(
shellCmd
)
tdLog
.
info
(
shellCmd
)
os
.
system
(
shellCmd
)
os
.
system
(
shellCmd
)
...
@@ -438,6 +450,9 @@ class TDTestCase:
...
@@ -438,6 +450,9 @@ class TDTestCase:
shellCmd
=
'nohup '
+
buildPath
+
'/build/bin/tmq_sim -c '
+
cfgPath
shellCmd
=
'nohup '
+
buildPath
+
'/build/bin/tmq_sim -c '
+
cfgPath
shellCmd
+=
" -y %d -d %s -g %d -r %d -w %s "
%
(
pollDelay
,
parameterDict
[
"dbName"
],
showMsg
,
showRow
,
cdbName
)
shellCmd
+=
" -y %d -d %s -g %d -r %d -w %s "
%
(
pollDelay
,
parameterDict
[
"dbName"
],
showMsg
,
showRow
,
cdbName
)
if
(
platform
.
system
().
lower
()
==
'windows'
):
shellCmd
+=
"> nul 2>&1 &"
else
:
shellCmd
+=
"> /dev/null 2>&1 &"
shellCmd
+=
"> /dev/null 2>&1 &"
tdLog
.
info
(
shellCmd
)
tdLog
.
info
(
shellCmd
)
os
.
system
(
shellCmd
)
os
.
system
(
shellCmd
)
...
...
tests/system-test/7-tmq/db.py
浏览文件 @
d95b7a3d
...
@@ -41,7 +41,7 @@ class TDTestCase:
...
@@ -41,7 +41,7 @@ class TDTestCase:
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
if
(
"taosd"
in
files
):
if
(
"taosd"
in
files
or
"taosd.exe"
in
files
):
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
if
(
"packaging"
not
in
rootRealPath
):
if
(
"packaging"
not
in
rootRealPath
):
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
...
...
tests/system-test/7-tmq/schema.py
浏览文件 @
d95b7a3d
...
@@ -41,7 +41,7 @@ class TDTestCase:
...
@@ -41,7 +41,7 @@ class TDTestCase:
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
if
(
"taosd"
in
files
):
if
(
"taosd"
in
files
or
"taosd.exe"
in
files
):
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
if
(
"packaging"
not
in
rootRealPath
):
if
(
"packaging"
not
in
rootRealPath
):
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
...
...
tests/system-test/7-tmq/subscribeDb.py
浏览文件 @
d95b7a3d
...
@@ -34,7 +34,7 @@ class TDTestCase:
...
@@ -34,7 +34,7 @@ class TDTestCase:
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
if
(
"taosd"
in
files
):
if
(
"taosd"
in
files
or
"taosd.exe"
in
files
):
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
if
(
"packaging"
not
in
rootRealPath
):
if
(
"packaging"
not
in
rootRealPath
):
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
...
...
tests/system-test/7-tmq/subscribeDb0.py
浏览文件 @
d95b7a3d
...
@@ -34,7 +34,7 @@ class TDTestCase:
...
@@ -34,7 +34,7 @@ class TDTestCase:
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
if
(
"taosd"
in
files
):
if
(
"taosd"
in
files
or
"taosd.exe"
in
files
):
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
if
(
"packaging"
not
in
rootRealPath
):
if
(
"packaging"
not
in
rootRealPath
):
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
...
...
tests/system-test/7-tmq/subscribeDb1.py
浏览文件 @
d95b7a3d
...
@@ -34,7 +34,7 @@ class TDTestCase:
...
@@ -34,7 +34,7 @@ class TDTestCase:
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
if
(
"taosd"
in
files
):
if
(
"taosd"
in
files
or
"taosd.exe"
in
files
):
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
if
(
"packaging"
not
in
rootRealPath
):
if
(
"packaging"
not
in
rootRealPath
):
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
...
...
tests/system-test/7-tmq/subscribeStb.py
浏览文件 @
d95b7a3d
...
@@ -41,7 +41,7 @@ class TDTestCase:
...
@@ -41,7 +41,7 @@ class TDTestCase:
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
if
(
"taosd"
in
files
):
if
(
"taosd"
in
files
or
"taosd.exe"
in
files
):
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
if
(
"packaging"
not
in
rootRealPath
):
if
(
"packaging"
not
in
rootRealPath
):
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
...
...
tests/system-test/7-tmq/subscribeStb0.py
浏览文件 @
d95b7a3d
...
@@ -41,7 +41,7 @@ class TDTestCase:
...
@@ -41,7 +41,7 @@ class TDTestCase:
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
if
(
"taosd"
in
files
):
if
(
"taosd"
in
files
or
"taosd.exe"
in
files
):
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
if
(
"packaging"
not
in
rootRealPath
):
if
(
"packaging"
not
in
rootRealPath
):
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
...
...
tests/system-test/7-tmq/subscribeStb1.py
浏览文件 @
d95b7a3d
...
@@ -41,7 +41,7 @@ class TDTestCase:
...
@@ -41,7 +41,7 @@ class TDTestCase:
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
if
(
"taosd"
in
files
):
if
(
"taosd"
in
files
or
"taosd.exe"
in
files
):
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
if
(
"packaging"
not
in
rootRealPath
):
if
(
"packaging"
not
in
rootRealPath
):
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
...
...
tests/system-test/7-tmq/subscribeStb2.py
浏览文件 @
d95b7a3d
...
@@ -41,7 +41,7 @@ class TDTestCase:
...
@@ -41,7 +41,7 @@ class TDTestCase:
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
if
(
"taosd"
in
files
):
if
(
"taosd"
in
files
or
"taosd.exe"
in
files
):
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
if
(
"packaging"
not
in
rootRealPath
):
if
(
"packaging"
not
in
rootRealPath
):
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
...
...
tests/system-test/7-tmq/subscribeStb3.py
浏览文件 @
d95b7a3d
...
@@ -41,7 +41,7 @@ class TDTestCase:
...
@@ -41,7 +41,7 @@ class TDTestCase:
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
if
(
"taosd"
in
files
):
if
(
"taosd"
in
files
or
"taosd.exe"
in
files
):
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
if
(
"packaging"
not
in
rootRealPath
):
if
(
"packaging"
not
in
rootRealPath
):
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
...
...
tests/system-test/7-tmq/subscribeStb4.py
浏览文件 @
d95b7a3d
...
@@ -41,7 +41,7 @@ class TDTestCase:
...
@@ -41,7 +41,7 @@ class TDTestCase:
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
if
(
"taosd"
in
files
):
if
(
"taosd"
in
files
or
"taosd.exe"
in
files
):
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
if
(
"packaging"
not
in
rootRealPath
):
if
(
"packaging"
not
in
rootRealPath
):
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
...
...
tests/system-test/7-tmq/tmqDnode.py
浏览文件 @
d95b7a3d
...
@@ -41,7 +41,7 @@ class TDTestCase:
...
@@ -41,7 +41,7 @@ class TDTestCase:
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
if
(
"taosd"
in
files
):
if
(
"taosd"
in
files
or
"taosd.exe"
in
files
):
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
if
(
"packaging"
not
in
rootRealPath
):
if
(
"packaging"
not
in
rootRealPath
):
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
...
...
tests/system-test/7-tmq/tmqModule.py
浏览文件 @
d95b7a3d
...
@@ -41,7 +41,7 @@ class TDTestCase:
...
@@ -41,7 +41,7 @@ class TDTestCase:
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
if
(
"taosd"
in
files
):
if
(
"taosd"
in
files
or
"taosd.exe"
in
files
):
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
if
(
"packaging"
not
in
rootRealPath
):
if
(
"packaging"
not
in
rootRealPath
):
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
...
...
tests/system-test/99-TDcase/TD-15517.py
浏览文件 @
d95b7a3d
...
@@ -34,7 +34,7 @@ class TDTestCase:
...
@@ -34,7 +34,7 @@ class TDTestCase:
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
if
(
"taosd"
in
files
):
if
(
"taosd"
in
files
or
"taosd.exe"
in
files
):
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
if
(
"packaging"
not
in
rootRealPath
):
if
(
"packaging"
not
in
rootRealPath
):
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
...
...
tests/system-test/99-TDcase/TD-15554.py
浏览文件 @
d95b7a3d
...
@@ -33,7 +33,7 @@ class TDTestCase:
...
@@ -33,7 +33,7 @@ class TDTestCase:
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
if
(
"taosd"
in
files
):
if
(
"taosd"
in
files
or
"taosd.exe"
in
files
):
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
if
(
"packaging"
not
in
rootRealPath
):
if
(
"packaging"
not
in
rootRealPath
):
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
...
...
tests/system-test/99-TDcase/TD-15557.py
浏览文件 @
d95b7a3d
...
@@ -34,7 +34,7 @@ class TDTestCase:
...
@@ -34,7 +34,7 @@ class TDTestCase:
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
if
(
"taosd"
in
files
):
if
(
"taosd"
in
files
or
"taosd.exe"
in
files
):
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
if
(
"packaging"
not
in
rootRealPath
):
if
(
"packaging"
not
in
rootRealPath
):
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
...
...
tests/system-test/99-TDcase/TD-15563.py
浏览文件 @
d95b7a3d
...
@@ -34,7 +34,7 @@ class TDTestCase:
...
@@ -34,7 +34,7 @@ class TDTestCase:
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
if
(
"taosd"
in
files
):
if
(
"taosd"
in
files
or
"taosd.exe"
in
files
):
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
if
(
"packaging"
not
in
rootRealPath
):
if
(
"packaging"
not
in
rootRealPath
):
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
...
...
tests/system-test/99-TDcase/TD-16025.py
浏览文件 @
d95b7a3d
...
@@ -41,7 +41,7 @@ class TDTestCase:
...
@@ -41,7 +41,7 @@ class TDTestCase:
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
if
(
"taosd"
in
files
):
if
(
"taosd"
in
files
or
"taosd.exe"
in
files
):
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
if
(
"packaging"
not
in
rootRealPath
):
if
(
"packaging"
not
in
rootRealPath
):
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
...
...
tests/system-test/test.py
浏览文件 @
d95b7a3d
...
@@ -20,6 +20,7 @@ import time
...
@@ -20,6 +20,7 @@ import time
import
base64
import
base64
import
json
import
json
import
platform
import
platform
import
socket
from
distutils.log
import
warn
as
printf
from
distutils.log
import
warn
as
printf
from
fabric2
import
Connection
from
fabric2
import
Connection
sys
.
path
.
append
(
"../pytest"
)
sys
.
path
.
append
(
"../pytest"
)
...
@@ -149,7 +150,7 @@ if __name__ == "__main__":
...
@@ -149,7 +150,7 @@ if __name__ == "__main__":
tdLog
.
info
(
'stop All dnodes'
)
tdLog
.
info
(
'stop All dnodes'
)
if
masterIp
==
""
:
if
masterIp
==
""
:
host
=
'127.0.0.1'
host
=
socket
.
gethostname
()
else
:
else
:
try
:
try
:
config
=
eval
(
masterIp
)
config
=
eval
(
masterIp
)
...
@@ -170,8 +171,8 @@ if __name__ == "__main__":
...
@@ -170,8 +171,8 @@ if __name__ == "__main__":
try
:
try
:
if
key_word
in
open
(
fileName
,
encoding
=
'UTF-8'
).
read
():
if
key_word
in
open
(
fileName
,
encoding
=
'UTF-8'
).
read
():
is_test_framework
=
1
is_test_framework
=
1
except
:
except
Exception
as
r
:
p
ass
p
rint
(
r
)
updateCfgDictStr
=
''
updateCfgDictStr
=
''
if
is_test_framework
:
if
is_test_framework
:
moduleName
=
fileName
.
replace
(
".py"
,
""
).
replace
(
os
.
sep
,
"."
)
moduleName
=
fileName
.
replace
(
".py"
,
""
).
replace
(
os
.
sep
,
"."
)
...
@@ -181,8 +182,8 @@ if __name__ == "__main__":
...
@@ -181,8 +182,8 @@ if __name__ == "__main__":
if
((
json
.
dumps
(
updateCfgDict
)
==
'{}'
)
and
(
ucase
.
updatecfgDict
is
not
None
)):
if
((
json
.
dumps
(
updateCfgDict
)
==
'{}'
)
and
(
ucase
.
updatecfgDict
is
not
None
)):
updateCfgDict
=
ucase
.
updatecfgDict
updateCfgDict
=
ucase
.
updatecfgDict
updateCfgDictStr
=
"-d %s"
%
base64
.
b64encode
(
json
.
dumps
(
updateCfgDict
).
encode
()).
decode
()
updateCfgDictStr
=
"-d %s"
%
base64
.
b64encode
(
json
.
dumps
(
updateCfgDict
).
encode
()).
decode
()
except
:
except
Exception
as
r
:
p
ass
p
rint
(
r
)
else
:
else
:
pass
pass
tdDnodes
.
deploy
(
1
,
updateCfgDict
)
tdDnodes
.
deploy
(
1
,
updateCfgDict
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录