fix: add test scripts

This commit is contained in:
dapan1121 2024-12-18 18:55:14 +08:00
parent d3af2ff741
commit 7baf97d70b
3 changed files with 22 additions and 4 deletions

View File

@ -11,6 +11,6 @@ target_link_libraries(
PRIVATE os util transport qcom nodes
)
# if(${BUILD_TEST})
# ADD_SUBDIRECTORY(test)
# endif(${BUILD_TEST})
if(${BUILD_TEST})
ADD_SUBDIRECTORY(test)
endif(${BUILD_TEST})

View File

@ -162,7 +162,7 @@ void ctgTestInitLogFile() {
(void)ctgdEnableDebug("cache", true);
(void)ctgdEnableDebug("lock", true);
if (taosInitLog(defaultLogFileNamePrefix, maxLogFileNum) < 0) {
if (taosInitLog(defaultLogFileNamePrefix, 1, false) < 0) {
(void)printf("failed to open log file in directory:%s\n", tsLogDir);
ASSERT(0);
}

18
tests/script/api/test.sh Executable file
View File

@ -0,0 +1,18 @@
#!/bin/bash
make clean
make
pgrep taosd || taosd >> /dev/null 2>&1 &
sleep 10
./dbTableRoute localhost
./batchprepare localhost
./stmt-crash localhost
./insertSameTs localhost
./passwdTest localhost
./whiteListTest localhost
./tmqViewTest