From: Sergey Kaplun via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Igor Munkin <imun@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH luajit v3 03/29] test: adapt PUC-Rio suite for out-of-source build
Date: Wed, 14 Apr 2021 16:54:33 +0300 [thread overview]
Message-ID: <YHb0GQ7VfV2TlDXE@root> (raw)
In-Reply-To: <20210413210514.GY29703@tarantool.org>
Hi, Igor!
Thanks for the review!
I see fixups on branch and they LGTM.
AFAIU, do you want to squash them by yourself?
On 14.04.21, Igor Munkin wrote:
> Sergey,
>
> Thanks for the patch! LGTM with the following nits: I fixed them on your
> branch[1] and guess no re-testing is needed.
>
> On 13.04.21, Sergey Kaplun wrote:
> > The redefined `dofile()` function failed to find the test file to load,
> > when tests are run out-of-source. So, fullpath is detected considering
> > `arg[0]` value. Moreover, some tests use `loadfile()` instead, so their
> > argument has to be adjusted to the full path to the files.
> >
> > Usage of functions invoking source test files was changed to
> > `_loadfile()` and `_dofile()` correspondingly. They equal
>
> Typo: s/They equal/They equal to/.
>
> > `loadfile()` and `dofile()` by default and can be overloaded via running
> > lua code from LUAJIT_TEST_INIT. This patch introduces the
>
> Typo: s/lua/Lua/.
>
> > <test/luajit-test-init.lua> file to be executed before tests and
> > redefines the functions considering the path from `arg[0]` variable.
> >
> > Part of tarantool/tarantool#5845
> > Part of tarantool/tarantool#4473
> > ---
> > CMakeLists.txt | 4 +--
> > test/PUC-Rio-Lua-5.1-tests/all.lua | 51 +++++++++++++++++-------------
> > test/luajit-test-init.lua | 18 +++++++++++
> > 3 files changed, 49 insertions(+), 24 deletions(-)
> > create mode 100644 test/luajit-test-init.lua
> >
> > diff --git a/CMakeLists.txt b/CMakeLists.txt
> > index eb562923..df82d57c 100644
> > --- a/CMakeLists.txt
> > +++ b/CMakeLists.txt
> > @@ -302,8 +302,8 @@ set(LUAJIT_TEST_BINARY ${LUAJIT_BINARY} CACHE STRING
> > # tweaked, the introduced option can be used.
> > # XXX: The default behaviour is nop, so /dev/null is the best
>
> Comment need to be adjusted.
>
> > # option for this.
> > -set(LUAJIT_TEST_INIT "/dev/null" CACHE STRING
> > - "Lua code need to be run before tests are started. Default is nop."
> > +set(LUAJIT_TEST_INIT "${PROJECT_SOURCE_DIR}/test/luajit-test-init.lua" CACHE STRING
> > + "Lua code need to be run before tests are started."
> > )
> >
> > add_subdirectory(test)
>
> <snipped>
>
> > diff --git a/test/luajit-test-init.lua b/test/luajit-test-init.lua
> > new file mode 100644
> > index 00000000..aadd15af
> > --- /dev/null
> > +++ b/test/luajit-test-init.lua
> > @@ -0,0 +1,18 @@
> > +-- XXX: PUC Rio Lua 5.1 test suite checks that global variable
> > +-- `_loadfile()` exists and use it for code loading from test
>
> Typo: s/use/uses/.
>
> > +-- files If the variable is not defined then suite uses
>
> Typo: s/files/files./.
>
> > +-- `loadfile()` as default. Same for the `_dofile()`.
> > +
> > +-- XXX: Some tests in PUC Rio Lua 5.1 test suite clean `arg`
> > +-- variable, so evaluate this once and use later.
> > +local path_to_sources = arg[0]:gsub("[^/]+$", "")
> > +
> > +-- luacheck: no global
> > +function _loadfile(filename)
> > + return loadfile(path_to_sources..filename)
> > +end
> > +
> > +-- luacheck: no global
> > +function _dofile(filename)
> > + return dofile(path_to_sources..filename)
> > +end
> > --
> > 2.31.0
> >
>
> [1]: https://github.com/tarantool/luajit/commit/c28985b
>
> --
> Best regards,
> IM
--
Best regards,
Sergey Kaplun
next prev parent reply other threads:[~2021-04-14 13:55 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-13 13:27 [Tarantool-patches] [PATCH luajit v3 00/29] Adapt PUC-Rio Lua 5.1 test suite Sergey Kaplun via Tarantool-patches
2021-04-13 13:27 ` [Tarantool-patches] [PATCH luajit v3 01/29] test: add " Sergey Kaplun via Tarantool-patches
2021-04-13 20:31 ` Igor Munkin via Tarantool-patches
2021-04-14 13:54 ` Sergey Kaplun via Tarantool-patches
2021-04-13 13:27 ` [Tarantool-patches] [PATCH luajit v3 02/29] test: build auxiliary C libs from PUC-Rio Lua 5.1 Sergey Kaplun via Tarantool-patches
2021-04-13 13:27 ` [Tarantool-patches] [PATCH luajit v3 03/29] test: adapt PUC-Rio suite for out-of-source build Sergey Kaplun via Tarantool-patches
2021-04-13 21:05 ` Igor Munkin via Tarantool-patches
2021-04-14 13:54 ` Sergey Kaplun via Tarantool-patches [this message]
2021-04-13 13:27 ` [Tarantool-patches] [PATCH luajit v3 04/29] test: remove quotes in progname from PUC-Rio Sergey Kaplun via Tarantool-patches
2021-04-13 13:27 ` [Tarantool-patches] [PATCH luajit v3 05/29] test: adapt PUC-Rio test for arg presence Sergey Kaplun via Tarantool-patches
2021-04-13 13:27 ` [Tarantool-patches] [PATCH luajit v3 06/29] test: disable PUC-Rio tests confused by -v output Sergey Kaplun via Tarantool-patches
2021-04-13 13:27 ` [Tarantool-patches] [PATCH luajit v3 07/29] test: disable PUC-Rio tests for bytecode header Sergey Kaplun via Tarantool-patches
2021-04-13 13:27 ` [Tarantool-patches] [PATCH luajit v3 08/29] test: adapt PUC-Rio tests counting GC steps Sergey Kaplun via Tarantool-patches
2021-04-13 13:27 ` [Tarantool-patches] [PATCH luajit v3 09/29] test: disable PUC-Rio suite tests for line hook Sergey Kaplun via Tarantool-patches
2021-04-13 13:27 ` [Tarantool-patches] [PATCH luajit v3 10/29] test: adapt PUC-Rio tests with vararg functions Sergey Kaplun via Tarantool-patches
2021-04-13 13:27 ` [Tarantool-patches] [PATCH luajit v3 11/29] test: adapt PUC-Rio test for debug in vararg func Sergey Kaplun via Tarantool-patches
2021-04-13 13:27 ` [Tarantool-patches] [PATCH luajit v3 12/29] test: adapt PUC-Rio test with count hooks Sergey Kaplun via Tarantool-patches
2021-04-13 13:27 ` [Tarantool-patches] [PATCH luajit v3 13/29] test: disable PUC-Rio test for tail call info Sergey Kaplun via Tarantool-patches
2021-04-13 13:27 ` [Tarantool-patches] [PATCH luajit v3 14/29] test: adapt PUC-Rio test with activeline check Sergey Kaplun via Tarantool-patches
2021-04-13 13:27 ` [Tarantool-patches] [PATCH luajit v3 15/29] test: disable PUC-Rio test for per-coroutine hooks Sergey Kaplun via Tarantool-patches
2021-04-13 13:27 ` [Tarantool-patches] [PATCH luajit v3 16/29] test: adapt PUC-Rio test for %q in string.format Sergey Kaplun via Tarantool-patches
2021-04-13 13:27 ` [Tarantool-patches] [PATCH luajit v3 17/29] test: disable locale-dependent PUC-Rio tests Sergey Kaplun via Tarantool-patches
2021-04-13 13:27 ` [Tarantool-patches] [PATCH luajit v3 18/29] test: use math.fmod in " Sergey Kaplun via Tarantool-patches
2021-04-13 13:27 ` [Tarantool-patches] [PATCH luajit v3 19/29] test: remove string.gfind assert in PUC-Rio test Sergey Kaplun via Tarantool-patches
2021-04-13 13:27 ` [Tarantool-patches] [PATCH luajit v3 20/29] test: disable PUC-Rio test for getfenv in tailcall Sergey Kaplun via Tarantool-patches
2021-04-13 13:27 ` [Tarantool-patches] [PATCH luajit v3 21/29] test: disable PUC-Rio test for variables in error Sergey Kaplun via Tarantool-patches
2021-04-13 13:27 ` [Tarantool-patches] [PATCH luajit v3 22/29] test: disable PUC-Rio test for fast function name Sergey Kaplun via Tarantool-patches
2021-04-13 13:27 ` [Tarantool-patches] [PATCH luajit v3 23/29] test: disable PUC-Rio test for non-asci identifier Sergey Kaplun via Tarantool-patches
2021-04-13 13:27 ` [Tarantool-patches] [PATCH luajit v3 24/29] test: disable PUC-Rio test for syntax level error Sergey Kaplun via Tarantool-patches
2021-04-13 13:27 ` [Tarantool-patches] [PATCH luajit v3 25/29] test: disable PUC-RIO tests for several -l options Sergey Kaplun via Tarantool-patches
2021-04-13 13:27 ` [Tarantool-patches] [PATCH luajit v3 26/29] test: disable PUC-Rio test for checking arg layout Sergey Kaplun via Tarantool-patches
2021-04-13 13:27 ` [Tarantool-patches] [PATCH luajit v3 27/29] test: disable PUC-Rio test checking -h option Sergey Kaplun via Tarantool-patches
2021-04-13 13:27 ` [Tarantool-patches] [PATCH luajit v3 28/29] test: disable PUC-Rio hanging GC test Sergey Kaplun via Tarantool-patches
2021-04-13 13:27 ` [Tarantool-patches] [PATCH luajit v3 29/29] test: disable too deep recursive PUC-Rio test Sergey Kaplun via Tarantool-patches
2021-04-14 21:08 ` [Tarantool-patches] [PATCH luajit v3 00/29] Adapt PUC-Rio Lua 5.1 test suite 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=YHb0GQ7VfV2TlDXE@root \
--to=tarantool-patches@dev.tarantool.org \
--cc=imun@tarantool.org \
--cc=skaplun@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH luajit v3 03/29] test: adapt PUC-Rio suite for out-of-source build' \
/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