1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 07:57:46 +00:00

Tests: Establish root Tests directory, move Userland/Tests there

With the goal of centralizing all tests in the system, this is a
first step to establish a Tests sub-tree. It will contain all of
the unit tests and test harnesses for the various components in the
system.
This commit is contained in:
Brian Gianforcaro 2021-05-06 01:14:50 -07:00 committed by Andreas Kling
parent 6e641fadfa
commit fd0dbd1ebf
49 changed files with 1 additions and 1 deletions

23
Tests/LibC/CMakeLists.txt Normal file
View file

@ -0,0 +1,23 @@
set(TEST_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/snprintf-correctness.cpp
${CMAKE_CURRENT_SOURCE_DIR}/strlcpy-correctness.cpp
${CMAKE_CURRENT_SOURCE_DIR}/TestLibCTime.cpp
${CMAKE_CURRENT_SOURCE_DIR}/TestLibCMkTemp.cpp
${CMAKE_CURRENT_SOURCE_DIR}/TestLibCExec.cpp
${CMAKE_CURRENT_SOURCE_DIR}/TestLibCDirEnt.cpp
)
file(GLOB CMD_SOURCES CONFIGURE_DEPENDS "*.cpp")
list(REMOVE_ITEM CMD_SOURCES ${TEST_SOURCES})
# FIXME: These tests do not use LibTest
foreach(CMD_SRC ${CMD_SOURCES})
get_filename_component(CMD_NAME ${CMD_SRC} NAME_WE)
add_executable(${CMD_NAME} ${CMD_SRC})
target_link_libraries(${CMD_NAME} LibCore)
install(TARGETS ${CMD_NAME} RUNTIME DESTINATION usr/Tests/LibC)
endforeach()
foreach(source ${TEST_SOURCES})
serenity_test(${source} LibC)
endforeach()