[Tarantool-patches] [PATCH luajit 4/5] test: introduce test:skiprest TAP helper

Maxim Kokryashkin m.kokryashkin at tarantool.org
Tue Feb 28 10:55:02 MSK 2023


Hi, Igor!
Thanks for the patch!
LGTM, except for a few nits regarding the commit message:
  
>Понедельник, 27 февраля 2023, 12:10 +03:00 от Igor Munkin <imun at tarantool.org>:
> 
>Sometimes one need to skip the remaining tests in the script. There is
>no special stub in TAP13 protocol for this, but this could be done via
Typo: s/TAP 13/the TAP 13/
>skipping all the remaining planned tests.
>
>Within this commit <test:skiprest> helper is introduced that calls
><test:skip> (planned - total) times and exits the test script. As for
>the previous commit it's worth to mention, that skiprest helper is
Typo: s/worth to mention/worth mentioning/
>implemented only for root (i.e. test with no parent) tests and subtests
>are not supported at the moment. The corresponding assertion with FIXME
>reason can be found in <finalize> routine.
>
>Signed-off-by: Igor Munkin < imun at tarantool.org >
>---
> test/tarantool-tests/tap.lua | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
>diff --git a/test/tarantool-tests/tap.lua b/test/tarantool-tests/tap.lua
>index 92d59ce9..343f97e3 100644
>--- a/test/tarantool-tests/tap.lua
>+++ b/test/tarantool-tests/tap.lua
>@@ -101,6 +101,13 @@ local function skipall(test, reason)
>   finalize(test)
> end
> 
>+local function skiprest(test, reason)
>+ for _ = 1, test.planned - test.total do
>+ test:skip(reason)
>+ end
>+ finalize(test)
>+end
>+
> local function like(test, got, pattern, message, extra)
>   extra = extra or {}
>   extra.got = got
>@@ -330,6 +337,7 @@ test_mt = {
>     fail = fail,
>     skip = skip,
>     skipall = skipall,
>+ skiprest = skiprest,
>     is = is,
>     isnt = isnt,
>     isnil = isnil,
>--
>2.30.2
--
Best regards,
Maxim Kokryashkin
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.tarantool.org/pipermail/tarantool-patches/attachments/20230228/a07c771e/attachment.htm>


More information about the Tarantool-patches mailing list