Merge pull request #30155 from taosdata/doc/internal
fix: enable unitest
This commit is contained in:
commit
82b65e0c1e
|
@ -21,19 +21,18 @@ include(${TD_SUPPORT_DIR}/cmake.version)
|
|||
include(${TD_SUPPORT_DIR}/cmake.install)
|
||||
|
||||
set_property(GLOBAL PROPERTY GLOBAL_DEPENDS_NO_CYCLES OFF)
|
||||
|
||||
add_library(api INTERFACE)
|
||||
target_include_directories(api INTERFACE "include/client")
|
||||
|
||||
add_subdirectory(contrib)
|
||||
add_subdirectory(source)
|
||||
add_subdirectory(tools)
|
||||
add_subdirectory(utils)
|
||||
add_subdirectory(tests)
|
||||
add_subdirectory(docs/doxgen)
|
||||
|
||||
if(${BUILD_TEST})
|
||||
include(CTest)
|
||||
enable_testing()
|
||||
add_subdirectory(examples/c)
|
||||
endif(${BUILD_TEST})
|
||||
endif(${BUILD_TEST})
|
||||
|
||||
add_library(api INTERFACE)
|
||||
target_include_directories(api INTERFACE "include/client")
|
||||
add_subdirectory(source)
|
||||
add_subdirectory(tools)
|
||||
add_subdirectory(utils)
|
||||
add_subdirectory(tests)
|
||||
add_subdirectory(docs/doxgen)
|
||||
|
|
|
@ -196,7 +196,7 @@ TEST(osFileTests, taosCopyFile) {
|
|||
retsize = taosReadFromCFile(NULL, 0, 0, NULL);
|
||||
EXPECT_EQ(retsize, 0);
|
||||
|
||||
taosRemoveFile(from);
|
||||
taosRemoveFile(from);
|
||||
}
|
||||
|
||||
TEST(osFileTests, taosCreateFile) {
|
||||
|
|
|
@ -389,7 +389,7 @@ TEST(osTest, osFile) {
|
|||
(void)taosThreadJoin(thread2, NULL);
|
||||
taosThreadClear(&thread2);
|
||||
|
||||
// int ret = taosRemoveFile(fname);
|
||||
taosRemoveFile(fname);
|
||||
// ASSERT_EQ(ret, 0);
|
||||
// printf("remove file success");
|
||||
}
|
||||
|
@ -651,6 +651,8 @@ TEST(osTest, osFilePerformance) {
|
|||
taosMemoryFree(writeBuffer);
|
||||
taosMemoryFree(readBuffer);
|
||||
|
||||
taosRemoveFile(fname);
|
||||
|
||||
(void)printf("Test Write file %d times, cost: %" PRId64 "us\n", TESTTIMES, WriteFileCost);
|
||||
(void)printf("Test Read file %d times, cost: %" PRId64 "us\n", TESTTIMES, ReadFileCost);
|
||||
(void)printf("Test OpenForWrite & Close file %d times, cost: %" PRId64 "us\n", TESTTIMES, OpenForWriteCloseFileCost);
|
||||
|
|
Loading…
Reference in New Issue