diff --git a/CMakeLists.txt b/CMakeLists.txt index 2be056ec4e..07760e923b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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}) \ No newline at end of file +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) diff --git a/source/os/test/osFileTests.cpp b/source/os/test/osFileTests.cpp index f9e40c2703..97e5c8493d 100644 --- a/source/os/test/osFileTests.cpp +++ b/source/os/test/osFileTests.cpp @@ -196,7 +196,7 @@ TEST(osFileTests, taosCopyFile) { retsize = taosReadFromCFile(NULL, 0, 0, NULL); EXPECT_EQ(retsize, 0); - taosRemoveFile(from); + taosRemoveFile(from); } TEST(osFileTests, taosCreateFile) { diff --git a/source/os/test/osTests.cpp b/source/os/test/osTests.cpp index f4e7eff323..1e4bcbd3d6 100644 --- a/source/os/test/osTests.cpp +++ b/source/os/test/osTests.cpp @@ -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);