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 D9C42C9EDDA; Mon, 23 Sep 2024 11:18:32 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org D9C42C9EDDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1727079512; bh=NTknb2iy+ITh/siNfbqPqUN1+FHWiZuJ5DNxQ/t9Bmc=; 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=YzhrQlLdxz/u+I/wrpX+IGxqV5thECHXgHzUek3bYd19LOs6j5N2oYUkNQ+Q/Gjb6 MJ+npHeVlOlfFIm66RPONm4uel/a0Vt/zRVA9bdNxOw02Coc44pLl6tJL25Q59HVtW mSyLGliwju+uXRPlIou3WQBDWkAO4N+3ZLAGC9hg= Received: from smtp31.i.mail.ru (smtp31.i.mail.ru [95.163.41.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 74406C9EDDA for ; Mon, 23 Sep 2024 11:18:31 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 74406C9EDDA Received: by smtp31.i.mail.ru with esmtpa (envelope-from ) id 1sseH7-0000000DEfO-2Txl; Mon, 23 Sep 2024 11:18:30 +0300 Date: Mon, 23 Sep 2024 11:18:14 +0300 To: Sergey Bronnikov Message-ID: References: <329f67f8-a7b7-4753-96e2-bbc4f2574de3@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <329f67f8-a7b7-4753-96e2-bbc4f2574de3@tarantool.org> X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD96E52E9D942F25A5FE0F4C8AADDA49724D81F899678C50E6500894C459B0CD1B93FC90DD6CF9DC16E77CEB78C184DB64F46D2D7AC1ECF4F01109084F5D7E5EC3E4787F701E02FBF3D X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7364F8074C6DFACE2C2099A533E45F2D0395957E7521B51C2CFCAF695D4D8E9FCEA1F7E6F0F101C6778DA827A17800CE79E25BE5045FD62C0EA1F7E6F0F101C6723150C8DA25C47586E58E00D9D99D84E1BDDB23E98D2D38B043BF0FB74779F36B6CCF6FBA9ADCBB1D0A5C9B2F2FD0B41B2F438B9B07B2126A471835C12D1D9774AD6D5ED66289B5278DA827A17800CE71AE4D56B06699BBC9FA2833FD35BB23D2EF20D2F80756B5F868A13BD56FB6657A471835C12D1D977725E5C173C3A84C3E97D2AE7161E217F117882F4460429728AD0CFFFB425014E868A13BD56FB6657D81D268191BDAD3DC09775C1D3CA48CFFB892369DDD87097BA3038C0950A5D36C8A9BA7A39EFB766D91E3A1F190DE8FDBA3038C0950A5D36D5E8D9A59859A8B6378990534548B4FE76E601842F6C81A1F004C906525384303E02D724532EE2C3F43C7A68FF6260569E8FC8737B5C2249EC8D19AE6D49635B68655334FD4449CB9ECD01F8117BC8BEAAAE862A0553A39223F8577A6DFFEA7C5C8BF3F796D5A11743847C11F186F3C59DAA53EE0834AAEE X-C1DE0DAB: 0D63561A33F958A5871DB06AFAE5F2E65002B1117B3ED696C082D7A323E4DF12D57BAD45EC4C5DE1823CB91A9FED034534781492E4B8EEADA79578C5CF9A9009BDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF0870F659B8700F3B83A1A83BEBAB1BA78068BA9357CB09CE3F241C3CF2B804DC245B1B6CBED8166AFD4E6A0B424C2B48BCBDC0089DDBE7FDEFD44D57DB17C3A0BB2BA397F0A1D6BD5F4332CA8FE04980913E6812662D5F2A5EAB5682573093F7837F15F2B5E4A70B33F2C28C22F508233FCF178C6DD14203 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojcsBYxvRMKex1T3o9EhGdaw== X-Mailru-Sender: 520A125C2F17F0B1A9638AD358559B59FD4C6CBD02E9A318AC8EDD30083ED68E739E3FD2BA8AA756B7CBEF92542CD7C88B0A2698F12F5C9EC77752E0C033A69E86920BD37369036789A8C6A0E60D2BB63A5DB60FBEB33A8A0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 3/7] cmake: introduce AppendTestEnvVar macro 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" Hi, Sergey! Thanks for the review! See my answers below. On 23.09.24, Sergey Bronnikov wrote: > Hi, Sergey, > > thanks for the patch! See comments below. > > On 23.09.2024 10:18, Sergey Kaplun wrote: > > It is useful to update the environment variable for some tests. For > > CMake versions >= 3.22, we can use ENVIRONMENT_MODIFICATION [1] instead. > > But unless we bump the CMake version, this macro is a workaround. > > > > [1]:https://cmake.org/cmake/help/latest/prop_test/ENVIRONMENT_MODIFICATION.html > > > > Part of tarantool/tarantool#9898 > > --- > > test/tarantool-tests/CMakeLists.txt | 23 +++++++++++++++++++++++ > > 1 file changed, 23 insertions(+) > > > > diff --git a/test/tarantool-tests/CMakeLists.txt b/test/tarantool-tests/CMakeLists.txt > > index 11a84496..4530c9fd 100644 > > --- a/test/tarantool-tests/CMakeLists.txt > > +++ b/test/tarantool-tests/CMakeLists.txt > > @@ -18,6 +18,29 @@ macro(BuildTestCLib lib sources) > > set(LD_LIBRARY_PATH "${CMAKE_CURRENT_BINARY_DIR}:${LD_LIBRARY_PATH}" PARENT_SCOPE) > > endmacro() > > > > +# FIXME: This is used only due to ancient CMake requirements. > > +# If we update to CMake >= 3.22, we can use > > +# ENVIRONMENT_MODIFICATION [1] instead. > > +# [1]:https://cmake.org/cmake/help/latest/prop_test/ENVIRONMENT_MODIFICATION.html > I would add a small description for a macro. Added the description. Branch is force-pushed. =================================================================== diff --git a/test/tarantool-tests/CMakeLists.txt b/test/tarantool-tests/CMakeLists.txt index 4530c9fd..a5f3efcd 100644 --- a/test/tarantool-tests/CMakeLists.txt +++ b/test/tarantool-tests/CMakeLists.txt @@ -22,6 +22,9 @@ endmacro() # If we update to CMake >= 3.22, we can use # ENVIRONMENT_MODIFICATION [1] instead. # [1]: https://cmake.org/cmake/help/latest/prop_test/ENVIRONMENT_MODIFICATION.html +# This macro appends to the given test's environment variable the +# given value. If the variable doesn't exist, it is created equal +# to the given argument. macro(AppendTestEnvVar testname var value) get_test_property(${testname} ENVIRONMENT old_env) foreach(loopvar "${old_env}") =================================================================== > > +macro(AppendTestEnvVar testname var value) > > I would rename macro to something like "ModifyTestEnv" > > because it appends env var when variable with the same name was not found > > and modifies it when variable exist. I prefer to leave AppendTestEnvVar (since "ModifyTestEnv" lacks the description of the Append part) and clarify its behaviour with a comment. > > > > add_subdirectory(gh-4427-ffi-sandwich) -- Best regards, Sergey Kaplun