From 25f24af05d310abd82d6d904be53a891782d88dc Mon Sep 17 00:00:00 2001 From: xinsheng Ren <285808407@qq.com> Date: Tue, 3 Jan 2023 10:19:32 +0800 Subject: [PATCH] add os subtest (#19304) * add os subtest * fix/test.cpp include header file Co-authored-by: facetosea <25808407@qq.com> --- source/os/CMakeLists.txt | 6 +++++- source/os/test/osTests.cpp | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/source/os/CMakeLists.txt b/source/os/CMakeLists.txt index 5d9b6ee5cc..3aac5e9775 100644 --- a/source/os/CMakeLists.txt +++ b/source/os/CMakeLists.txt @@ -59,4 +59,8 @@ endif() IF (JEMALLOC_ENABLED) target_link_libraries(os PUBLIC -ljemalloc) -ENDIF () \ No newline at end of file +ENDIF () + +if(${BUILD_TEST}) + add_subdirectory(test) +endif(${BUILD_TEST}) \ No newline at end of file diff --git a/source/os/test/osTests.cpp b/source/os/test/osTests.cpp index d79e1934de..cde31cf707 100644 --- a/source/os/test/osTests.cpp +++ b/source/os/test/osTests.cpp @@ -27,6 +27,7 @@ #pragma GCC diagnostic ignored "-Wpointer-arith" #include "os.h" +#include "tlog.h" TEST(osTest, osSystem) { const char *flags = "UTL FATAL "; -- GitLab