From: Maxim Kokryashkin via Tarantool-patches <tarantool-patches@dev.tarantool.org> To: tarantool-patches@dev.tarantool.org, imun@tarantool.org, skaplun@tarantool.org Subject: [Tarantool-patches] [PATCH 2/4] test: out-of-source testing Date: Mon, 5 Jul 2021 14:49:43 +0300 [thread overview] Message-ID: <666cd23f865dbfe3b4986823fa3b9689493eff39.1625484589.git.max.kokryashkin@gmail.com> (raw) In-Reply-To: <cover.1625484589.git.max.kokryashkin@gmail.com> From: Maxim Kokryashkin <m.kokryashkin@tarantool.org> Part of tarantool/tarantool#5970 --- The patch `fperrad/lua-Harness@60da289` is similar to the patch `tarantool/luajit@d11c5bb`, but `make_specific_checks()` was renamed to `_dofile()` by maintainer. Another difference is that it seems like there is no definition for `_dofile()` in mainline lua-Harness, so it should be user-defined somewhere. If it is not, then `_dofile()` will act like `dofile()`. Considering this, we should keep `make_specific_checks` implementation from `tarantool/luajit@d11c5bb`, but rename it to `_dofile` and move to `tap.lua`. test/lua-Harness-tests/101-boolean.t | 2 +- test/lua-Harness-tests/102-function.t | 2 +- test/lua-Harness-tests/103-nil.t | 2 +- test/lua-Harness-tests/104-number.t | 2 +- test/lua-Harness-tests/105-string.t | 2 +- test/lua-Harness-tests/106-table.t | 2 +- test/lua-Harness-tests/107-thread.t | 2 +- test/lua-Harness-tests/108-userdata.t | 2 +- test/lua-Harness-tests/203-lexico.t | 8 ++++---- test/lua-Harness-tests/231-metatable.t | 2 +- test/lua-Harness-tests/301-basic.t | 2 +- test/lua-Harness-tests/305-utf8.t | 2 +- test/lua-Harness-tests/404-ext.t | 2 +- test/lua-Harness-tests/tap.lua | 4 ++++ 14 files changed, 20 insertions(+), 16 deletions(-) diff --git a/test/lua-Harness-tests/101-boolean.t b/test/lua-Harness-tests/101-boolean.t index c26b276e..b2014436 100755 --- a/test/lua-Harness-tests/101-boolean.t +++ b/test/lua-Harness-tests/101-boolean.t @@ -114,7 +114,7 @@ error_like(function () local a = true; a[1] = 1; end, "index") if has_op53 then - make_specific_checks'lexico53/boolean.t' + _dofile'lexico53/boolean.t' end done_testing() diff --git a/test/lua-Harness-tests/102-function.t b/test/lua-Harness-tests/102-function.t index c49afc5e..214fcb71 100755 --- a/test/lua-Harness-tests/102-function.t +++ b/test/lua-Harness-tests/102-function.t @@ -193,7 +193,7 @@ t[print] = true ok(t[print]) if has_op53 then - make_specific_checks'lexico53/function.t' + _dofile'lexico53/function.t' end done_testing() diff --git a/test/lua-Harness-tests/103-nil.t b/test/lua-Harness-tests/103-nil.t index 87a1c3b1..55f89d0d 100755 --- a/test/lua-Harness-tests/103-nil.t +++ b/test/lua-Harness-tests/103-nil.t @@ -114,7 +114,7 @@ error_like(function () local a = nil; a[1] = 1; end, "index") if has_op53 then - make_specific_checks'lexico53/nil.t' + _dofile'lexico53/nil.t' end done_testing() diff --git a/test/lua-Harness-tests/104-number.t b/test/lua-Harness-tests/104-number.t index f5b81e3d..b63f1eb0 100755 --- a/test/lua-Harness-tests/104-number.t +++ b/test/lua-Harness-tests/104-number.t @@ -233,7 +233,7 @@ error_like(function () local a = 3.14; a[1] = 1; end, "index") if has_op53 then - make_specific_checks'lexico53/number.t' + _dofile'lexico53/number.t' end done_testing() diff --git a/test/lua-Harness-tests/105-string.t b/test/lua-Harness-tests/105-string.t index 184deaba..e24d3818 100755 --- a/test/lua-Harness-tests/105-string.t +++ b/test/lua-Harness-tests/105-string.t @@ -264,7 +264,7 @@ error_like(function () a = 'text'; a[1] = 1; end, "index") if has_op53 then - make_specific_checks'lexico53/string.t' + _dofile'lexico53/string.t' end done_testing() diff --git a/test/lua-Harness-tests/106-table.t b/test/lua-Harness-tests/106-table.t index 667b9c8d..dac669fe 100755 --- a/test/lua-Harness-tests/106-table.t +++ b/test/lua-Harness-tests/106-table.t @@ -122,7 +122,7 @@ error_like(function () t = {}; t[0/0] = 42 end, "table index is NaN") if has_op53 then - make_specific_checks'lexico53/table.t' + _dofile'lexico53/table.t' end done_testing() diff --git a/test/lua-Harness-tests/107-thread.t b/test/lua-Harness-tests/107-thread.t index 5c5bf22f..bc105ff1 100755 --- a/test/lua-Harness-tests/107-thread.t +++ b/test/lua-Harness-tests/107-thread.t @@ -122,7 +122,7 @@ t[co] = true ok(t[co]) if has_op53 then - make_specific_checks'lexico53/thread.t' + _dofile'lexico53/thread.t' end done_testing() diff --git a/test/lua-Harness-tests/108-userdata.t b/test/lua-Harness-tests/108-userdata.t index 48a5f60f..8c2918e8 100755 --- a/test/lua-Harness-tests/108-userdata.t +++ b/test/lua-Harness-tests/108-userdata.t @@ -119,7 +119,7 @@ t[u] = true ok(t[u]) if has_op53 then - make_specific_checks'lexico53/userdata.t' + _dofile'lexico53/userdata.t' end done_testing() diff --git a/test/lua-Harness-tests/203-lexico.t b/test/lua-Harness-tests/203-lexico.t index 7f554820..c4a95fa3 100755 --- a/test/lua-Harness-tests/203-lexico.t +++ b/test/lua-Harness-tests/203-lexico.t @@ -118,19 +118,19 @@ do end if _VERSION >= 'Lua 5.2' or jit then - make_specific_checks'lexico52/lexico.t' + _dofile'lexico52/lexico.t' end if _VERSION >= 'Lua 5.3' or luajit21 then - make_specific_checks'lexico53/lexico.t' + _dofile'lexico53/lexico.t' end if _VERSION >= 'Lua 5.4' then - make_specific_checks'lexico54/lexico.t' + _dofile'lexico54/lexico.t' end if jit and pcall(require, 'ffi') then - make_specific_checks'lexicojit/lexico.t' + _dofile'lexicojit/lexico.t' end done_testing() diff --git a/test/lua-Harness-tests/231-metatable.t b/test/lua-Harness-tests/231-metatable.t index 97ac5420..c0b2344b 100755 --- a/test/lua-Harness-tests/231-metatable.t +++ b/test/lua-Harness-tests/231-metatable.t @@ -589,7 +589,7 @@ do end if has_anno_toclose then - make_specific_checks'lexico54/metatable.t' + _dofile'lexico54/metatable.t' end done_testing() diff --git a/test/lua-Harness-tests/301-basic.t b/test/lua-Harness-tests/301-basic.t index a4fe6381..2390d694 100755 --- a/test/lua-Harness-tests/301-basic.t +++ b/test/lua-Harness-tests/301-basic.t @@ -843,7 +843,7 @@ do -- xpcall end if jit and pcall(require, 'ffi') then - make_specific_checks'lexicojit/basic.t' + _dofile'lexicojit/basic.t' end done_testing() diff --git a/test/lua-Harness-tests/305-utf8.t b/test/lua-Harness-tests/305-utf8.t index 6c125388..1e975e6d 100755 --- a/test/lua-Harness-tests/305-utf8.t +++ b/test/lua-Harness-tests/305-utf8.t @@ -40,7 +40,7 @@ if not utf8 then nok(has_utf8, "no has_utf8") else plan'no_plan' - make_specific_checks'lexico53/utf8.t' + _dofile'lexico53/utf8.t' if _VERSION >= 'Lua 5.4' then make_specific_checks'lexico54/utf8.t' end diff --git a/test/lua-Harness-tests/404-ext.t b/test/lua-Harness-tests/404-ext.t index a799c750..4938ea3a 100755 --- a/test/lua-Harness-tests/404-ext.t +++ b/test/lua-Harness-tests/404-ext.t @@ -158,7 +158,7 @@ end -- thread.exdata if pcall(require, 'ffi') and (profile.openresty or jit.version:match'moonjit') then - make_specific_checks'lexicojit/ext.t' + _dofile'lexicojit/ext.t' end done_testing() diff --git a/test/lua-Harness-tests/tap.lua b/test/lua-Harness-tests/tap.lua index 86cca4e0..b17709e5 100644 --- a/test/lua-Harness-tests/tap.lua +++ b/test/lua-Harness-tests/tap.lua @@ -9,6 +9,10 @@ ]] +function _dofile (filename) + return dofile(arg[0]:gsub('([^/]+)%.t$', '') .. filename) +end + function _retrieve_progname () local i = 0 while arg[i] do -- 2.31.1
next prev parent reply other threads:[~2021-07-05 12:13 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-07-05 11:49 [Tarantool-patches] [PATCH 0/4] test: bump lua-Harness suite Maxim Kokryashkin via Tarantool-patches 2021-07-05 11:49 ` [Tarantool-patches] [PATCH 1/4] test: resolving program name Maxim Kokryashkin via Tarantool-patches 2021-07-06 20:29 ` Igor Munkin via Tarantool-patches 2021-07-05 11:49 ` Maxim Kokryashkin via Tarantool-patches [this message] 2021-07-06 20:29 ` [Tarantool-patches] [PATCH 2/4] test: out-of-source testing Igor Munkin via Tarantool-patches 2021-07-05 11:49 ` [Tarantool-patches] [PATCH 3/4] test: CI-environment Maxim Kokryashkin via Tarantool-patches 2021-07-06 20:29 ` Igor Munkin via Tarantool-patches 2021-07-05 11:49 ` [Tarantool-patches] [PATCH 4/4] test: TAP module name collisions Maxim Kokryashkin via Tarantool-patches 2021-07-06 20:30 ` Igor Munkin via Tarantool-patches 2021-07-06 20:29 ` [Tarantool-patches] [PATCH 0/4] test: bump lua-Harness 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=666cd23f865dbfe3b4986823fa3b9689493eff39.1625484589.git.max.kokryashkin@gmail.com \ --to=tarantool-patches@dev.tarantool.org \ --cc=imun@tarantool.org \ --cc=max.kokryashkin@gmail.com \ --cc=skaplun@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH 2/4] test: out-of-source testing' \ /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