[Tarantool-patches] [PATCH luajit] test: remove inline suppressions of _TARANTOOL

Sergey Bronnikov sergeyb at tarantool.org
Tue Jun 11 13:00:01 MSK 2024


Sergey,


thanks for comments.

Updated patch force-pushed.


Sergey

On 10.06.2024 12:41, Sergey Kaplun wrote:
> Hi, Sergey!
> Thanks for the patch!
> LGTM, after fixing my comment below.
>
> On 06.06.24, Sergey Bronnikov wrote:
>> From: Sergey Bronnikov<sergeyb at tarantool.org>
>>
>> The patch defines _TARANTOOL as a global in luacheck configuration
>> file and removes inline suppressions in test files.
>> ---
>> Branch:https://github.com/tarantool/luajit/tree/ligurio/fix-_TARANTOOL
>>
> <snipped>
>
>>   12 files changed, 1 insertion(+), 12 deletions(-)
>>
>> diff --git a/.luacheckrc b/.luacheckrc
>> index a32012ca..62ceeaa2 100644
>> --- a/.luacheckrc
>> +++ b/.luacheckrc
>> @@ -1,7 +1,7 @@
>>   -- Use the default LuaJIT globals.
>>   std = 'luajit'
>>   -- This fork also introduces a new global for misc API namespace.
>> -read_globals = { 'misc' }
>> +read_globals = { 'misc', '_TARANTOOL' }
> Can we use it only for <tarantool-tests> directory to avoid it appearing
> in the Lua sources inside the repository?

Sure.

I've updated your patch a bit (formatting):


--- a/.luacheckrc
+++ b/.luacheckrc
@@ -3,6 +3,12 @@ std = 'luajit'
  -- This fork also introduces a new global for misc API namespace.
  read_globals = { 'misc', '_TARANTOOL' }

+-- The `_TARANTOOL` global is often used for skip condition
+-- checks in tests.
+files['test/tarantool-tests/'] = {
+  read_globals = {'_TARANTOOL'}
+}
+
  -- These files are inherited from the vanilla LuaJIT or different
  -- test suites and need to be coherent with the upstream.
  exclude_files = {


>
> ===================================================================
> diff --git a/.luacheckrc b/.luacheckrc
> index a32012ca..7b5634a5 100644
> --- a/.luacheckrc
> +++ b/.luacheckrc
> @@ -3,6 +3,10 @@ std = 'luajit'
>   -- This fork also introduces a new global for misc API namespace.
>   read_globals = { 'misc' }
>   
> +-- The `_TARANTOOL` global is often used for skip condition
> +-- checks.
> +files['test/tarantool-tests/'] = {read_globals = {'_TARANTOOL'}}
> +
>   -- These files are inherited from the vanilla LuaJIT or different
>   -- test suites and need to be coherent with the upstream.
>   exclude_files = {
> ===================================================================
>
>
>>   
>>   -- These files are inherited from the vanilla LuaJIT or different
>>   -- test suites and need to be coherent with the upstream.
> <snipped>
>
>> -- 
>> 2.34.1
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.tarantool.org/pipermail/tarantool-patches/attachments/20240611/25a7fb94/attachment.htm>


More information about the Tarantool-patches mailing list