aboutsummaryrefslogtreecommitdiff
path: root/test/unit
diff options
context:
space:
mode:
authorJohn Szakmeister <john@szakmeister.net>2014-03-03 10:09:06 -0500
committerJohn Szakmeister <john@szakmeister.net>2014-03-21 15:22:00 -0400
commit0b2f6a0cf4c50d86744b1d3d774103db39773b4c (patch)
tree7bbc6275200f2c42ba20bf0a910c2b92fbdc4a50 /test/unit
parent5dd0ce4263721b636f5b006a47ceb7e769e10dca (diff)
downloadrneovim-0b2f6a0cf4c50d86744b1d3d774103db39773b4c.tar.gz
rneovim-0b2f6a0cf4c50d86744b1d3d774103db39773b4c.tar.bz2
rneovim-0b2f6a0cf4c50d86744b1d3d774103db39773b4c.zip
Revamp the build system.
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.
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/helpers.moon12
1 files changed, 10 insertions, 2 deletions
diff --git a/test/unit/helpers.moon b/test/unit/helpers.moon
index d41a7465d6..77d491a008 100644
--- a/test/unit/helpers.moon
+++ b/test/unit/helpers.moon
@@ -1,7 +1,11 @@
ffi = require 'ffi'
-- load neovim shared library
-libnvim = ffi.load './build/src/libnvim-test.so'
+testlib = os.getenv 'NVIM_TEST_LIB'
+unless testlib
+ testlib = './build/src/libnvim-test.so'
+
+libnvim = ffi.load testlib
-- Luajit ffi parser doesn't understand preprocessor directives, so
-- this helper function removes common directives before passing it the to ffi.
@@ -22,8 +26,12 @@ cimport = (path) ->
return libnvim
+testinc = os.getenv 'TEST_INCLUDES'
+unless testinc
+ testinc = './build/test/includes/post'
+
cppimport = (path) ->
- return cimport './test/includes/post/' .. path
+ return cimport testinc .. '/' .. path
cimport './src/types.h'