aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2023-01-24 00:03:25 +0100
committerGitHub <noreply@github.com>2023-01-24 00:03:25 +0100
commit322c83896d6fe6ccc4f799f282d8e1feb7cf7ebe (patch)
treecd0d53993365817297638981cff3d1d856972866
parent5a94d24095c3f817310a82ef739952416b00a704 (diff)
downloadrneovim-322c83896d6fe6ccc4f799f282d8e1feb7cf7ebe.tar.gz
rneovim-322c83896d6fe6ccc4f799f282d8e1feb7cf7ebe.tar.bz2
rneovim-322c83896d6fe6ccc4f799f282d8e1feb7cf7ebe.zip
build: remove unnecessary unit test code (#21940)
The files generated by test/includes/CMakeLists.txt have been unused since commit c49e22d396. The unittests include the headers in test/includes directly without any processing, meaning that the CMakeLists.txt file is no longer necessary.
-rw-r--r--CMakeLists.txt3
-rw-r--r--test/cmakeconfig/paths.lua.in1
-rw-r--r--test/includes/CMakeLists.txt31
3 files changed, 1 insertions, 34 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b3ad290c7a..493c212996 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -348,7 +348,6 @@ install_helper(
add_subdirectory(src/nvim)
get_directory_property(NVIM_VERSION_CFLAGS DIRECTORY src/nvim DEFINITION NVIM_VERSION_CFLAGS)
-add_subdirectory(test/includes)
add_subdirectory(cmake.config)
add_subdirectory(test/functional/fixtures) # compile test programs
add_subdirectory(runtime)
@@ -371,7 +370,7 @@ endif()
if(BUSTED_PRG)
get_target_property(TEST_INCLUDE_DIRS main_lib INTERFACE_INCLUDE_DIRECTORIES)
- set(UNITTEST_PREREQS nvim-test unittest-headers)
+ set(UNITTEST_PREREQS nvim-test)
set(FUNCTIONALTEST_PREREQS nvim printenv-test printargs-test shell-test pwsh-test streams-test tty-test ${GENERATED_HELP_TAGS})
set(BENCHMARK_PREREQS nvim tty-test)
diff --git a/test/cmakeconfig/paths.lua.in b/test/cmakeconfig/paths.lua.in
index e3979981ba..6be238d838 100644
--- a/test/cmakeconfig/paths.lua.in
+++ b/test/cmakeconfig/paths.lua.in
@@ -6,7 +6,6 @@ for p in ("${TEST_INCLUDE_DIRS}" .. ";"):gmatch("[^;]+") do
end
module.test_build_dir = "${CMAKE_BINARY_DIR}"
-module.test_include_path = module.test_build_dir .. "/test/includes/post"
module.test_libnvim_path = "${TEST_LIBNVIM_PATH}"
module.test_source_path = "${CMAKE_SOURCE_DIR}"
module.test_lua_prg = "${LUA_PRG}"
diff --git a/test/includes/CMakeLists.txt b/test/includes/CMakeLists.txt
deleted file mode 100644
index 0d30736091..0000000000
--- a/test/includes/CMakeLists.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-file(GLOB_RECURSE PRE_HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} pre/*.h)
-
-# We need to add the SDK directories on OS X, and perhaps other operating
-# systems.
-set(gen_cflags)
-foreach(gen_include ${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES})
- list(APPEND gen_cflags ${CMAKE_INCLUDE_FLAG_C}${gen_include})
-endforeach()
-
-get_directory_property(gen_cdefs COMPILE_DEFINITIONS)
-foreach(gen_cdef ${gen_cdefs})
- if(NOT ${gen_cdef} MATCHES "INCLUDE_GENERATED_DECLARATIONS")
- list(APPEND gen_cflags "-D${gen_cdef}")
- endif()
-endforeach()
-
-foreach(hfile ${PRE_HEADERS})
- string(REGEX REPLACE ^pre/ post/ post_hfile ${hfile})
- get_filename_component(hdir ${CMAKE_CURRENT_BINARY_DIR}/${post_hfile} DIRECTORY)
- file(MAKE_DIRECTORY ${hdir})
- add_custom_command(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${post_hfile}
- COMMAND ${CMAKE_C_COMPILER} -std=c99 -E -P
- ${CMAKE_CURRENT_SOURCE_DIR}/${hfile}
- ${gen_cflags}
- -o ${CMAKE_CURRENT_BINARY_DIR}/${post_hfile})
- list(APPEND POST_HEADERS ${post_hfile})
-endforeach()
-
-add_custom_target(unittest-headers DEPENDS ${POST_HEADERS})
-set_target_properties(unittest-headers PROPERTIES FOLDER test)