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 B16797030C; Tue, 9 Feb 2021 11:43:27 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org B16797030C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1612860207; bh=qS+P3fcMwdkTmWYXdWt4xu+9FA8rL50ydzD7rkBoExQ=; 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=ivcyUAzUgu5ztcEfvg9kkz9MMJ5RGv1ywRLyxKc3198ifQQX7bBa+rAj4t23IT+/I eiw7dxkMxUVBYyx5ujslkHxdQQMnyPf1nbnIFcCq3EV5oNZR5vr/JB6jaPDmnX8LMS 8s3cQ/ZZWDYYK/YVo75bDMlX7fFhHwPdvmtkij7o= Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (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 80FD67030C for ; Tue, 9 Feb 2021 11:43:26 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 80FD67030C Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1l9OcC-0005aH-Hx; Tue, 09 Feb 2021 11:43:21 +0300 Date: Tue, 9 Feb 2021 11:43:19 +0300 To: Timur Safin Message-ID: <20210209084319.GG5448@tarantool.org> References: <6a03d693204cacc5791c75e1003efc150abb2979.1612291495.git.imun@tarantool.org> <01d401d6fe2b$dd80c160$98824420$@tarantool.org> <20210208162930.GF5448@tarantool.org> <044301d6febb$ef1af8b0$cd50ea10$@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <044301d6febb$ef1af8b0$cd50ea10$@tarantool.org> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.10.1 (2018-07-13) X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD953AC099BC0052A9CAEF2BF42A2A7729330F8028A4C0D8125182A05F538085040D243A02707E96A40F11794E2C9BD329DBEA669DABF8BB4393EC445768647D81A X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE741A8F2705CF52F55EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063764FE777F378F21448638F802B75D45FF5571747095F342E8C7A0BC55FA0FE5FCDB9C9A7D0C39A115CCA6E208672B435F1C477AA6C3F0927C389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C07E7E81EEA8A9722B8941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B6D082881546D93491CC7F00164DA146DA6F5DAA56C3B73B23C77107234E2CFBA567F23339F89546C55F5C1EE8F4F765FCF22983DF36A6FB3E75ECD9A6C639B01BBD4B6F7A4D31EC0BC0CAF46E325F83A522CA9DD8327EE4930A3850AC1BE2E735843AE0F20224B8D0C4224003CC836476C0CAF46E325F83A50BF2EBBBDD9D6B0F05F538519369F3743B503F486389A921A5CC5B56E945C8DA X-C1DE0DAB: 0D63561A33F958A5837DBD24A771F258D4DD55B8ED2CC8295AC8269A409946BAD59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75448CF9D3A7B2C848410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3455049D7B43D89D644258C076FF93283861BCD9FA67B6CCDC5BADFFDA647541FFDB0EA7226F31D59E1D7E09C32AA3244CEC54F9F5569AC770C0D1DCEFD9F2A9DBF26BFA4C8A6946B8927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojg67HQLCbniLGYxHzWZo/fw== X-Mailru-Sender: 689FA8AB762F73936BC43F508A063822BAC4007B05622E2B9B4B26F0365210CAA7C8D0F45F857DBFE9F1EFEE2F478337FB559BB5D741EB964C8C2C849690F8E70A04DAD6CC59E33667EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 3/5] test: run LuaJIT tests via CMake 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: Igor Munkin via Tarantool-patches Reply-To: Igor Munkin Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Timur, On 09.02.21, Timur Safin wrote: > : From: Igor Munkin > : Subject: Re: [PATCH luajit 3/5] test: run LuaJIT tests via CMake > : > : Timur, > : > : Thanks for your review! > : > : > > : > I don't like this. It reminds me of bad examples of this note > : > in the libev code like "this is so uncontrollably lame" which > : > actually distract users. We should rather put comments in more > : > neutral way (IMVHO). > : > : Unfortunately... CMake is a crap and I can't fix it. Well, honestly I > : don't want to fix it. But you're right: I can fix all these comments > : (athough I don't really want to). I have no idea how to express this in > : a more neutral way, so I propose the following: > : 1. s/CMake is a crap/there is no convenient way to make it in CMake/g. > : 2. Leave everything else unchanged. > > Hmm, ok. Fixed, squashed, force-pushed to the branch. Diff is below: ================================================================================ diff --git a/src/host/CMakeLists.txt b/src/host/CMakeLists.txt index 011a630..59094d0 100644 --- a/src/host/CMakeLists.txt +++ b/src/host/CMakeLists.txt @@ -44,7 +44,7 @@ add_executable(buildvm EXCLUDE_FROM_ALL buildvm_fold.c buildvm_lib.c buildvm_peobj.c - # XXX: Unfortunately CMake is a crap. I failed to specify + # XXX: Unfortunately, there is no convenient way to specify # autogenerated host/buildvm_arch.h as a dependency for # host/buildvm.c, so I simply explicitly mentioned it in this # *sources* list. diff --git a/test/tarantool-tests/CMakeLists.txt b/test/tarantool-tests/CMakeLists.txt index 0be4b34..5345e12 100644 --- a/test/tarantool-tests/CMakeLists.txt +++ b/test/tarantool-tests/CMakeLists.txt @@ -38,8 +38,8 @@ macro(BuildTestLib lib sources) ) endif() # XXX: Append the lib to be built to the dependecy list. - # Unfortunately, CMake is a crap and there is no other way to - # extend the list in parent scope but join two strings with + # Unfortunately, there is no convenient way in CMake to extend + # the list in parent scope other than join two strings with # semicolon. If one finds the normal way to make it work, feel # free to reach me. set(TESTLIBS "${lib};${TESTLIBS}" PARENT_SCOPE) ================================================================================ Small exercise for self-check: | $ grep -rF 'CMake is a crap' | wc -l | 0 > > : > : This is not only emotions. Such comments prevent one from unintentional > : refactoring of such fragile places with no failures and also from > : bothering the oldies with the questions kinda "dude, why is this done so > : badly". In other words, primarily I have left this for the history. > : > : If you're OK, then I'll fix the way described above. > : > : > > : > : + # Add the directory where the lib is built to the LUA_CPATH > : > : + # environment variable, so interpreter can find and load it. > : > : + # XXX: Here we see the other side of the coin. If one joins two > : > : + # strings with semicolon, the value automatically becomes the > : > : + # list. I have no idea what is wrong with this tool, but I found > : > : + # a single working solution to make LUA_CPATH be a string via > : > : + # "escaping" the semicolon right in string interpolation. > : > : + set(LUA_CPATH > : > : > : "${CMAKE_CURRENT_BINARY_DIR}/?${CMAKE_SHARED_LIBRARY_SUFFIX}\;${LUA_CPATH}" > : > : PARENT_SCOPE) > : > : + # Also add this directory to LD_LIBRARY_PATH environment > : > : + # variable, so FFI machinery can find and load it. > : > : + set(LD_LIBRARY_PATH "${CMAKE_CURRENT_BINARY_DIR}:${LD_LIBRARY_PATH}" > : > : PARENT_SCOPE) > : > : +endmacro() > : > : + > : > : +add_subdirectory(gh-4427-ffi-sandwich) > : > : +add_subdirectory(lj-flush-on-trace) > : > : +add_subdirectory(misclib-getmetrics-capi) > : > > : > I liked you introduced globs for test files addition (blow), > : > but unfortunately you didn't complete this with subdirectory addition > : > : I have thought about it for some time, and I have a strong rationale (at > : least for me) to not introducing such change: this doesn't work whether > : there are directories inside containing no tests. Furthermore, we're > : going to re-implement several C tests, so I would like to leave > : everything as it is (if you don't mind) and return to this place later. > > Ok, if you plan to refactor it, because today it looks inconsistent a bit. I personally also don't like to explicitly mention new auxiliary libs in tests: it makes backporting harder, it broke CI several times, so we will definitely refactor the current approach after incorporating other tests in public domain[1]. > > : > : > > : > Please see my proposed patch (with reworded comments and new macro) here > : https://gist.github.com/tsafin/6c7505c0c764ab2b474667bf0d65fb45. > : > > : > : > : > : > > : > Regards, > : > Timur > : > > : > : -- > : Best regards, > : IM > > Regards, > Timur > [1]: https://github.com/tarantool/tarantool/issues/4473 -- Best regards, IM