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 0CF116EC6F; Fri, 26 Feb 2021 22:05:00 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 0CF116EC6F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1614366300; bh=WJ7bkHX0OmTcLf1yduVHm5pGMrTH3L+qRTzDst3z2Xo=; h=To:References:In-Reply-To:Date:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=nOiLz9gwyNyD6GvgvmAfAk92M89BH4KATq1AYIiNHNRUwnzdVAzQB344MVOP+X6YP EfkIwxTht4dHeW2JmjhwMKb4vSrfZM8RrtC1+EyrVi8P2uclugpzdDgJj/DwYnbIr5 2hqQuX9O0+7uVlK+fKw2UDPVHyumVUlHKJ+DyEP8= Received: from smtp45.i.mail.ru (smtp45.i.mail.ru [94.100.177.105]) (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 A42746EC6F for ; Fri, 26 Feb 2021 22:04:58 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A42746EC6F Received: by smtp45.i.mail.ru with esmtpa (envelope-from ) id 1lFiQ5-0000gz-Gq; Fri, 26 Feb 2021 22:04:58 +0300 To: "'Igor Munkin'" References: <2ac28542e4eac2031e5c30b279aabd3bcacbd7a1.1612390822.git.imun@tarantool.org> <03e801d70a7c$f9162700$eb427500$@tarantool.org> <20210225220832.GC9042@tarantool.org> In-Reply-To: <20210225220832.GC9042@tarantool.org> Date: Fri, 26 Feb 2021 22:04:57 +0300 Message-ID: <115201d70c72$463c9720$d2b5c560$@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQKSGo9nMqUfEa7rxZOpsUP/wg+emgE/yriaAnBi3fAC+z6Ybqi/U/eg Content-Language: ru X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD9795828B892398B72AC588525E45B8D9948334200C4E13096182A05F538085040A464E58149AEB089E8D836239CF28271E49FB951377A7634B8E09FA8333CFBB7 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE75037DDE13FB75316EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637CB87E27B59CE093D8638F802B75D45FF5571747095F342E8C7A0BC55FA0FE5FCC39F9F5C7D3B8926218C53B44FB3B4A0E534FD6DF32C53ED389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C0A29E2F051442AF778941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B652D31B9D28593E51CC7F00164DA146DA6F5DAA56C3B73B237318B6A418E8EAB8D32BA5DBAC0009BE9E8FC8737B5C22499E4B918E0AFED99876E601842F6C81A12EF20D2F80756B5F7E9C4E3C761E06A776E601842F6C81A127C277FBC8AE2E8BD7FA5FF2288A9C0D3AA81AA40904B5D9DBF02ECDB25306B2B25CBF701D1BE8734AD6D5ED66289B5278DA827A17800CE72F88032165008D5167F23339F89546C5A8DF7F3B2552694A6FED454B719173D6725E5C173C3A84C3A27B50A64E76B53235872C767BF85DA2F004C906525384306FED454B719173D6462275124DF8B9C920A5816FF58DF6CF574AF45C6390F7469DAA53EE0834AAEE X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A24A6D60772A99906F8E1CD14B953EB46D6BDFA597DC8E2C4F355D89D7DBCDD132 X-C1DE0DAB: 0D63561A33F958A529AB65698DE7DD1405B731DA53BEE64C7DEC41D665009C46D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75968C9853642EB7C3410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34EC58E35A639A2471713604AF879822763C4879CCBF3A734D25191281CCDA5054B74E0D5299FC6C7E1D7E09C32AA3244C2F8162835EA235F703F571B2FEEDE177435BF7150578642F927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj8mqzvzJVEn175tylfA95Lw== X-Mailru-Sender: 6CA451E36783D721CBEA96CEA26D325D69D8B2ABE7B677C50609F53002E0E2E1B7CBEF92542CD7C82F97C478340294DCC77752E0C033A69E0F0C7111264B8915FF1320A92A5534336C18EFA0BB12DBB0 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH 3/3] ci: enable LuaJIT tests in CI 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: Timur Safin via Tarantool-patches Reply-To: Timur Safin Cc: 'TML' Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hell, yeah! LGTM! : -----Original Message----- : From: Igor Munkin : Sent: Friday, February 26, 2021 1:09 AM : To: Timur Safin : Cc: 'Sergey Kaplun' ; 'Alexander V. Tikhonov' : ; TML : Subject: Re: [Tarantool-patches] [PATCH 3/3] ci: enable LuaJIT tests = in CI :=20 : Timur, :=20 : On 24.02.21, Timur Safin wrote: : > This 1 thing is the only one that is bother me: it looks dependency = of : > Tarantool LuaJIT tests are not yet properly assigned between build : > Targets we have. : > : > Let me put it how it looks like from my side: : > - LuaJIT-test is phony, defined in third_party/luajit target and : > depends on tarantool-tests : > - tarantool-tests are not phony (i.e. you could not run = Tarantool-tests : > Twice, if you wish to) :=20 : Please, do not take it personally (at least since I've heard such : "bothering" from several teammates), but I consider this as a disease. : Why do you need to run the *passed* tests twice? To make *more* sure? : Kinda Windows-way... Unfortunately, I can't create a dialog window = with : "Are you sure these tests passed?" message, so I removed the artefacts : produced by .PHONY rules you mentioned above. Now you can run = and : targets as much as you want. :=20 : > - third_party/luajit/test is also depending on LuaJIT-luacheck : > Which is not phone either, and is not runnable if you : > Run it outside of Tarantool build (because .luacheckrc is : > At the root of Tarantool repo, not LuaJIT repo). :=20 : This is not true, there is a LuaJIT specific .luacheckrc in LuaJIT = repo. : The issue you've shared with me relates to the case when is : located within -- so called "idiomatic build way". Since : luacheck is run against all Lua files within , autogenerated : jit/vmdef.lua (the single file producing luacheck warnings) is also : checked. I explicitly excluded it from the file list to be checked. = Now : everything is fine. :=20 : > - Also LuaJIT-test is explicitly referred in the travis makefiles : > And not implicitly called by dependency of Tarantool testing. :=20 : LuaJIT-test is a dependency for Tarantool testing (i.e. = target), : but Make is not used for running Tarantool tests in CI, so there is no : other convenient way than using in .travis.mk. I = hope : this will have been fixed in the future and it is definitely out of = the : scope of this issue. :=20 : > : > This bothers me a lot, looks like dependency tree is not working : > correctly at the moment. Could you please make luacheck and = Tarantool-test : > targets phony, and add LuaJIT-test as prerequisite of Tarantool : > testing (in cmake)? :=20 : I hope the changes below are enough. Fixed in LuaJIT submodule, : squashed, force-pushed to the branch. :=20 : = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D : =3D=3D=3D=3D :=20 : diff --git a/.gitignore b/.gitignore : index 22921bf..2103a30 100644 : --- a/.gitignore : +++ b/.gitignore : @@ -18,7 +18,5 @@ cmake_install.cmake : cmake_uninstall.cmake : compile_commands.json : install_manifest.txt : -luacheck.ok : luajit-parse-memprof : luajit.pc : -tests.ok : diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt : index bb0ff91..d166c9d 100644 : --- a/test/CMakeLists.txt : +++ b/test/CMakeLists.txt : @@ -6,33 +6,32 @@ cmake_minimum_required(VERSION 3.1 FATAL_ERROR) : find_program(LUACHECK luacheck) : if(LUACHECK) : set(LUACHECK_RC ${PROJECT_SOURCE_DIR}/.luacheckrc) : - set(LUACHECK_OK ${CMAKE_CURRENT_BINARY_DIR}/luacheck.ok) : file(GLOB_RECURSE LUACHECK_DEPS ${PROJECT_SOURCE_DIR}/*.lua) : - add_custom_command( : + add_custom_target(${PROJECT_NAME}-luacheck : + DEPENDS ${LUACHECK_RC} ${LUACHECK_DEPS} : + ) : + add_custom_command(TARGET ${PROJECT_NAME}-luacheck : COMMENT "Running luacheck static analysis" : - OUTPUT ${LUACHECK_OK} : - DEPENDS ${LUACHECK} ${LUACHECK_RC} ${LUACHECK_DEPS} : COMMAND : ${LUACHECK} ${PROJECT_SOURCE_DIR} : --codes : --config ${LUACHECK_RC} : - && touch ${LUACHECK_OK} : - # XXX: Filenames in .luacheckrc are considered relative to : - # the working directory, hence luacheck should be run in the : - # project root directory. : - WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} : + # XXX: jit/vmdef.lua is an autogenerated Lua source, so : + # there is no need to run luacheck against it. Hence : + # explicitly exclude this file from the list for check. : + --exclude-files ${LUAJIT_BINARY_DIR}/jit/vmdef.lua : + # XXX: Filenames in .luacheckrc are considered relative to : + # the working directory, hence luacheck should be run in the : + # project root directory. : + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} : ) : else() : - add_custom_command( : + add_custom_target(${PROJECT_NAME}-luacheck) : + add_custom_command(TARGET ${PROJECT_NAME}-luacheck : COMMENT "`luacheck' is not found, so ${PROJECT_NAME}-luacheck = target is : dummy" : - OUTPUT luacheck.ok : - COMMAND touch luacheck.ok : - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} : ) : endif() :=20 : -add_custom_target(${PROJECT_NAME}-luacheck DEPENDS luacheck.ok) : - : add_subdirectory(tarantool-tests) :=20 : add_custom_target(${PROJECT_NAME}-test DEPENDS : diff --git a/test/tarantool-tests/CMakeLists.txt b/test/tarantool- : tests/CMakeLists.txt : index 52c3007..e9ac62a 100644 : --- a/test/tarantool-tests/CMakeLists.txt : +++ b/test/tarantool-tests/CMakeLists.txt : @@ -72,10 +72,11 @@ file(GLOB TEST_DEPS : ${CMAKE_CURRENT_SOURCE_DIR}/*${LUA_TEST_SUFFIX}) :=20 : # LUA_CPATH and LD_LIBRARY_PATH variables and also TESTLIBS list : # with dependecies are set in scope of BuildTestLib macro. : -add_custom_command( : - COMMENT "Running Tarantool tests" : - OUTPUT tests.ok : +add_custom_target(tarantool-tests : DEPENDS ${LUAJIT_TEST_BINARY} ${TESTLIBS} ${TEST_DEPS} : +) : +add_custom_command(TARGET tarantool-tests : + COMMENT "Running Tarantool tests" : COMMAND : env : LUA_PATH=3D"${LUA_PATH}\;\;" : @@ -85,8 +86,6 @@ add_custom_command( : --exec ${LUAJIT_TEST_BINARY} : --ext ${LUA_TEST_SUFFIX} : --failures --shuffle : - && touch tests.ok : WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} : ) :=20 : -add_custom_target(tarantool-tests DEPENDS tests.ok) :=20 : = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D : =3D=3D=3D=3D :=20 : > : > Thanks, : > Timur : > :=20 : :=20 : > :=20 : -- : Best regards, : IM