Tests: Unify LibC tests to single location.

In a1720eed2a I added this new test,
but missed that there were already some "unit tests" for LibC over
in Userland/Tests/LibC. So lets unify these two locations.
This commit is contained in:
Brian Gianforcaro 2021-04-28 19:05:23 -07:00 committed by Andreas Kling
parent 7a0d7525f1
commit 8ae3191ab5
Notes: sideshowbarker 2024-07-18 18:55:33 +09:00
5 changed files with 10 additions and 13 deletions

View File

@ -8,8 +8,6 @@ file(GLOB AK_SOURCES "../../AK/*.cpp")
file(GLOB ELF_SOURCES "../Libraries/LibELF/*.cpp")
file(GLOB LIBC_SOURCES1 "../Libraries/LibC/*.cpp")
file(GLOB LIBC_SOURCES2 "../Libraries/LibC/*/*.cpp")
file(GLOB LIBC_TEST_SOURCES "../Libraries/LibC/Tests/*.cpp")
list(REMOVE_ITEM LIBC_SOURCES2 ${LIBC_TEST_SOURCES})
if ("${SERENITY_ARCH}" STREQUAL "i686")
file(GLOB LIBC_SOURCES3 "../Libraries/LibC/arch/i386/*.S")

View File

@ -1,5 +1,3 @@
add_subdirectory(Tests)
set(LIBC_SOURCES
arpa/inet.cpp
assert.cpp

View File

@ -1,5 +0,0 @@
file(GLOB TEST_SOURCES CONFIGURE_DEPENDS "*.cpp")
foreach(source ${TEST_SOURCES})
serenity_test(${source} LibC)
endforeach()

View File

@ -1,6 +1,11 @@
set(TEST_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/snprintf-correctness.cpp
${CMAKE_CURRENT_SOURCE_DIR}/strlcpy-correctness.cpp
${CMAKE_CURRENT_SOURCE_DIR}/TestLibCTime.cpp
)
file(GLOB CMD_SOURCES CONFIGURE_DEPENDS "*.cpp")
list(REMOVE_ITEM CMD_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/snprintf-correctness.cpp)
list(REMOVE_ITEM CMD_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/strlcpy-correctness.cpp)
list(REMOVE_ITEM CMD_SOURCES ${TEST_SOURCES})
# FIXME: These tests do not use LibTest
foreach(CMD_SRC ${CMD_SOURCES})
@ -10,5 +15,6 @@ foreach(CMD_SRC ${CMD_SOURCES})
install(TARGETS ${CMD_NAME} RUNTIME DESTINATION usr/Tests/LibC)
endforeach()
serenity_test(snprintf-correctness.cpp LibC)
serenity_test(strlcpy-correctness.cpp LibC)
foreach(source ${TEST_SOURCES})
serenity_test(${source} LibC)
endforeach()