From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 881226EC56; Tue, 16 Mar 2021 12:39:13 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 881226EC56 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1615887553; bh=tfNnYFOMQ/N0UqczE5Ey04oqkXz3n3a+7AhliKWFluc=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=kTUnkSz1ETc0VcCaWOsfjh5LoovvDHX8QkJNtd8BUi0IHujHvnA85MT1FRKIzhc5h /lefEKcIV56+UpOrG2SHJPneeVZK3N1vpukdrNQfzAqjaQG82fy1donIePLKNE7i3j 47DOG9ylWgdmvk9ulxjLYPE1lT7xbw5CfE1ptXhE= Received: from smtp37.i.mail.ru (smtp37.i.mail.ru [94.100.177.97]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 873276EC56 for ; Tue, 16 Mar 2021 12:39:12 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 873276EC56 Received: by smtp37.i.mail.ru with esmtpa (envelope-from ) id 1lM6AR-0003FH-G4; Tue, 16 Mar 2021 12:39:12 +0300 Date: Tue, 16 Mar 2021 12:38:21 +0300 To: Igor Munkin Message-ID: <20210316093821.GA1155@root> References: <20210315173730.GE9042@tarantool.org> <20210315181028.GB16737@root> <20210315210619.GI9042@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210315210619.GI9042@tarantool.org> X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD9D3134714A9BDB69BBBF766E27323369B0CCE27335774643500894C459B0CD1B9DE5E77369DF46CFBC2C7297163D7ECC93A6595BA3A2A78BB3DA8AF4631D2EE55 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE776377A057133B646EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637340F95D8C375F5048638F802B75D45FF914D58D5BE9E6BC131B5C99E7648C95CF89CA98302ED496F097694CBBC87B1631C6283CD26CFC777A471835C12D1D9774AD6D5ED66289B5278DA827A17800CE71AE4D56B06699BBC9FA2833FD35BB23D2EF20D2F80756B5F868A13BD56FB6657A471835C12D1D977725E5C173C3A84C3E478A468B35FE767117882F4460429728AD0CFFFB425014E868A13BD56FB6657A7F4EDE966BC389F9E8FC8737B5C22490E26A56DB46E81E4089D37D7C0E48F6CCF19DD082D7633A0E7DDDDC251EA7DABAAAE862A0553A39223F8577A6DFFEA7C054662F8F2CA352F43847C11F186F3C5E7DDDDC251EA7DABCC89B49CDF41148FA8EF81845B15A4842623479134186CDE6BA297DBC24807EABDAD6C7F3747799A X-C1DE0DAB: 0D63561A33F958A578D71599F2D46FA7066E4C7237AA311123B9CF4CD1FC747AD59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75F04B387B5D7535DE410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3407FE5477D6A8AF080B3DDEC06D48B38BE7B3BA4846DF2CC07381A1351AAD7B1E3920BC3B983248631D7E09C32AA3244CC93798B3B6C892B55EFFEC5770EC27F97101BF96129E4011FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojmD8gqPF9k0mZokuaifV/RA== X-Mailru-Sender: 3B9A0136629DC91206CBC582EFEF4CB480814752BE03260DE9D3522D58CB2DDD427BE5A609774811F2400F607609286E924004A7DEC283833C7120B22964430C52B393F8C72A41A89437F6177E88F7363CDA0F3B3F5B9367 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v2 luajit 1/5] test: add lua-Harness test suite X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Sergey Kaplun via Tarantool-patches Reply-To: Sergey Kaplun Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Igor, On 16.03.21, Igor Munkin wrote: > Sergey, > > On 15.03.21, Sergey Kaplun wrote: > > Igor, > > > > Thanks for the review! > > > > On 15.03.21, Igor Munkin wrote: > > > Sergey, > > > > > > Thanks for the patch! > > > > > > On 15.03.21, Sergey Kaplun wrote: > > > > > > > diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt > > > > index 99471db..3a42f41 100644 > > > > --- a/test/CMakeLists.txt > > > > +++ b/test/CMakeLists.txt > > > > @@ -43,10 +43,12 @@ endif() > > > > set(LUAJIT_TEST_COMMAND "${LUAJIT_TEST_BINARY} -e dofile[[${LUAJIT_TEST_INIT}]]") > > > > separate_arguments(LUAJIT_TEST_COMMAND) > > > > > > > > -add_subdirectory(tarantool-tests) > > > > +add_subdirectory(lua-Harness-tests) > > > > add_subdirectory(LuaJIT-tests) > > > > +add_subdirectory(tarantool-tests) > > > > > > Why did you choose this order? > > > > Alphabetically, like in `ls` output. Feel free to propose your own. > > To conform the alphabetical sort order LuaJIT-tests directory should go > before lua-Harness-tests directory. Agree. See the iteractive patch below. Branch is force-pushed. =================================================================== diff --git a/.luacheckrc b/.luacheckrc index a5f90b9..4e5dbdf 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -8,6 +8,6 @@ read_globals = { 'misc' } exclude_files = { 'dynasm/', 'src/', - 'test/lua-Harness-tests/', 'test/LuaJIT-tests/', + 'test/lua-Harness-tests/', } diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 3a42f41..02fb2ed 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -43,13 +43,13 @@ endif() set(LUAJIT_TEST_COMMAND "${LUAJIT_TEST_BINARY} -e dofile[[${LUAJIT_TEST_INIT}]]") separate_arguments(LUAJIT_TEST_COMMAND) -add_subdirectory(lua-Harness-tests) add_subdirectory(LuaJIT-tests) +add_subdirectory(lua-Harness-tests) add_subdirectory(tarantool-tests) add_custom_target(${PROJECT_NAME}-test DEPENDS - lua-Harness-tests LuaJIT-tests + lua-Harness-tests tarantool-tests ) =================================================================== > > > > > > > > > > diff --git a/test/lua-Harness-tests/CMakeLists.txt b/test/lua-Harness-tests/CMakeLists.txt > > > > new file mode 100644 > > > > index 0000000..9b35e5a > > > > --- /dev/null > > > > +++ b/test/lua-Harness-tests/CMakeLists.txt > > > > @@ -0,0 +1,49 @@ > > > > +# Test suite that has been added from lua-Harness test suite > > > > +# in scope of https://github.com/tarantool/tarantool/issues/4473. > > > > + > > > > +# See the rationale in the root CMakeLists.txt > > > > +cmake_minimum_required(VERSION 3.1 FATAL_ERROR) > > > > + > > > > +find_program(PROVE prove) > > > > +if(NOT PROVE) > > > > + message(WARNING "`prove' is not found, so lua-Harness-tests target is not generated") > > > > + return() > > > > +endif() > > > > + > > > > +set(LUA_TEST_FLAGS --failures --shuffle) > > > > > > Why did you drop TEST_DEPS variable containing the dependencies? > > > > Sorry, don't get it. What do you mean? > > If you look onto my iterative patch in the first review iteration, > you'll find TEST_DEPS variable similar to the one in tarantool-tests > CMakeLists.txt. I forgot to add it into CMakeLists.txt for LuaJIT-tests > and remembered about it in this patch. Sorry, I missed it while looks through your patch -- I supposed that it does two things: * removes tap renaming * removes list of test usage, as far as 5040 is resolved For now I don't understand, why do we need this TEST_DEPS? What is its mission? > > > > > > > > > > +if(CMAKE_VERBOSE_MAKEFILE) > > > > + list(APPEND LUA_TEST_FLAGS --verbose) > > > > +endif() > > > > + > > > > +string(CONCAT LUA_PATH > > > > + "./?.lua\;" > > > > + "${CMAKE_CURRENT_SOURCE_DIR}/?.lua\;" > > > > + "${LUAJIT_SOURCE_DIR}/?.lua\;" > > > > +) > > > > > > There is not a word regarding such complex LUA_PATH configuration. > > > > Ok, it can be the one long string, but, in my opinion, this format is > > more readable, plus, as a bonus, with it line length is less than 120 > > characters. I'll join these lines into one if you insist. > > This is not the issue (and might be much better that my approach in > tarantool-tests and I will patch the test runners to make it conform to > one style later). I'm talking about the purpose for each entry. E.g. why > do you need both "./?.lua" and "${CMAKE_CURRENT_SOURCE_DIR}/?.lua"? If > you need "${LUAJIT_SOURCE_DIR}/?.lua" for jit.* modules, then why it's > not required for other suites? Mention this explicitly, please. Got it now, thanks! Looks like it really is not necessary. See the iterative patch below: Checked result in CI -- it is green, except known freebsd issue. =================================================================== diff --git a/test/lua-Harness-tests/CMakeLists.txt b/test/lua-Harness-tests/CMakeLists.txt index b844788..fd5c8ce 100644 --- a/test/lua-Harness-tests/CMakeLists.txt +++ b/test/lua-Harness-tests/CMakeLists.txt @@ -15,16 +15,7 @@ if(CMAKE_VERBOSE_MAKEFILE) list(APPEND LUA_TEST_FLAGS --verbose) endif() -string(CONCAT LUA_PATH - "./?.lua\;" - "${CMAKE_CURRENT_SOURCE_DIR}/?.lua\;" - "${LUAJIT_SOURCE_DIR}/?.lua\;" -) - -string(CONCAT LUA_CPATH - "./?${CMAKE_SHARED_LIBRARY_SUFFIX}\;" - "${LUAJIT_SOURCE_DIR}/?${CMAKE_SHARED_LIBRARY_SUFFIX}\;" -) +set(LUA_PATH "./?.lua\;${CMAKE_CURRENT_SOURCE_DIR}/?.lua\;") add_custom_target(lua-Harness-tests DEPENDS ${LUAJIT_TEST_BINARY}) @@ -33,7 +24,6 @@ add_custom_command(TARGET lua-Harness-tests COMMAND env LUA_PATH="${LUA_PATH}\;" - LUA_CPATH="${LUA_CPATH}\;" # XXX: 309-os.t checks os.getenv() function by examining of # USERNAME or LOGNAME environment variable. # These variables might not be set in the environment, so =================================================================== > > > > > > > > > > + > > > > +string(CONCAT LUA_CPATH > > > > + "./?${CMAKE_SHARED_LIBRARY_SUFFIX}\;" > > > > + "${LUAJIT_SOURCE_DIR}/?${CMAKE_SHARED_LIBRARY_SUFFIX}\;" > > > > +) > > > > > > Ditto. > > > > > > > > > > -- > > > > 2.28.0 > > > > > > > > > > -- > > > Best regards, > > > IM > > > > -- > > Best regards, > > Sergey Kaplun > > -- > Best regards, > IM -- Best regards, Sergey Kaplun