[Tarantool-patches] [PATCH v2 06/10] test: support tarantool in lua-Harness

Максим Корякшин m.kokryashkin at tarantool.org
Thu Jul 29 12:19:03 MSK 2021


Hi! Thanks for the review, Sergey!
Here is the diff, which will add support of OOS build and will adjust
comment in CMakeLists:
============================================================================================
diff --git a/test/lua-Harness-tests/CMakeLists.txt b/test/lua-Harness-tests/CMakeLists.txt
index b9804033..90b4209a 100644
--- a/test/lua-Harness-tests/CMakeLists.txt
+++ b/test/lua-Harness-tests/CMakeLists.txt
@@ -10,10 +10,10 @@ if(NOT PROVE)
   return()
 endif()
-# Tests create temporary files (see 303-package.t for example)
-# to require. Also, they require some files from original
-# test source directory.
-set(LUA_PATH "./?.lua\;${CMAKE_CURRENT_SOURCE_DIR}/?.lua\;${LUAJIT_SOURCE_DIR}/?.lua")
+# Tests create temporary files (see 303-package.t and 411-luajit.t for
+# example) to require. Also, they require some files from original test
+# source directory.
+set(LUA_PATH "./?.lua\;${CMAKE_CURRENT_SOURCE_DIR}/?.lua\;${LUAJIT_SOURCE_DIR}/?.lua\;${CMAKE_BINARY_DIR}/src/?.lua")
 set(LUA_TEST_FLAGS --failures --shuffle)
 if(CMAKE_VERBOSE_MAKEFILE)
============================================================================================
 
 
> 
>>Hi, Maxim!
>>
>>Thanks for the fixes!
>>
>>My bad, didn't check it before:
>>
>>When building out-of-source build and run tests, 411 test still failed,
>>because LUA_PATH doesn't include path to generated <jit/vmdef.lua>.
>>
>>Please add path to it in the <CMakeLists.txt>.
>>
>>| module 'jit.vmdef' not found:
>>| no field package.preload['jit.vmdef']
>>| no file './jit/vmdef.lua'
>>| no file '/home/burii/reviews/luajit/harness/test/lua-Harness-tests/jit/vmdef.lua'
>>| no file '/home/burii/reviews/luajit/harness/src/jit/vmdef.lua'
>>| no file './jit/vmdef.so'
>>| no file '/usr/local/lib/lua/5.1/jit/vmdef.so'
>>| no file '/usr/local/lib/lua/5.1/loadall.so'
>>| no file './jit.so'
>>| no file '/usr/local/lib/lua/5.1/jit.so'
>>| no file '/usr/local/lib/lua/5.1/loadall.so'
>>
>>On 28.07.21, Максим Корякшин wrote:
>>>
>>> Here is the new commit message:
>>> ==================================================================================
>>
>><snipped>
>>
>>> ==================================================================================
>>>  
>>> And the diff with LUA_PATH adjustments:
>>> ==================================================================================
>>> diff --git a/test/lua-Harness-tests/CMakeLists.txt b/test/lua-Harness-tests/CMakeLists.txt
>>> index b9804033..bd7f4a9c 100644
>>> --- a/test/lua-Harness-tests/CMakeLists.txt
>>> +++ b/test/lua-Harness-tests/CMakeLists.txt
>>> @@ -13,7 +13,7 @@ endif()
>>>  # Tests create temporary files (see 303-package.t for example)
>>>  # to require. Also, they require some files from original
>>>  # test source directory.
>>
>>Nit: Also you may adjust those comment about required files.
>>
>>> -set(LUA_PATH "./?.lua\;${CMAKE_CURRENT_SOURCE_DIR}/?.lua\;")
>>> +set(LUA_PATH "./?.lua\;${CMAKE_CURRENT_SOURCE_DIR}/?.lua\;${LUAJIT_SOURCE_DIR}/?.lua")
>>>  set(LUA_TEST_FLAGS --failures --shuffle)
>>>  
>>>  if(CMAKE_VERBOSE_MAKEFILE)
>>> ===================================================================================
>>>  
>>>  
>>> --
>>> Максим Корякшин
>>>  
>>>  
>>> >Вторник, 27 июля 2021, 13:05 +03:00 от Sergey Kaplun < skaplun at tarantool.org >:
>>>>>> >Hi, Maxim!
>>> >
>>> >Thanks for the patch!
>>> >
>>> >Please consider my comments below.
>>> >
>>> >On 20.07.21, Maxim Kokryashkin wrote:
>>> >> Backports 'supoort Tarantool' patch[1] from lua-Harness.
>>> >>
>>> >> [1]:  https://framagit.org/fperrad/lua-Harness/-/commit/d3ceee16
>>> >>
>>> >> Part of tarantool/tarantool#5970
>>> >> Part of tarantool/tarantool#4473
>>> >> ---
>>> >
>>> >| test: support tarantool in lua-Harness
>>> >
>>> >Nit: s/tarantool/Tarantool/.
>>> >
>>> >|
>>> >| Backports 'support Tarantool' patch[1] from lua-Harness.
>>> >
>>> >Nit: s/Tarantool/tarantool/ regarding to the original commit message.
>>> >
>>> >| This patch introduces lua-Harness profile for Tarantool considering the
>>> >| platform specifics. Furthermore, these changes skip all CLI-related
>>> >| tests for Tarantool binary, so 241-standalone.t and 411-luajit.t can be
>>> >| renamed back.
>>> >
>>> >I afraid, not so fast. Within these changes tests are failed in the
>>> >LuaJIT's repo with the following error:
>>> >|! unknown luaJIT command or jit.* modules not installed
>>> >
>>> >Seems like LUA_PATH should be adjusted for these tests.
>>> >|
>>> >| [1]:  https://framagit.org/fperrad/lua-Harness/-/commit/d3ceee16
>>> >|
>>> >| Part of tarantool/tarantool#5970
>>> >| Part of tarantool/tarantool#4473
>>> >
>>> >> ...standalone.t.disabled => 241-standalone.t} | 5 ++
>>> >> test/lua-Harness-tests/320-stdin.t | 2 +-
>>> >> .../{411-luajit.t.disabled => 411-luajit.t} | 2 +-
>>> >> test/lua-Harness-tests/profile_tarantool.lua | 63 +++++++++++++++++++
>>> >> 4 files changed, 70 insertions(+), 2 deletions(-)
>>> >> rename test/lua-Harness-tests/{241-standalone.t.disabled => 241-standalone.t} (99%)
>>> >> rename test/lua-Harness-tests/{411-luajit.t.disabled => 411-luajit.t} (99%)
>>> >> create mode 100644 test/lua-Harness-tests/profile_tarantool.lua
>>> >
>>> ><snipped>
>>> >
>>> >--
>>> >Best regards,
>>> >Sergey Kaplun
>>>  
>>
>>--
>>Best regards,
>>Sergey Kaplun
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.tarantool.org/pipermail/tarantool-patches/attachments/20210729/88ba0e92/attachment.htm>


More information about the Tarantool-patches mailing list