Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
be2958dc
T
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1192
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看板
提交
be2958dc
编写于
12月 21, 2021
作者:
H
Hongze Cheng
浏览文件
操作
浏览文件
下载
差异文件
Merge branch '3.0' into feature/vnode
上级
799720ac
84d102b5
变更
11
显示空白变更内容
内联
并排
Showing
11 changed file
with
147 addition
and
436 deletion
+147
-436
Jenkinsfile
Jenkinsfile
+4
-0
cmake/stub_CMakeLists.txt.in
cmake/stub_CMakeLists.txt.in
+12
-0
contrib/CMakeLists.txt
contrib/CMakeLists.txt
+6
-0
source/libs/index/inc/index_tfile.h
source/libs/index/inc/index_tfile.h
+21
-5
source/libs/index/src/index_fst_counting_writer.c
source/libs/index/src/index_fst_counting_writer.c
+4
-0
source/libs/index/src/index_tfile.c
source/libs/index/src/index_tfile.c
+63
-8
source/libs/parser/test/mockCatalog.cpp
source/libs/parser/test/mockCatalog.cpp
+25
-2
source/libs/parser/test/mockCatalog.h
source/libs/parser/test/mockCatalog.h
+2
-2
source/libs/planner/test/plannerTests.cpp
source/libs/planner/test/plannerTests.cpp
+4
-4
tests/script/jenkins/basic.txt
tests/script/jenkins/basic.txt
+1
-411
tests/test-all.sh
tests/test-all.sh
+5
-4
未找到文件。
Jenkinsfile
浏览文件 @
be2958dc
...
@@ -106,6 +106,10 @@ pipeline {
...
@@ -106,6 +106,10 @@ pipeline {
abortPreviousBuilds
()
abortPreviousBuilds
()
}
}
pre_test
()
pre_test
()
sh
'''
cd ${WKC}/tests
./test-all.sh b1fq
'''
}
}
}
}
// stage('Parallel test stage') {
// stage('Parallel test stage') {
...
...
cmake/stub_CMakeLists.txt.in
0 → 100644
浏览文件 @
be2958dc
# stub
ExternalProject_Add(stub
GIT_REPOSITORY https://github.com/coolxv/cpp-stub.git
GIT_SUBMODULES "src"
SOURCE_DIR "${CMAKE_CONTRIB_DIR}/cpp-stub"
BINARY_DIR "${CMAKE_CONTRIB_DIR}/cpp-stub/src"
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
TEST_COMMAND ""
)
contrib/CMakeLists.txt
浏览文件 @
be2958dc
...
@@ -12,6 +12,7 @@ configure_file("${CMAKE_SUPPORT_DIR}/deps_CMakeLists.txt.in" ${CONTRIB_TMP_FILE}
...
@@ -12,6 +12,7 @@ configure_file("${CMAKE_SUPPORT_DIR}/deps_CMakeLists.txt.in" ${CONTRIB_TMP_FILE}
# googletest
# googletest
if
(
${
BUILD_TEST
}
)
if
(
${
BUILD_TEST
}
)
cat
(
"
${
CMAKE_SUPPORT_DIR
}
/gtest_CMakeLists.txt.in"
${
CONTRIB_TMP_FILE
}
)
cat
(
"
${
CMAKE_SUPPORT_DIR
}
/gtest_CMakeLists.txt.in"
${
CONTRIB_TMP_FILE
}
)
cat
(
"
${
CMAKE_SUPPORT_DIR
}
/stub_CMakeLists.txt.in"
${
CONTRIB_TMP_FILE
}
)
endif
(
${
BUILD_TEST
}
)
endif
(
${
BUILD_TEST
}
)
# lz4
# lz4
...
@@ -79,6 +80,11 @@ execute_process(COMMAND "${CMAKE_COMMAND}" --build .
...
@@ -79,6 +80,11 @@ execute_process(COMMAND "${CMAKE_COMMAND}" --build .
# googletest
# googletest
if
(
${
BUILD_TEST
}
)
if
(
${
BUILD_TEST
}
)
add_subdirectory
(
googletest
)
add_subdirectory
(
googletest
)
target_include_directories
(
gtest
PUBLIC $<BUILD_INTERFACE:
${
CMAKE_CURRENT_SOURCE_DIR
}
/cpp-stub/src>
PUBLIC $<BUILD_INTERFACE:
${
CMAKE_CURRENT_SOURCE_DIR
}
/cpp-stub/src_linux>
)
endif
(
${
BUILD_TEST
}
)
endif
(
${
BUILD_TEST
}
)
# cJson
# cJson
...
...
source/libs/index/inc/index_tfile.h
浏览文件 @
be2958dc
...
@@ -26,7 +26,19 @@
...
@@ -26,7 +26,19 @@
extern
"C"
{
extern
"C"
{
#endif
#endif
// tfile header
// |<---suid--->|<---version--->|<--colLen-->|<-colName->|<---type-->|
// |<-uint64_t->|<---int32_t--->|<--int32_t->|<-colLen-->|<-uint8_t->|
typedef
struct
TFileReadHeader
{
uint64_t
suid
;
int32_t
version
;
char
colName
[
128
];
//
uint8_t
colType
;
}
TFileReadHeader
;
#define TFILE_HEADER_SIZE (sizeof(TFILE_HEADER_SIZE) + sizeof(uint32_t));
#define TFILE_HADER_PRE_SIZE (sizeof(uint64_t) + sizeof(int32_t) + sizeof(int32_t))
typedef
struct
TFileCacheKey
{
typedef
struct
TFileCacheKey
{
uint64_t
suid
;
uint64_t
suid
;
...
@@ -48,13 +60,13 @@ typedef struct TFileCache {
...
@@ -48,13 +60,13 @@ typedef struct TFileCache {
typedef
struct
TFileWriter
{
typedef
struct
TFileWriter
{
FstBuilder
*
fb
;
FstBuilder
*
fb
;
WriterCtx
*
wc
;
WriterCtx
*
ctx
;
}
TFileWriter
;
}
TFileWriter
;
typedef
struct
TFileReader
{
typedef
struct
TFileReader
{
T_REF_DECLARE
()
T_REF_DECLARE
()
Fst
*
fst
;
Fst
*
fst
;
WriterCtx
*
ctx
;
}
TFileReader
;
}
TFileReader
;
typedef
struct
IndexTFile
{
typedef
struct
IndexTFile
{
...
@@ -78,18 +90,22 @@ typedef struct TFileReaderOpt {
...
@@ -78,18 +90,22 @@ typedef struct TFileReaderOpt {
}
TFileReaderOpt
;
}
TFileReaderOpt
;
// tfile cache
// tfile cache
, manage tindex reader
TFileCache
*
tfileCacheCreate
(
const
char
*
path
);
TFileCache
*
tfileCacheCreate
(
const
char
*
path
);
void
tfileCacheDestroy
(
TFileCache
*
tcache
);
void
tfileCacheDestroy
(
TFileCache
*
tcache
);
TFileReader
*
tfileCacheGet
(
TFileCache
*
tcache
,
TFileCacheKey
*
key
);
TFileReader
*
tfileCacheGet
(
TFileCache
*
tcache
,
TFileCacheKey
*
key
);
void
tfileCachePut
(
TFileCache
*
tcache
,
TFileCacheKey
*
key
,
TFileReader
*
reader
);
void
tfileCachePut
(
TFileCache
*
tcache
,
TFileCacheKey
*
key
,
TFileReader
*
reader
);
TFileReader
*
tfileReaderCreate
();
void
TFileReaderDestroy
(
TFileReader
*
reader
);
TFileWriter
*
tfileWriterCreate
(
const
char
*
suid
,
const
char
*
colName
);
TFileWriter
*
tfileWriterCreate
(
const
char
*
suid
,
const
char
*
colName
);
void
tfileWriterDestroy
(
TFileWriter
*
tw
);
//
IndexTFile
*
indexTFileCreate
(
const
char
*
path
);
IndexTFile
*
indexTFileCreate
(
const
char
*
path
);
int
indexTFilePut
(
void
*
tfile
,
SIndexTerm
*
term
,
uint64_t
uid
);
int
indexTFilePut
(
void
*
tfile
,
SIndexTerm
*
term
,
uint64_t
uid
);
int
indexTFileSearch
(
void
*
tfile
,
SIndexTermQuery
*
query
,
SArray
*
result
);
int
indexTFileSearch
(
void
*
tfile
,
SIndexTermQuery
*
query
,
SArray
*
result
);
...
...
source/libs/index/src/index_fst_counting_writer.c
浏览文件 @
be2958dc
...
@@ -65,6 +65,7 @@ WriterCtx* writerCtxCreate(WriterType type, const char *path, bool readOnly, int
...
@@ -65,6 +65,7 @@ WriterCtx* writerCtxCreate(WriterType type, const char *path, bool readOnly, int
ctx
->
file
.
fd
=
tfOpenReadWrite
(
tmpFile
);
ctx
->
file
.
fd
=
tfOpenReadWrite
(
tmpFile
);
}
}
if
(
ctx
->
file
.
fd
<
0
)
{
if
(
ctx
->
file
.
fd
<
0
)
{
goto
END
;
indexError
(
"open file error %d"
,
errno
);
indexError
(
"open file error %d"
,
errno
);
}
}
}
else
if
(
ctx
->
type
==
TMemory
)
{
}
else
if
(
ctx
->
type
==
TMemory
)
{
...
@@ -79,6 +80,9 @@ WriterCtx* writerCtxCreate(WriterType type, const char *path, bool readOnly, int
...
@@ -79,6 +80,9 @@ WriterCtx* writerCtxCreate(WriterType type, const char *path, bool readOnly, int
ctx
->
limit
=
capacity
;
ctx
->
limit
=
capacity
;
return
ctx
;
return
ctx
;
END:
if
(
ctx
->
type
==
TMemory
)
{
free
(
ctx
->
mem
.
buf
);
}
free
(
ctx
);
}
}
void
writerCtxDestroy
(
WriterCtx
*
ctx
)
{
void
writerCtxDestroy
(
WriterCtx
*
ctx
)
{
if
(
ctx
->
type
==
TMemory
)
{
if
(
ctx
->
type
==
TMemory
)
{
...
...
source/libs/index/src/index_tfile.c
浏览文件 @
be2958dc
...
@@ -13,14 +13,38 @@
...
@@ -13,14 +13,38 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
*/
#include <sys/types.h>
//
#include <sys/types.h>
#include <dirent.h>
//
#include <dirent.h>
#include "index_tfile.h"
#include "index_tfile.h"
#include "index_fst.h"
#include "index_fst.h"
#include "index_util.h"
#include "index_util.h"
#include "taosdef.h"
#include "index.h"
#include "index_fst_counting_writer.h"
// tfile name suid-colId-version.tindex
static
FORCE_INLINE
int
tfileLoadHeader
(
WriterCtx
*
ctx
,
TFileReadHeader
*
header
)
{
//TODO simple tfile header later
char
buf
[
TFILE_HADER_PRE_SIZE
];
char
*
p
=
buf
;
int64_t
nread
=
ctx
->
read
(
ctx
,
buf
,
TFILE_HADER_PRE_SIZE
);
assert
(
nread
==
TFILE_HADER_PRE_SIZE
);
memcpy
(
&
header
->
suid
,
p
,
sizeof
(
header
->
suid
));
p
+=
sizeof
(
header
->
suid
);
memcpy
(
&
header
->
version
,
p
,
sizeof
(
header
->
version
));
p
+=
sizeof
(
header
->
version
);
int32_t
colLen
=
0
;
memcpy
(
&
colLen
,
p
,
sizeof
(
colLen
));
assert
(
colLen
<
sizeof
(
header
->
colName
));
nread
=
ctx
->
read
(
ctx
,
header
->
colName
,
colLen
);
assert
(
nread
==
colLen
);
nread
=
ctx
->
read
(
ctx
,
&
header
->
colType
,
sizeof
(
header
->
colType
));
return
0
;
};
static
int
tfileGetFileList
(
const
char
*
path
,
SArray
*
result
)
{
static
int
tfileGetFileList
(
const
char
*
path
,
SArray
*
result
)
{
DIR
*
dir
=
opendir
(
path
);
DIR
*
dir
=
opendir
(
path
);
if
(
NULL
==
dir
)
{
return
-
1
;
}
if
(
NULL
==
dir
)
{
return
-
1
;
}
...
@@ -35,6 +59,10 @@ static int tfileGetFileList(const char *path, SArray *result) {
...
@@ -35,6 +59,10 @@ static int tfileGetFileList(const char *path, SArray *result) {
closedir
(
dir
);
closedir
(
dir
);
return
0
;
return
0
;
}
}
static
void
tfileDestroyFileName
(
void
*
elem
)
{
char
*
p
=
*
(
char
**
)
elem
;
free
(
p
);
}
static
int
tfileCompare
(
const
void
*
a
,
const
void
*
b
)
{
static
int
tfileCompare
(
const
void
*
a
,
const
void
*
b
)
{
const
char
*
aName
=
*
(
char
**
)
a
;
const
char
*
aName
=
*
(
char
**
)
a
;
const
char
*
bName
=
*
(
char
**
)
b
;
const
char
*
bName
=
*
(
char
**
)
b
;
...
@@ -42,6 +70,7 @@ static int tfileCompare(const void *a, const void *b) {
...
@@ -42,6 +70,7 @@ static int tfileCompare(const void *a, const void *b) {
size_t
bLen
=
strlen
(
bName
);
size_t
bLen
=
strlen
(
bName
);
return
strncmp
(
aName
,
bName
,
aLen
>
bLen
?
aLen
:
bLen
);
return
strncmp
(
aName
,
bName
,
aLen
>
bLen
?
aLen
:
bLen
);
}
}
// tfile name suid-colId-version.tindex
static
int
tfileParseFileName
(
const
char
*
filename
,
uint64_t
*
suid
,
int
*
colId
,
int
*
version
)
{
static
int
tfileParseFileName
(
const
char
*
filename
,
uint64_t
*
suid
,
int
*
colId
,
int
*
version
)
{
if
(
3
==
sscanf
(
filename
,
"%"
PRIu64
"-%d-%d.tindex"
,
suid
,
colId
,
version
))
{
if
(
3
==
sscanf
(
filename
,
"%"
PRIu64
"-%d-%d.tindex"
,
suid
,
colId
,
version
))
{
// read suid & colid & version success
// read suid & colid & version success
...
@@ -74,14 +103,28 @@ TFileCache *tfileCacheCreate(const char *path) {
...
@@ -74,14 +103,28 @@ TFileCache *tfileCacheCreate(const char *path) {
uint64_t
suid
;
uint64_t
suid
;
int
colId
,
version
;
int
colId
,
version
;
if
(
0
!=
tfileParseFileName
(
file
,
&
suid
,
&
colId
,
&
version
))
{
if
(
0
!=
tfileParseFileName
(
file
,
&
suid
,
&
colId
,
&
version
))
{
// invalid file, just skip
goto
End
;
continue
;
continue
;
}
}
free
((
void
*
)
file
);
}
taosArrayDestroy
(
files
);
TFileReader
*
reader
=
calloc
(
1
,
sizeof
(
TFileReader
));
reader
->
ctx
=
writerCtxCreate
(
TFile
,
file
,
true
,
1024
*
64
);
if
(
reader
->
ctx
==
NULL
)
{
TFileReaderDestroy
(
reader
);
indexError
(
"failed to open index: %s"
,
file
);
goto
End
;
}
TFileReadHeader
header
=
{
0
};
if
(
0
!=
tfileLoadHeader
(
reader
->
ctx
,
&
header
))
{
TFileReaderDestroy
(
reader
);
indexError
(
"failed to load index header, index Id: %s"
,
file
);
}
}
taosArrayDestroyEx
(
files
,
tfileDestroyFileName
);
return
tcache
;
return
tcache
;
End:
taosArrayDestroyEx
(
files
,
tfileDestroyFileName
);
return
NULL
;
}
}
void
tfileCacheDestroy
(
TFileCache
*
tcache
)
{
void
tfileCacheDestroy
(
TFileCache
*
tcache
)
{
...
@@ -103,13 +146,25 @@ void tfileCachePut(TFileCache *tcache, TFileCacheKey *key, TFileReader *reader)
...
@@ -103,13 +146,25 @@ void tfileCachePut(TFileCache *tcache, TFileCacheKey *key, TFileReader *reader)
}
}
TFileReader
*
tfileReaderCreate
()
{
}
void
TFileReaderDestroy
(
TFileReader
*
reader
)
{
if
(
reader
==
NULL
)
{
return
;
}
writerCtxDestroy
(
reader
->
ctx
);
free
(
reader
);
}
TFileWriter
*
tfileWriterCreate
(
const
char
*
suid
,
const
char
*
colName
);
void
tfileWriterDestroy
(
TFileWriter
*
tw
);
IndexTFile
*
indexTFileCreate
(
const
char
*
path
)
{
IndexTFile
*
indexTFileCreate
(
const
char
*
path
)
{
IndexTFile
*
tfile
=
calloc
(
1
,
sizeof
(
IndexTFile
));
IndexTFile
*
tfile
=
calloc
(
1
,
sizeof
(
IndexTFile
));
tfile
->
cache
=
tfileCacheCreate
(
path
);
tfile
->
cache
=
tfileCacheCreate
(
path
);
return
tfile
;
return
tfile
;
}
}
void
IndexTFileDestroy
(
IndexTFile
*
tfile
)
{
void
IndexTFileDestroy
(
IndexTFile
*
tfile
)
{
...
...
source/libs/parser/test/mockCatalog.cpp
浏览文件 @
be2958dc
...
@@ -17,6 +17,9 @@
...
@@ -17,6 +17,9 @@
#include <iostream>
#include <iostream>
#include "stub.h"
#include "addr_any.h"
namespace
{
namespace
{
void
generateTestT1
(
MockCatalogService
*
mcs
)
{
void
generateTestT1
(
MockCatalogService
*
mcs
)
{
...
@@ -38,16 +41,36 @@ void generateTestST1(MockCatalogService* mcs) {
...
@@ -38,16 +41,36 @@ void generateTestST1(MockCatalogService* mcs) {
}
}
int32_t
catalogGetHandle
(
const
char
*
clusterId
,
struct
SCatalog
**
catalogHandle
)
{
int32_t
__
catalogGetHandle
(
const
char
*
clusterId
,
struct
SCatalog
**
catalogHandle
)
{
return
mockCatalogService
->
catalogGetHandle
(
clusterId
,
catalogHandle
);
return
mockCatalogService
->
catalogGetHandle
(
clusterId
,
catalogHandle
);
}
}
int32_t
catalogGetTableMeta
(
struct
SCatalog
*
pCatalog
,
void
*
pRpc
,
const
SEpSet
*
pMgmtEps
,
const
char
*
pDBName
,
const
char
*
pTableName
,
STableMeta
**
pTableMeta
)
{
int32_t
__
catalogGetTableMeta
(
struct
SCatalog
*
pCatalog
,
void
*
pRpc
,
const
SEpSet
*
pMgmtEps
,
const
char
*
pDBName
,
const
char
*
pTableName
,
STableMeta
**
pTableMeta
)
{
return
mockCatalogService
->
catalogGetTableMeta
(
pCatalog
,
pRpc
,
pMgmtEps
,
pDBName
,
pTableName
,
pTableMeta
);
return
mockCatalogService
->
catalogGetTableMeta
(
pCatalog
,
pRpc
,
pMgmtEps
,
pDBName
,
pTableName
,
pTableMeta
);
}
}
void
initMetaDataEnv
()
{
void
initMetaDataEnv
()
{
mockCatalogService
.
reset
(
new
MockCatalogService
());
mockCatalogService
.
reset
(
new
MockCatalogService
());
static
Stub
stub
;
stub
.
set
(
catalogGetHandle
,
__catalogGetHandle
);
stub
.
set
(
catalogGetTableMeta
,
__catalogGetTableMeta
);
{
AddrAny
any
(
"libcatalog.so"
);
std
::
map
<
std
::
string
,
void
*>
result
;
any
.
get_global_func_addr_dynsym
(
"^catalogGetHandle$"
,
result
);
for
(
const
auto
&
f
:
result
)
{
stub
.
set
(
f
.
second
,
__catalogGetHandle
);
}
}
{
AddrAny
any
(
"libcatalog.so"
);
std
::
map
<
std
::
string
,
void
*>
result
;
any
.
get_global_func_addr_dynsym
(
"^catalogGetTableMeta$"
,
result
);
for
(
const
auto
&
f
:
result
)
{
stub
.
set
(
f
.
second
,
__catalogGetTableMeta
);
}
}
}
}
void
generateMetaData
()
{
void
generateMetaData
()
{
...
...
source/libs/parser/test/mockCatalog.h
浏览文件 @
be2958dc
...
@@ -23,7 +23,7 @@ void generateMetaData();
...
@@ -23,7 +23,7 @@ void generateMetaData();
void
destroyMetaDataEnv
();
void
destroyMetaDataEnv
();
// mock
// mock
int32_t
catalogGetHandle
(
const
char
*
clusterId
,
struct
SCatalog
**
catalogHandle
);
//
int32_t catalogGetHandle(const char *clusterId, struct SCatalog** catalogHandle);
int32_t
catalogGetTableMeta
(
struct
SCatalog
*
pCatalog
,
void
*
pRpc
,
const
SEpSet
*
pMgmtEps
,
const
char
*
pDBName
,
const
char
*
pTableName
,
STableMeta
**
pTableMeta
);
//
int32_t catalogGetTableMeta(struct SCatalog* pCatalog, void *pRpc, const SEpSet* pMgmtEps, const char* pDBName, const char* pTableName, STableMeta** pTableMeta);
#endif // MOCK_CATALOG_H
#endif // MOCK_CATALOG_H
source/libs/planner/test/plannerTests.cpp
浏览文件 @
be2958dc
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
#pragma GCC diagnostic ignored "-Wunused-variable"
#pragma GCC diagnostic ignored "-Wunused-variable"
#pragma GCC diagnostic ignored "-Wsign-compare"
#pragma GCC diagnostic ignored "-Wsign-compare"
class
P
ars
erEnv
:
public
testing
::
Environment
{
class
P
lann
erEnv
:
public
testing
::
Environment
{
public:
public:
virtual
void
SetUp
()
{
virtual
void
SetUp
()
{
initMetaDataEnv
();
initMetaDataEnv
();
...
@@ -39,12 +39,12 @@ public:
...
@@ -39,12 +39,12 @@ public:
destroyMetaDataEnv
();
destroyMetaDataEnv
();
}
}
P
ars
erEnv
()
{}
P
lann
erEnv
()
{}
virtual
~
P
ars
erEnv
()
{}
virtual
~
P
lann
erEnv
()
{}
};
};
int
main
(
int
argc
,
char
*
argv
[])
{
int
main
(
int
argc
,
char
*
argv
[])
{
testing
::
AddGlobalTestEnvironment
(
new
P
ars
erEnv
());
testing
::
AddGlobalTestEnvironment
(
new
P
lann
erEnv
());
testing
::
InitGoogleTest
(
&
argc
,
argv
);
testing
::
InitGoogleTest
(
&
argc
,
argv
);
return
RUN_ALL_TESTS
();
return
RUN_ALL_TESTS
();
}
}
...
...
tests/script/jenkins/basic.txt
浏览文件 @
be2958dc
cd ../../../debug; cmake ..
cd ../../../debug; make
#======================b1-start===============
#======================b1-start===============
./test.sh -f general/field/2.sim
./test.sh -f general/user/basic1.sim
./test.sh -f general/field/3.sim
./test.sh -f general/field/4.sim
./test.sh -f general/field/5.sim
./test.sh -f general/field/6.sim
./test.sh -f general/field/bigint.sim
./test.sh -f general/field/binary.sim
./test.sh -f general/field/bool.sim
./test.sh -f general/field/single.sim
./test.sh -f general/field/smallint.sim
./test.sh -f general/field/tinyint.sim
./test.sh -f general/http/autocreate.sim
./test.sh -f general/http/chunked.sim
./test.sh -f general/http/gzip.sim
./test.sh -f general/http/restful.sim
./test.sh -f general/http/restful_insert.sim
./test.sh -f general/http/restful_limit.sim
./test.sh -f general/http/restful_full.sim
./test.sh -f general/http/prepare.sim
./test.sh -f general/http/telegraf.sim
./test.sh -f general/http/grafana_bug.sim
./test.sh -f general/http/grafana.sim
./test.sh -f general/insert/basic.sim
./test.sh -f general/insert/insert_drop.sim
./test.sh -f general/insert/query_block1_memory.sim
./test.sh -f general/insert/query_block2_memory.sim
./test.sh -f general/insert/query_block1_file.sim
./test.sh -f general/insert/query_block2_file.sim
./test.sh -f general/insert/query_file_memory.sim
./test.sh -f general/insert/query_multi_file.sim
./test.sh -f general/insert/tcp.sim
./test.sh -f general/parser/alter.sim
./test.sh -f general/parser/alter1.sim
./test.sh -f general/parser/alter_stable.sim
./test.sh -f general/parser/auto_create_tb.sim
./test.sh -f general/parser/auto_create_tb_drop_tb.sim
./test.sh -f general/parser/col_arithmetic_operation.sim
./test.sh -f general/parser/columnValue.sim
./test.sh -f general/parser/commit.sim
./test.sh -f general/parser/create_db.sim
./test.sh -f general/parser/create_mt.sim
./test.sh -f general/parser/create_tb.sim
./test.sh -f general/parser/dbtbnameValidate.sim
./test.sh -f general/parser/import_commit1.sim
./test.sh -f general/parser/import_commit2.sim
./test.sh -f general/parser/import_commit3.sim
./test.sh -f general/parser/insert_tb.sim
./test.sh -f general/parser/first_last.sim
./test.sh -f general/parser/lastrow.sim
./test.sh -f general/parser/nchar.sim
./test.sh -f general/parser/null_char.sim
./test.sh -f general/parser/single_row_in_tb.sim
./test.sh -f general/parser/select_from_cache_disk.sim
./test.sh -f general/parser/mixed_blocks.sim
./test.sh -f general/parser/selectResNum.sim
./test.sh -f general/parser/limit.sim
./test.sh -f general/parser/limit1.sim
./test.sh -f general/parser/limit1_tblocks100.sim
./test.sh -f general/parser/select_across_vnodes.sim
./test.sh -f general/parser/slimit1.sim
./test.sh -f general/parser/tbnameIn.sim
./test.sh -f general/parser/projection_limit_offset.sim
./test.sh -f general/parser/limit2.sim
./test.sh -f general/parser/fill.sim
./test.sh -f general/parser/fill_stb.sim
./test.sh -f general/parser/where.sim
./test.sh -f general/parser/slimit.sim
./test.sh -f general/parser/select_with_tags.sim
./test.sh -f general/parser/interp.sim
./test.sh -f general/parser/tags_dynamically_specifiy.sim
./test.sh -f general/parser/groupby.sim
./test.sh -f general/parser/set_tag_vals.sim
./test.sh -f general/parser/tags_filter.sim
./test.sh -f general/parser/slimit_alter_tags.sim
./test.sh -f general/parser/join.sim
./test.sh -f general/parser/join_multivnode.sim
./test.sh -f general/parser/binary_escapeCharacter.sim
./test.sh -f general/parser/repeatAlter.sim
./test.sh -f general/parser/union.sim
./test.sh -f general/parser/topbot.sim
./test.sh -f general/db/nosuchfile.sim
./test.sh -f general/parser/function.sim
./test.sh -f unique/cluster/vgroup100.sim
./test.sh -f unique/http/admin.sim
./test.sh -f unique/http/opentsdb.sim
./test.sh -f unique/import/replica2.sim
./test.sh -f unique/import/replica3.sim
./test.sh -f general/alter/cached_schema_after_alter.sim
#======================b1-end===============
#======================b1-end===============
#======================b2-start===============
./test.sh -f general/wal/sync.sim
./test.sh -f general/wal/kill.sim
./test.sh -f general/wal/maxtables.sim
./test.sh -f general/user/authority.sim
./test.sh -f general/user/monitor.sim
./test.sh -f general/user/pass_alter.sim
./test.sh -f general/user/pass_len.sim
./test.sh -f general/user/user_create.sim
./test.sh -f general/user/user_len.sim
./test.sh -f general/vector/metrics_field.sim
./test.sh -f general/vector/metrics_mix.sim
./test.sh -f general/vector/metrics_query.sim
./test.sh -f general/vector/metrics_tag.sim
./test.sh -f general/vector/metrics_time.sim
./test.sh -f general/vector/multi.sim
./test.sh -f general/vector/single.sim
./test.sh -f general/vector/table_field.sim
./test.sh -f general/vector/table_mix.sim
./test.sh -f general/vector/table_query.sim
./test.sh -f general/vector/table_time.sim
./test.sh -f unique/account/account_create.sim
./test.sh -f unique/account/account_delete.sim
./test.sh -f unique/account/account_len.sim
./test.sh -f unique/account/authority.sim
./test.sh -f unique/account/basic.sim
./test.sh -f unique/account/paras.sim
./test.sh -f unique/account/pass_alter.sim
./test.sh -f unique/account/pass_len.sim
./test.sh -f unique/account/usage.sim
./test.sh -f unique/account/user_create.sim
./test.sh -f unique/account/user_len.sim
./test.sh -f unique/big/maxvnodes.sim
./test.sh -f unique/big/tcp.sim
./test.sh -f unique/cluster/alter.sim
./test.sh -f unique/cluster/cache.sim
./test.sh -f unique/http/admin.sim
./test.sh -f unique/http/opentsdb.sim
./test.sh -f unique/import/replica2.sim
./test.sh -f unique/import/replica3.sim
./test.sh -f general/alter/cached_schema_after_alter.sim
#======================b2-end===============
#======================b3-start===============
./test.sh -f unique/arbitrator/check_cluster_cfg_para.sim
#./test.sh -f unique/arbitrator/dn2_mn1_cache_file_sync.sim
./test.sh -f unique/arbitrator/dn3_mn1_full_createTableFail.sim
./test.sh -f unique/arbitrator/dn3_mn1_multiCreateDropTable.sim
#./test.sh -f unique/arbitrator/dn3_mn1_nw_disable_timeout_autoDropDnode.sim
#./test.sh -f unique/arbitrator/dn3_mn1_replica2_wal1_AddDelDnode.sim
./test.sh -f unique/arbitrator/dn3_mn1_replica_change_dropDnod.sim
./test.sh -f unique/arbitrator/dn3_mn1_replica_change.sim
#./test.sh -f unique/arbitrator/dn3_mn1_stopDnode_timeout.sim
# lower the priority while file corruption
#./test.sh -f unique/arbitrator/dn3_mn1_vnode_change.sim
#./test.sh -f unique/arbitrator/dn3_mn1_vnode_corruptFile_offline.sim
#./test.sh -f unique/arbitrator/dn3_mn1_vnode_corruptFile_online.sim
#./test.sh -f unique/arbitrator/dn3_mn1_vnode_createErrData_online.sim
./test.sh -f unique/arbitrator/dn3_mn1_vnode_noCorruptFile_offline.sim
./test.sh -f unique/arbitrator/dn3_mn1_vnode_delDir.sim
./test.sh -f unique/arbitrator/dn3_mn1_r2_vnode_delDir.sim
./test.sh -f unique/arbitrator/dn3_mn1_r3_vnode_delDir.sim
./test.sh -f unique/arbitrator/dn3_mn1_vnode_nomaster.sim
./test.sh -f unique/arbitrator/dn3_mn2_killDnode.sim
./test.sh -f unique/arbitrator/offline_replica2_alterTable_online.sim
./test.sh -f unique/arbitrator/offline_replica2_alterTag_online.sim
./test.sh -f unique/arbitrator/offline_replica2_createTable_online.sim
./test.sh -f unique/arbitrator/offline_replica2_dropDb_online.sim
./test.sh -f unique/arbitrator/offline_replica2_dropTable_online.sim
./test.sh -f unique/arbitrator/offline_replica3_alterTable_online.sim
./test.sh -f unique/arbitrator/offline_replica3_alterTag_online.sim
./test.sh -f unique/arbitrator/offline_replica3_createTable_online.sim
./test.sh -f unique/arbitrator/offline_replica3_dropDb_online.sim
./test.sh -f unique/arbitrator/offline_replica3_dropTable_online.sim
./test.sh -f unique/arbitrator/replica_changeWithArbitrator.sim
./test.sh -f unique/arbitrator/sync_replica2_alterTable_add.sim
./test.sh -f unique/arbitrator/sync_replica2_alterTable_drop.sim
./test.sh -f unique/arbitrator/sync_replica2_dropDb.sim
./test.sh -f unique/arbitrator/sync_replica2_dropTable.sim
./test.sh -f unique/arbitrator/sync_replica3_alterTable_add.sim
./test.sh -f unique/arbitrator/sync_replica3_alterTable_drop.sim
./test.sh -f unique/arbitrator/sync_replica3_dropDb.sim
./test.sh -f unique/arbitrator/sync_replica3_dropTable.sim
./test.sh -f unique/migrate/mn2_vn2_repl2_rmMnodeDir.sim
./test.sh -f unique/migrate/mn2_vn2_repl2_rmMnodeVnodeDir.sim
./test.sh -f unique/migrate/mn2_vn2_repl2_rmMnodeVnodeDir_stopAll_starAll.sim
./test.sh -f unique/migrate/mn2_vn2_repl2_rmVnodeDir.sim
./test.sh -f unique/stable/balance_replica1.sim
./test.sh -f unique/stable/dnode2_stop.sim
./test.sh -f unique/stable/dnode2.sim
./test.sh -f unique/stable/dnode3.sim
./test.sh -f unique/stable/replica2_dnode4.sim
./test.sh -f unique/stable/replica2_vnode3.sim
./test.sh -f unique/stable/replica3_dnode6.sim
./test.sh -f unique/stable/replica3_vnode3.sim
#======================b3-end===============
#======================b4-start===============
./test.sh -f general/alter/count.sim
./test.sh -f general/alter/dnode.sim
./test.sh -f general/alter/import.sim
./test.sh -f general/alter/insert1.sim
./test.sh -f general/alter/insert2.sim
./test.sh -f general/alter/metrics.sim
./test.sh -f general/alter/table.sim
./test.sh -f general/cache/new_metrics.sim
./test.sh -f general/cache/restart_metrics.sim
./test.sh -f general/cache/restart_table.sim
./test.sh -f general/connection/connection.sim
./test.sh -f general/column/commit.sim
./test.sh -f general/column/metrics.sim
./test.sh -f general/column/table.sim
./test.sh -f general/compress/commitlog.sim
./test.sh -f general/compress/compress.sim
./test.sh -f general/compress/compress2.sim
./test.sh -f general/compress/uncompress.sim
./test.sh -f general/stable/disk.sim
./test.sh -f general/stable/dnode3.sim
./test.sh -f general/stable/metrics.sim
./test.sh -f general/stable/refcount.sim
./test.sh -f general/stable/show.sim
./test.sh -f general/stable/values.sim
./test.sh -f general/stable/vnode3.sim
./test.sh -f unique/column/replica3.sim
./test.sh -f issue/TD-2713.sim
./test.sh -f general/parser/select_distinct_tag.sim
./test.sh -f unique/mnode/mgmt30.sim
./test.sh -f issue/TD-2677.sim
./test.sh -f issue/TD-2680.sim
./test.sh -f unique/dnode/lossdata.sim
#======================b4-end===============
#======================b5-start===============
./test.sh -f unique/dnode/alternativeRole.sim
./test.sh -f unique/dnode/balance1.sim
./test.sh -f unique/dnode/balance2.sim
./test.sh -f unique/dnode/balance3.sim
./test.sh -f unique/dnode/balancex.sim
./test.sh -f unique/dnode/offline1.sim
./test.sh -f unique/dnode/offline2.sim
./test.sh -f general/stream/metrics_del.sim
./test.sh -f general/stream/metrics_replica1_vnoden.sim
./test.sh -f general/stream/restart_stream.sim
./test.sh -f general/stream/stream_3.sim
./test.sh -f general/stream/stream_restart.sim
./test.sh -f general/stream/table_del.sim
./test.sh -f general/stream/table_replica1_vnoden.sim
./test.sh -f general/connection/test_old_data.sim
./test.sh -f unique/dnode/datatrans_3node.sim
./test.sh -f unique/dnode/datatrans_3node_2.sim
./test.sh -f general/db/alter_tables_d2.sim
./test.sh -f general/db/alter_tables_v1.sim
./test.sh -f general/db/alter_tables_v4.sim
#======================b5-end===============
#======================b6-start===============
./test.sh -f unique/dnode/reason.sim
./test.sh -f unique/dnode/remove1.sim
./test.sh -f unique/dnode/remove2.sim
./test.sh -f unique/dnode/vnode_clean.sim
./test.sh -f unique/db/commit.sim
./test.sh -f unique/db/delete.sim
./test.sh -f unique/db/delete_part.sim
./test.sh -f unique/db/replica_add12.sim
./test.sh -f unique/db/replica_add13.sim
./test.sh -f unique/db/replica_add23.sim
./test.sh -f unique/db/replica_reduce21.sim
./test.sh -f unique/db/replica_reduce32.sim
./test.sh -f unique/db/replica_reduce31.sim
./test.sh -f unique/db/replica_part.sim
./test.sh -f unique/vnode/many.sim
./test.sh -f unique/vnode/replica2_basic2.sim
./test.sh -f unique/vnode/replica2_repeat.sim
./test.sh -f unique/vnode/replica3_basic.sim
./test.sh -f unique/vnode/replica3_repeat.sim
./test.sh -f unique/vnode/replica3_vgroup.sim
./test.sh -f unique/dnode/monitor.sim
./test.sh -f unique/dnode/monitor_bug.sim
./test.sh -f unique/dnode/simple.sim
./test.sh -f unique/dnode/data1.sim
./test.sh -f unique/dnode/m2.sim
./test.sh -f unique/dnode/m3.sim
./test.sh -f unique/dnode/offline3.sim
./test.sh -f general/wal/kill.sim
./test.sh -f general/wal/maxtables.sim
./test.sh -f general/import/basic.sim
./test.sh -f general/import/commit.sim
./test.sh -f general/import/large.sim
./test.sh -f general/import/replica1.sim
./test.sh -f unique/cluster/balance1.sim
./test.sh -f unique/cluster/balance2.sim
./test.sh -f unique/cluster/balance3.sim
#======================b6-end===============
#======================b7-start===============
./test.sh -f general/compute/avg.sim
./test.sh -f general/compute/bottom.sim
./test.sh -f general/compute/count.sim
./test.sh -f general/compute/diff.sim
./test.sh -f general/compute/diff2.sim
./test.sh -f general/compute/first.sim
./test.sh -f general/compute/interval.sim
./test.sh -f general/compute/last.sim
./test.sh -f general/compute/leastsquare.sim
./test.sh -f general/compute/max.sim
./test.sh -f general/compute/min.sim
./test.sh -f general/compute/null.sim
./test.sh -f general/compute/percentile.sim
./test.sh -f general/compute/stddev.sim
./test.sh -f general/compute/sum.sim
./test.sh -f general/compute/top.sim
./test.sh -f general/db/alter_option.sim
./test.sh -f general/db/alter_vgroups.sim
./test.sh -f general/db/basic.sim
./test.sh -f general/db/basic1.sim
./test.sh -f general/db/basic2.sim
./test.sh -f general/db/basic3.sim
./test.sh -f general/db/basic4.sim
./test.sh -f general/db/basic5.sim
./test.sh -f general/db/delete_reuse1.sim
./test.sh -f general/db/delete_reuse2.sim
./test.sh -f general/db/delete_reusevnode.sim
./test.sh -f general/db/delete_reusevnode2.sim
./test.sh -f general/db/delete_writing1.sim
./test.sh -f general/db/delete_writing2.sim
./test.sh -f general/db/delete.sim
./test.sh -f general/db/len.sim
./test.sh -f general/db/repeat.sim
./test.sh -f general/db/tables.sim
./test.sh -f general/db/vnodes.sim
./test.sh -f general/db/topic1.sim
./test.sh -f general/db/topic2.sim
./test.sh -f general/table/autocreate.sim
./test.sh -f general/table/basic1.sim
./test.sh -f general/table/basic2.sim
./test.sh -f general/table/basic3.sim
./test.sh -f general/table/bigint.sim
./test.sh -f general/table/binary.sim
./test.sh -f general/table/bool.sim
./test.sh -f general/table/column_name.sim
./test.sh -f general/table/column_num.sim
./test.sh -f general/table/column_value.sim
./test.sh -f general/table/column2.sim
./test.sh -f general/table/date.sim
./test.sh -f general/table/db.table.sim
./test.sh -f general/table/delete_reuse1.sim
./test.sh -f general/table/delete_reuse2.sim
./test.sh -f general/table/delete_writing.sim
./test.sh -f general/table/describe.sim
./test.sh -f general/table/double.sim
./test.sh -f general/table/float.sim
./test.sh -f general/table/int.sim
./test.sh -f general/table/limit.sim
./test.sh -f general/table/smallint.sim
./test.sh -f general/table/table_len.sim
./test.sh -f general/table/table.sim
./test.sh -f general/table/tinyint.sim
./test.sh -f general/table/vgroup.sim
./test.sh -f general/table/createmulti.sim
./test.sh -f unique/mnode/mgmt20.sim
./test.sh -f unique/mnode/mgmt21.sim
./test.sh -f unique/mnode/mgmt22.sim
./test.sh -f unique/mnode/mgmt23.sim
./test.sh -f unique/mnode/mgmt24.sim
./test.sh -f unique/mnode/mgmt25.sim
./test.sh -f unique/mnode/mgmt26.sim
./test.sh -f unique/mnode/mgmt33.sim
./test.sh -f unique/mnode/mgmt34.sim
./test.sh -f unique/mnode/mgmtr2.sim
./test.sh -f unique/arbitrator/insert_duplicationTs.sim
./test.sh -f general/parser/join_manyblocks.sim
./test.sh -f general/parser/stableOp.sim
./test.sh -f general/parser/timestamp.sim
./test.sh -f general/parser/sliding.sim
./test.sh -f general/parser/having.sim
./test.sh -f general/parser/having_child.sim
./test.sh -f general/parser/between_and.sim
./test.sh -f general/parser/last_cache.sim
./test.sh -f unique/big/balance.sim
#======================b7-end===============
tests/test-all.sh
浏览文件 @
be2958dc
...
@@ -41,7 +41,7 @@ function dohavecore(){
...
@@ -41,7 +41,7 @@ function dohavecore(){
else
else
cd
../../
cd
../../
if
[[
$1
==
1
]]
;
then
if
[[
$1
==
1
]]
;
then
tar
-zcPf
$corepath
'taos_'
`
date
"+%Y_%m_%d_%H_%M_%S"
`
.tar.gz debug/build/bin/taosd debug/build/bin/tsim debug/build/lib/libtaos
*
so
*
#tar -zcPf $corepath'taos_'`date "+%Y_%m_%d_%H_%M_%S"`.tar.gz debug
cp
-r
sim ~/sim_
`
date
"+%Y_%m_%d_%H:%M:%S"
`
cp
-r
sim ~/sim_
`
date
"+%Y_%m_%d_%H:%M:%S"
`
fi
fi
fi
fi
...
@@ -67,8 +67,8 @@ function runSimCaseOneByOne {
...
@@ -67,8 +67,8 @@ function runSimCaseOneByOne {
else
else
echo
-n
$case
echo
-n
$case
./test.sh
-f
$case
>
/dev/null 2>&1
&&
\
./test.sh
-f
$case
>
/dev/null 2>&1
&&
\
(
grep
-q
'script.*'
$case
'.*failed.*, err.*lineNum'
../
../
sim/tsim/log/taoslog0.0
&&
echo
-e
"
${
RED
}
failed
${
NC
}
"
|
tee
-a
out.log
||
echo
-e
"
${
GREEN
}
success
${
NC
}
"
|
tee
-a
out.log
)||
\
(
grep
-q
'script.*'
$case
'.*failed.*, err.*lineNum'
../sim/tsim/log/taoslog0.0
&&
echo
-e
"
${
RED
}
failed
${
NC
}
"
|
tee
-a
out.log
||
echo
-e
"
${
GREEN
}
success
${
NC
}
"
|
tee
-a
out.log
)||
\
(
grep
-q
'script.*success.*m$'
../
../
sim/tsim/log/taoslog0.0
&&
echo
-e
"
${
GREEN
}
success
${
NC
}
"
|
tee
-a
out.log
)
||
\
(
grep
-q
'script.*success.*m$'
../sim/tsim/log/taoslog0.0
&&
echo
-e
"
${
GREEN
}
success
${
NC
}
"
|
tee
-a
out.log
)
||
\
echo
-e
"
${
RED
}
failed
${
NC
}
"
|
tee
-a
out.log
echo
-e
"
${
RED
}
failed
${
NC
}
"
|
tee
-a
out.log
fi
fi
out_log
=
`
tail
-1
out.log
`
out_log
=
`
tail
-1
out.log
`
...
@@ -99,11 +99,12 @@ function runSimCaseOneByOnefq {
...
@@ -99,11 +99,12 @@ function runSimCaseOneByOnefq {
(
grep
-q
'script.*success.*m$'
../../../sim/tsim/log/taoslog0.0
&&
echo
-e
"
${
GREEN
}
success
${
NC
}
"
|
tee
-a
out.log
)
||
\
(
grep
-q
'script.*success.*m$'
../../../sim/tsim/log/taoslog0.0
&&
echo
-e
"
${
GREEN
}
success
${
NC
}
"
|
tee
-a
out.log
)
||
\
(
echo
-e
"
${
RED
}
failed
${
NC
}
"
|
tee
-a
out.log
&&
echo
'=====================log====================='
&&
cat
case
.log
)
(
echo
-e
"
${
RED
}
failed
${
NC
}
"
|
tee
-a
out.log
&&
echo
'=====================log====================='
&&
cat
case
.log
)
else
else
pwd
echo
-n
$case
echo
-n
$case
./test.sh
-f
$case
>
../../sim/case.log 2>&1
&&
\
./test.sh
-f
$case
>
../../sim/case.log 2>&1
&&
\
(
grep
-q
'script.*'
$case
'.*failed.*, err.*lineNum'
../../sim/tsim/log/taoslog0.0
&&
echo
-e
"
${
RED
}
failed
${
NC
}
"
|
tee
-a
out.log
||
echo
-e
"
${
GREEN
}
success
${
NC
}
"
|
tee
-a
out.log
)||
\
(
grep
-q
'script.*'
$case
'.*failed.*, err.*lineNum'
../../sim/tsim/log/taoslog0.0
&&
echo
-e
"
${
RED
}
failed
${
NC
}
"
|
tee
-a
out.log
||
echo
-e
"
${
GREEN
}
success
${
NC
}
"
|
tee
-a
out.log
)||
\
(
grep
-q
'script.*success.*m$'
../../sim/tsim/log/taoslog0.0
&&
echo
-e
"
${
GREEN
}
success
${
NC
}
"
|
tee
-a
out.log
)
||
\
(
grep
-q
'script.*success.*m$'
../../sim/tsim/log/taoslog0.0
&&
echo
-e
"
${
GREEN
}
success
${
NC
}
"
|
tee
-a
out.log
)
||
\
(
echo
-e
"
${
RED
}
failed
${
NC
}
"
|
tee
-a
out.log
&&
echo
'=====================log====================='
&&
cat
case
.log
)
(
echo
-e
"
${
RED
}
failed
${
NC
}
"
|
tee
-a
out.log
&&
echo
'=====================log====================='
&&
pwd
&&
cat
../../sim/
case.log
)
fi
fi
out_log
=
`
tail
-1
out.log
`
out_log
=
`
tail
-1
out.log
`
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录