From: Igor Munkin via Tarantool-patches <tarantool-patches@dev.tarantool.org> To: Sergey Kaplun <skaplun@tarantool.org>, Timur Safin <tsafin@tarantool.org> Cc: tarantool-patches@dev.tarantool.org Subject: [Tarantool-patches] [PATCH luajit 0/5] Self-sufficient LuaJIT testing environment Date: Tue, 2 Feb 2021 23:57:40 +0300 [thread overview] Message-ID: <cover.1612291495.git.imun@tarantool.org> (raw) 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 .gitignore | 14 +- .luacheckrc | 11 + CMakeLists.txt | 290 +++++++++++++ Makefile => Makefile.original | 44 +- cmake/LuaJITUtils.cmake | 31 ++ cmake/MakeSourceList.cmake | 47 +++ cmake/SetDynASMFlags.cmake | 130 ++++++ cmake/SetTargetFlags.cmake | 42 ++ cmake/SetVersion.cmake | 45 ++ etc/CMakeLists.txt | 33 ++ etc/{luajit.pc => luajit.pc.in} | 4 +- src/CMakeLists.txt | 396 ++++++++++++++++++ src/{Makefile.dep => Makefile.dep.original} | 0 src/{Makefile => Makefile.original} | 4 +- src/host/CMakeLists.txt | 62 +++ test/CMakeLists.txt | 62 ++- test/gh-4427-ffi-sandwich.skipcond | 7 - test/gh-4427-ffi-sandwich/CMakeLists.txt | 1 - test/lj-flush-on-trace.skipcond | 7 - test/lj-flush-on-trace/CMakeLists.txt | 1 - test/misclib-getmetrics-capi.skipcond | 7 - test/misclib-getmetrics-capi/CMakeLists.txt | 1 - test/misclib-getmetrics-lapi.skipcond | 7 - test/suite.ini | 6 - test/tarantool-tests/CMakeLists.txt | 92 ++++ .../gh-3196-incorrect-string-length.test.lua | 2 +- .../gh-4427-ffi-sandwich.test.lua | 24 +- .../gh-4427-ffi-sandwich/CMakeLists.txt | 1 + .../gh-4427-ffi-sandwich/libsandwich.c | 0 ...gh-4476-fix-string-find-recording.test.lua | 2 +- ...gh-4773-tonumber-fail-on-NUL-char.test.lua | 2 +- .../lj-494-table-chain-infinite-loop.test.lua | 2 +- ...lj-505-fold-no-strref-for-ptrdiff.test.lua | 2 +- .../lj-524-fold-conv-respect-src-irt.test.lua | 2 +- .../lj-flush-on-trace.test.lua | 24 +- .../lj-flush-on-trace/CMakeLists.txt | 1 + .../lj-flush-on-trace/libflush.c | 0 .../misclib-getmetrics-capi.test.lua | 27 +- .../misclib-getmetrics-capi/CMakeLists.txt | 1 + .../misclib-getmetrics-capi/testgetmetrics.c | 0 .../misclib-getmetrics-lapi.test.lua | 38 +- .../misclib-memprof-lapi.test.lua | 15 +- .../or-232-unsink-64-kptr.test.lua | 0 test/tarantool-tests/tap.lua | 306 ++++++++++++++ test/tarantool-tests/utils.lua | 43 ++ test/utils.lua | 33 -- tools/CMakeLists.txt | 77 ++++ tools/luajit-parse-memprof | 9 - tools/luajit-parse-memprof.in | 6 + 49 files changed, 1796 insertions(+), 165 deletions(-) create mode 100644 .luacheckrc create mode 100644 CMakeLists.txt rename Makefile => Makefile.original (85%) create mode 100644 cmake/LuaJITUtils.cmake create mode 100644 cmake/MakeSourceList.cmake create mode 100644 cmake/SetDynASMFlags.cmake create mode 100644 cmake/SetTargetFlags.cmake create mode 100644 cmake/SetVersion.cmake create mode 100644 etc/CMakeLists.txt rename etc/{luajit.pc => luajit.pc.in} (91%) create mode 100644 src/CMakeLists.txt rename src/{Makefile.dep => Makefile.dep.original} (100%) rename src/{Makefile => Makefile.original} (99%) create mode 100644 src/host/CMakeLists.txt delete mode 100644 test/gh-4427-ffi-sandwich.skipcond delete mode 100644 test/gh-4427-ffi-sandwich/CMakeLists.txt delete mode 100644 test/lj-flush-on-trace.skipcond delete mode 100644 test/lj-flush-on-trace/CMakeLists.txt delete mode 100644 test/misclib-getmetrics-capi.skipcond delete mode 100644 test/misclib-getmetrics-capi/CMakeLists.txt delete mode 100644 test/misclib-getmetrics-lapi.skipcond delete mode 100644 test/suite.ini create mode 100644 test/tarantool-tests/CMakeLists.txt rename test/{ => tarantool-tests}/gh-3196-incorrect-string-length.test.lua (94%) rename test/{ => tarantool-tests}/gh-4427-ffi-sandwich.test.lua (70%) create mode 100644 test/tarantool-tests/gh-4427-ffi-sandwich/CMakeLists.txt rename test/{ => tarantool-tests}/gh-4427-ffi-sandwich/libsandwich.c (100%) rename test/{ => tarantool-tests}/gh-4476-fix-string-find-recording.test.lua (99%) rename test/{ => tarantool-tests}/gh-4773-tonumber-fail-on-NUL-char.test.lua (95%) rename test/{ => tarantool-tests}/lj-494-table-chain-infinite-loop.test.lua (99%) rename test/{ => tarantool-tests}/lj-505-fold-no-strref-for-ptrdiff.test.lua (96%) rename test/{ => tarantool-tests}/lj-524-fold-conv-respect-src-irt.test.lua (95%) rename test/{ => tarantool-tests}/lj-flush-on-trace.test.lua (70%) create mode 100644 test/tarantool-tests/lj-flush-on-trace/CMakeLists.txt rename test/{ => tarantool-tests}/lj-flush-on-trace/libflush.c (100%) rename test/{ => tarantool-tests}/misclib-getmetrics-capi.test.lua (88%) create mode 100644 test/tarantool-tests/misclib-getmetrics-capi/CMakeLists.txt rename test/{ => tarantool-tests}/misclib-getmetrics-capi/testgetmetrics.c (100%) rename test/{ => tarantool-tests}/misclib-getmetrics-lapi.test.lua (94%) rename test/{ => tarantool-tests}/misclib-memprof-lapi.test.lua (86%) rename test/{ => tarantool-tests}/or-232-unsink-64-kptr.test.lua (100%) create mode 100644 test/tarantool-tests/tap.lua create mode 100644 test/tarantool-tests/utils.lua delete mode 100644 test/utils.lua create mode 100644 tools/CMakeLists.txt delete mode 100755 tools/luajit-parse-memprof create mode 100644 tools/luajit-parse-memprof.in -- 2.25.0
next reply other threads:[~2021-02-02 20:57 UTC|newest] Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-02-02 20:57 Igor Munkin via Tarantool-patches [this message] 2021-02-02 20:57 ` [Tarantool-patches] [PATCH luajit 1/5] build: preserve the original build system Igor Munkin via Tarantool-patches 2021-02-04 22:53 ` Timur Safin via Tarantool-patches 2021-02-08 15:56 ` Igor Munkin via Tarantool-patches 2021-02-09 11:38 ` Sergey Kaplun via Tarantool-patches 2021-02-09 12:47 ` Igor Munkin via Tarantool-patches 2021-02-09 14:45 ` Sergey Kaplun via Tarantool-patches 2021-02-09 15:28 ` Igor Munkin via Tarantool-patches 2021-02-10 9:35 ` Sergey Kaplun via Tarantool-patches 2021-02-02 20:57 ` [Tarantool-patches] [PATCH luajit 2/5] build: replace GNU Make with CMake Igor Munkin via Tarantool-patches 2021-02-04 22:53 ` Timur Safin via Tarantool-patches 2021-02-08 15:56 ` Igor Munkin via Tarantool-patches 2021-02-09 13:55 ` Timur Safin via Tarantool-patches 2021-02-09 15:09 ` Igor Munkin via Tarantool-patches 2021-02-11 19:23 ` Sergey Kaplun via Tarantool-patches 2021-02-16 15:28 ` Igor Munkin via Tarantool-patches 2021-02-18 9:56 ` Sergey Kaplun via Tarantool-patches 2021-02-20 19:18 ` Igor Munkin via Tarantool-patches 2021-02-27 10:48 ` Sergey Kaplun via Tarantool-patches 2021-02-28 18:18 ` Igor Munkin via Tarantool-patches 2021-02-13 3:47 ` Sergey Kaplun via Tarantool-patches 2021-02-16 15:32 ` Igor Munkin via Tarantool-patches 2021-02-02 20:57 ` [Tarantool-patches] [PATCH luajit 3/5] test: run LuaJIT tests via CMake Igor Munkin via Tarantool-patches 2021-02-08 15:05 ` Timur Safin via Tarantool-patches 2021-02-08 16:29 ` Igor Munkin via Tarantool-patches 2021-02-09 8:16 ` Timur Safin via Tarantool-patches 2021-02-09 8:43 ` Igor Munkin via Tarantool-patches 2021-02-09 13:59 ` Timur Safin via Tarantool-patches 2021-02-09 15:10 ` Igor Munkin via Tarantool-patches 2021-02-14 18:48 ` Sergey Kaplun via Tarantool-patches 2021-02-19 19:04 ` Igor Munkin via Tarantool-patches 2021-02-27 13:50 ` Sergey Kaplun via Tarantool-patches 2021-02-28 18:18 ` Igor Munkin via Tarantool-patches 2021-02-02 20:57 ` [Tarantool-patches] [PATCH luajit 4/5] test: fix warnings found with luacheck in misclib* Igor Munkin via Tarantool-patches [not found] ` <012f01d6fe1a$a2aa6890$e7ff39b0$@tarantool.org> [not found] ` <2c495492-50f4-acfd-ad66-2cb44abb5fa1@tarantool.org> 2021-02-08 15:40 ` Sergey Bronnikov via Tarantool-patches 2021-02-08 15:58 ` Igor Munkin via Tarantool-patches 2021-02-08 15:57 ` Igor Munkin via Tarantool-patches 2021-02-14 19:16 ` Sergey Kaplun via Tarantool-patches 2021-02-16 15:29 ` Igor Munkin via Tarantool-patches 2021-02-16 16:36 ` Sergey Kaplun via Tarantool-patches 2021-02-02 20:57 ` [Tarantool-patches] [PATCH luajit 5/5] test: run luacheck static analysis via CMake Igor Munkin via Tarantool-patches 2021-02-04 22:52 ` Timur Safin via Tarantool-patches 2021-02-08 15:57 ` Igor Munkin via Tarantool-patches 2021-02-14 19:32 ` Sergey Kaplun via Tarantool-patches 2021-02-19 19:14 ` Igor Munkin via Tarantool-patches 2021-02-28 22:04 ` [Tarantool-patches] [PATCH luajit 0/5] Self-sufficient LuaJIT testing environment Igor Munkin via Tarantool-patches
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=cover.1612291495.git.imun@tarantool.org \ --to=tarantool-patches@dev.tarantool.org \ --cc=imun@tarantool.org \ --cc=skaplun@tarantool.org \ --cc=tsafin@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH luajit 0/5] Self-sufficient LuaJIT testing environment' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox