aboutsummaryrefslogtreecommitdiff
path: root/test/includes
Commit message (Collapse)AuthorAge
* build: remove unnecessary unit test code (#21940)dundargoc2023-01-24
| | | | | | 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.
* build: use modern cmake (#21589)dundargoc2023-01-10
| | | | | | | | | | | | | | | | | | | | | Replace old-school cmake with the so-called "Modern CMake", meaning preferring using targets and properties over directory settings and variables. This allows greater flexibility, robustness and clarity over how the code works. The following deprecated commands will be replaced with their modern alternatives that operates on a specific target, rather than all targets in the current directory: - add_compile_options -> target_compile_options - include_directories -> target_include_directories - link_libraries -> target_link_libraries - add_definitions -> target_compile_definitions There are mainly four main targets that we currently use: nvim, libnvim, nvim-test (used by unittests) and ${texe} (used by check-single-includes). The goal is to explicitly define the dependencies of each target fully, rather than having everything be dependent on everything else.
* build: replace deprecated cmake features with their modern alternativesDundar Goc2022-08-03
| | | | | | | - Use DIRECTORY instead of PATH in get_filename_component - Use COMPILE_OPTIONS instead of COMPILE_FLAGS. COMPILE_FLAGS is treated as a single string while COMPILE_OPTIONS is a list, meaning that cmake will take care of any escaping and quoting automatically.
* build/tests: remove pre/uv.h #10531Daniel Hahler2019-07-28
| | | | | | Initially done in 28e59cb22, but does not appear to be necessary anymore. Uses UV_EEXIST directly, just like UV_ENOENT.
* test/includes: Use ${gen_cdefs} when pre-processing headersJames McCoy2018-07-11
| | | | | | | | | | | | | | | Now that uv.h is directly being included, pre-processing of test/includes/pre/uv.h fails on Linux with In file included from «SRCDIR»/neovim/test/includes/pre/uv.h:1: In file included from /usr/include/uv.h:62: /usr/include/uv/unix.h:72:11: fatal error: 'uv/pthread-barrier.h' file not found # include "uv/pthread-barrier.h" ^~~~~~~~~~~~~~~~~~~~~~ 1 error generated. This happens because we're missing -D_GNU_SOURCE (part of ${gen_cdefs}), which makes the pthread_barrier_* functionality visible.
* test: Rename includes/pre/uv-errno.h to includes/pre/uv.hJames McCoy2018-07-11
| | | | | | | | | | | | | | | | | | libuv users are only supposed to directly include uv.h. In v1.21.0, all the uv-*.h headers were renamed to uv/*.h, which caused the unit tests to fail with [123/125] Generating post/uv-errno.h FAILED: test/includes/post/uv-errno.h cd «SRCDIR»/src/neovim/build/test/includes && /usr/bin/clang -std=c99 -E -P «SRCDIR»/src/neovim/test/includes/pre/uv-errno.h -I/usr/include -I/usr/include -o «SRCDIR»/neovim/build/test/includes/post/uv-errno.h «SRCDIR»/src/neovim/test/includes/pre/uv-errno.h:1:10: error: 'uv-errno.h' file not found with <angled> include; use "quotes" instead #include <uv-errno.h> ^~~~~~~~~~~~ "uv-errno.h" The intention of the file is to extend libuv's error constants with more values used by the unit tests. This can just as easily be achieved without poking into pseudo-private header files.
* cmake: Organize targets into foldersb-r-o-c-k2018-06-17
| | | | | | Enabling CMake's USE_FOLDERS option and adding the FOLDER property to targets allows some IDEs to list the targets in an organized hierarchy of folders.
* Merge branch 'master' into s-dash-stdinZyX2017-12-03
|
* test: fix the unit test build on macOS Sierra (#6300)John Szakmeister2017-03-17
| | | | We need to add the SDK includes to the preprocessing step, otherwise it will fail to resolve the system includes such as sys/stat.h and fcntl.h.
* test: sys/fcntl.h -> fcntl.hMichael Reed2016-01-14
| | | | | | | | | POSIX.1-2008[1] says that the latter should be used, and all of our supported platforms would seem to support this scheme, apparently even Windows[2]. [1]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/fcntl.h.html [2]: https://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx
* Use libuv errors instead of errno in unit testsRui Abreu Ferreira2015-11-25
| | | | | | | | Replaced old unit tests for errno with libuv error codes UV_ENOENT and UV_EEXIST (for os_open and os_getperms). Added libuv include path to test/includes compiler calls - needed to get hold of libuv headers.
* os_open: add unit testsJustin M. Keyes2014-07-14
|
* Revamp the build system.John Szakmeister2014-03-21
| | | | | | | | | | | | | | | | | | | | | This achieves several goals: * Less reliance on scripts so we have better portability to Windows (though we still have a ways to go for proper Windows support). Luajit, luarocks, moonscript, and busted are all installed via CMake now. * Trying to make use of pkg-config to get the correct libraries. The latest libuv is still broken in this regard, but we'll at least be in a position to use it. * Allow the use of Ninja or make. The former runs faster in many environments, and automatically makes use of parallel builds. This also allows for system installed dependencies--though not through the Makefile just yet--and adds support for FreeBSD. This also make us build libuv and luajit as static libraries only, since we're only concerned about having static libraries for our bundled dependencies.
* Add unit tests for mch_[gs]etperm.Thomas Wienecke2014-03-15
Use preprocessor trick proposed by @mahkoh to import 'defines' like S_IRUSR.