[Tarantool-patches] [PATCH luajit 0/5] Self-sufficient LuaJIT testing environment

Igor Munkin imun at tarantool.org
Mon Mar 1 01:04:04 MSK 2021


I've checked the patchset into all long-term branches in
tarantool/luajit and bumped a new version in 1.10, 2.6, 2.7 and master.

NB: there is no separate commit with submodule bump, since there are
many change in LuaJIT build system in Tarantool repo too. For more info
see this series[1].

On 02.02.21, Igor Munkin wrote:
> This series moves LuaJIT-related parts of Tarantool testing machinery to
> LuaJIT repository. For this purpose the build system is partially ported
> to CMake. To avoid Makefiles name clashing the original build system is
> renamed to keep it working. As a result of these changes one need to
> explicitly specify the Makefile in the build command:
> | make -f Makefile.original <options>
> 
> These changes provides CMake build system only for the following OS:
> GNU/Linux, OSX, FreeBSD. For other platrforms use the old build system.
> 
> To run all available tests a separate target is introduced. The whole
> testing machinery is reworked much but the existing tests are left
> mostly unchanged. However, considering the way LuaJIT is integrated
> into Tarantool, this machinery provides two new configuration options:
> * LUAJIT_USE_TEST: to omit <test> target configuration for LuaJIT to
>   respect CMP0002 policy.
> * LUAJIT_TEST_BINARY: to choose which binary (i.e. Lua runtime) to be
>   used for running them.
> 
> The latter option value is used as a dependency for tests, and its
> default value is $<TARGET_FILE:${LUAJIT_DEPS}>. Unfortunately older
> CMake can't expand the generator expression used in DEPENDS section of
> <add_custom_(command|target)>. As a result the CMake minimum required
> version is bumped to 3.1 project-wide[1]. For more info see CMake Release
> notes[2] for 3.1 version.
> 
> Finally, existing tests are grouped and moved to a separate directory
> under the root test directory to make the further addition of other
> available test suites in scope of #4064[3] and #4473[4] easier.
> 
> Tarantool tests are implemented using Tarantool on-board TAP module[5],
> that is moved to LuaJIT repository with a little changes to save Lua
> chunks untouched. Other auxiliary files for Tarantool-specific testing
> (such as *.skipcond, suite.ini), in turn, are removed.
> 
> To run static analysis for Lua chunks a separate target is introduced.
> In scope of this target luacheck is run against all Lua chunks within
> LuaJIT repository except those inherited from LuaJIT vanilla repository,
> to leave them coherent with the upstream.
> 
> Since the regular static analysis has not been enabled for the test
> chunks in LuaJIT repository yet, the tests for recently implemented
> features still produce luacheck warnings. The most of the issues are
> fixed in scope of the commit 8fc103fb1a21c28185a1942e75d8d9485e3aade7
> ('test: fix warnings spotted by luacheck') and the last patch fixes the
> remaining ones.
> 
> [1]: https://lists.tarantool.org/tarantool-patches/20210127130947.yw5sdswpokujblyr@tarantool.org/T/#t
> [2]: https://cmake.org/cmake/help/latest/release/3.1.html#commands
> [3]: https://github.com/tarantool/tarantool/issues/4064
> [4]: https://github.com/tarantool/tarantool/issues/4473
> [5]: https://www.tarantool.io/en/doc/latest/reference/reference_lua/tap/
> 
> Branch: https://github.com/tarantool/luajit/tree/imun/gh-4862-cmake
> Issues:
> * https://github.com/tarantool/tarantool/issues/4862
> * https://github.com/tarantool/tarantool/issues/5470
> * https://github.com/tarantool/tarantool/issues/5631
> 
> Igor Munkin (5):
>   build: preserve the original build system
>   build: replace GNU Make with CMake
>   test: run LuaJIT tests via CMake
>   test: fix warnings found with luacheck in misclib*
>   test: run luacheck static analysis via CMake
> 

<snipped>

> 
> -- 
> 2.25.0
> 

[1]: https://lists.tarantool.org/tarantool-patches/20210227135610.GD6842@root/T/#t

-- 
Best regards,
IM


More information about the Tarantool-patches mailing list