From f05a2891d3da9f9fcd9c7457ca0c2a54ff65078b Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Mon, 27 Jun 2022 03:08:59 -0700 Subject: build: rename build-related dirs Problem: Dirs "config", "packaging", and "third-party" are all closely related but this is not obvious from the layout. This adds friction for new contributors. Solution: - rename config/ to cmake.config/ - rename test/config/ to test/cmakeconfig/ because it is used in Lua tests: require('test.cmakeconfig.paths'). - rename packaging/ to cmake.packaging/ - rename third-party/ to cmake.deps/ (parallel with .deps/) --- test/cmakeconfig/paths.lua.in | 24 ++++++++++++++++++++++++ test/config/paths.lua.in | 24 ------------------------ test/functional/shada/shada_spec.lua | 2 +- test/helpers.lua | 2 +- test/symbolic/klee/run.sh | 2 +- test/unit/helpers.lua | 2 +- 6 files changed, 28 insertions(+), 28 deletions(-) create mode 100644 test/cmakeconfig/paths.lua.in delete mode 100644 test/config/paths.lua.in (limited to 'test') diff --git a/test/cmakeconfig/paths.lua.in b/test/cmakeconfig/paths.lua.in new file mode 100644 index 0000000000..e3979981ba --- /dev/null +++ b/test/cmakeconfig/paths.lua.in @@ -0,0 +1,24 @@ +local module = {} + +module.include_paths = {} +for p in ("${TEST_INCLUDE_DIRS}" .. ";"):gmatch("[^;]+") do + table.insert(module.include_paths, p) +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}" +module.test_luajit_prg = "" +if module.test_luajit_prg == '' then + if module.test_lua_prg:sub(-6) == 'luajit' then + module.test_luajit_prg = module.test_lua_prg + else + module.test_luajit_prg = nil + end +end +table.insert(module.include_paths, "${CMAKE_BINARY_DIR}/include") +table.insert(module.include_paths, "${CMAKE_BINARY_DIR}/src/nvim/auto") + +return module diff --git a/test/config/paths.lua.in b/test/config/paths.lua.in deleted file mode 100644 index e3979981ba..0000000000 --- a/test/config/paths.lua.in +++ /dev/null @@ -1,24 +0,0 @@ -local module = {} - -module.include_paths = {} -for p in ("${TEST_INCLUDE_DIRS}" .. ";"):gmatch("[^;]+") do - table.insert(module.include_paths, p) -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}" -module.test_luajit_prg = "" -if module.test_luajit_prg == '' then - if module.test_lua_prg:sub(-6) == 'luajit' then - module.test_luajit_prg = module.test_lua_prg - else - module.test_luajit_prg = nil - end -end -table.insert(module.include_paths, "${CMAKE_BINARY_DIR}/include") -table.insert(module.include_paths, "${CMAKE_BINARY_DIR}/src/nvim/auto") - -return module diff --git a/test/functional/shada/shada_spec.lua b/test/functional/shada/shada_spec.lua index ff63aed235..d10a2facbb 100644 --- a/test/functional/shada/shada_spec.lua +++ b/test/functional/shada/shada_spec.lua @@ -7,7 +7,7 @@ local write_file, spawn, set_session, nvim_prog, exc_exec = helpers.exc_exec local lfs = require('lfs') -local paths = require('test.config.paths') +local paths = require('test.cmakeconfig.paths') local mpack = require('mpack') diff --git a/test/helpers.lua b/test/helpers.lua index a1c3dfacd2..9a77ca1956 100644 --- a/test/helpers.lua +++ b/test/helpers.lua @@ -4,7 +4,7 @@ local assert = require('luassert') local luv = require('luv') local lfs = require('lfs') local relpath = require('pl.path').relpath -local Paths = require('test.config.paths') +local Paths = require('test.cmakeconfig.paths') assert:set_parameter('TableFormatLevel', 100) diff --git a/test/symbolic/klee/run.sh b/test/symbolic/klee/run.sh index 0234a935b5..97ce42c31b 100755 --- a/test/symbolic/klee/run.sh +++ b/test/symbolic/klee/run.sh @@ -54,7 +54,7 @@ main() { includes="$includes -I$PROJECT_SOURCE_DIR/src" includes="$includes -I$PROJECT_BINARY_DIR/src/nvim/auto" includes="$includes -I$PROJECT_BINARY_DIR/include" - includes="$includes -I$PROJECT_BINARY_DIR/config" + includes="$includes -I$PROJECT_BINARY_DIR/cmake.config" includes="$includes -I/host-includes" local defines= diff --git a/test/unit/helpers.lua b/test/unit/helpers.lua index 4dbcaa5347..29ea0235be 100644 --- a/test/unit/helpers.lua +++ b/test/unit/helpers.lua @@ -2,7 +2,7 @@ local ffi = require('ffi') local formatc = require('test.unit.formatc') local Set = require('test.unit.set') local Preprocess = require('test.unit.preprocess') -local Paths = require('test.config.paths') +local Paths = require('test.cmakeconfig.paths') local global_helpers = require('test.helpers') local assert = require('luassert') local say = require('say') -- cgit