[tarantool-patches] Re: [PATCH] lua: show locals when a tap test fails
Vladislav Shpilevoy
v.shpilevoy at tarantool.org
Mon Sep 24 13:47:45 MSK 2018
Hi! Thanks for the fixes!
>>> @@ -245,7 +280,7 @@ local function check(test)
>>> if test.planned ~= test.total then
>>> if test.parent ~= nil then
>>> ok(test.parent, false, "bad plan", { planned = test.planned;
>>> - run = test.total})
>>> + run = test.total}, {locals = false})
>>
>> 6. Are we sure, that locals should be printed by default? Maybe
>> it would be better to print them on demand only via a global
>> option and remove per-test-case option? As I imagine a typical
>> test fail, when a test did not pass, you turn locals printing
>> on and run the test again.
>>
>
> The primary reason of the option is to omit the second run. It is more
> useful when the fail is flaky or when it occurs in CI. If you going to
> do second run you can print anything you want manually.
>
> So I think it worth to enable it by default or discard the patch
> entirely. Or maybe control it from an environment variable.
>
> I personally use the patch around month locally. It sometimes gives very
> large output (graphql schemas), but saves time to write something like
> `print(require('yaml').encode(res))` each time a test fails.
>
> If you dislike such extra output for failing tests, we should skip the
> patch entirely. It is useful or not useful, not something in the middle.
Understandable. Then LGTM, looks useful.
More information about the Tarantool-patches
mailing list