[Tarantool-patches] [PATCH v2 luajit 5/7] test: shrink LUA_CPATH and {DY}LD_LIBRARY_PATH

Sergey Kaplun skaplun at tarantool.org
Sat Oct 12 10:00:40 MSK 2024


Hi, Maxim!
Thanks for the review!
Fixed your comment and force-pushed the branch.

On 11.10.24, Maxim Kokryashkin wrote:
> Hi, Sergey!
> Thanks for the patch!
> LGTM, except for a single nit below.
> 
> On Tue, Sep 24, 2024 at 01:29:50PM GMT, Sergey Kaplun wrote:
> > This patch sets the unique value of each of these variables for each of
> > the tests and only where they are needed. Also, it drops the comment
> > about SIP [1] tricks since it is obsolete after
> > 29897567ee5ed57e961c730432c056a3dbaa8f09 ("test: stop using
> > utils.selfrun in tests").
> >
> > [1]: https://support.apple.com/en-us/HT204899
> >
> > Resolves tarantool/tarantool#9898
> > ---
> >  test/tarantool-tests/CMakeLists.txt           | 85 ++++++++-----------
> >  test/tarantool-tests/ffi-ccall/CMakeLists.txt |  2 +-
> >  .../fix-bit-shift-generation/CMakeLists.txt   |  3 +-
> >  .../gh-4427-ffi-sandwich/CMakeLists.txt       |  3 +-
> >  .../CMakeLists.txt                            |  3 +-
> >  .../gh-6189-cur_L/CMakeLists.txt              |  3 +-
> >  .../lj-1004-oom-error-frame/CMakeLists.txt    |  3 +-
> >  .../CMakeLists.txt                            |  3 +-
> >  .../lj-1166-error-stitch/CMakeLists.txt       |  6 +-
> >  .../lj-416-xor-before-jcc/CMakeLists.txt      |  3 +-
> >  .../CMakeLists.txt                            |  3 +-
> >  .../lj-549-bytecode-loader/CMakeLists.txt     |  3 +-
> >  .../CMakeLists.txt                            |  3 +-
> >  .../lj-601-fix-gc-finderrfunc/CMakeLists.txt  |  3 +-
> >  .../lj-727-lightuserdata-itern/CMakeLists.txt |  3 +-
> >  .../CMakeLists.txt                            |  3 +-
> >  .../lj-flush-on-trace/CMakeLists.txt          |  3 +-
> >  .../both/CMakeLists.txt                       |  4 +-
> >  .../gnuhash/CMakeLists.txt                    |  4 +-
> >  .../hash/CMakeLists.txt                       |  4 +-
> >  .../stripped/CMakeLists.txt                   |  4 +-
> >  21 files changed, 82 insertions(+), 69 deletions(-)
> >
> > diff --git a/test/tarantool-tests/CMakeLists.txt b/test/tarantool-tests/CMakeLists.txt
> > index 5e3493b6..d0964aed 100644
> > --- a/test/tarantool-tests/CMakeLists.txt
> > +++ b/test/tarantool-tests/CMakeLists.txt
> > @@ -5,17 +5,16 @@ add_custom_target(tarantool-tests-libs
> >    DEPENDS libluajit
> >  )
> >
> > -macro(BuildTestCLib lib sources)
> > -  AddTestLib(${lib} ${sources})
> > +macro(BuildTestCLib lib source for_tests)
> 
> This whole macro signature now reads something like `lib source
> for_tests` which looks kind of misleading, especially in the code below.
> 
> IMO, it would be better to call the last variable like `dependent_tests`
> for better readability. Feel free to ignore, though.

Renamed as you suggested:
===================================================================
diff --git a/test/tarantool-tests/CMakeLists.txt b/test/tarantool-tests/CMakeLists.txt
index 297d5801..0f9bca69 100644
--- a/test/tarantool-tests/CMakeLists.txt
+++ b/test/tarantool-tests/CMakeLists.txt
@@ -5,12 +5,12 @@ add_custom_target(tarantool-tests-libs
   DEPENDS libluajit
 )
 
-macro(BuildTestCLib lib source for_tests)
+macro(BuildTestCLib lib source dependent_tests)
   AddTestLib(${lib} ${source})
   add_dependencies(tarantool-tests-libs ${lib})
   # Remember libraries for each test to be proceeded with after
   # test targets are created.
-  foreach(testname ${for_tests})
+  foreach(testname ${dependent_tests})
     set(LIBS_${testname}
       "${CMAKE_CURRENT_BINARY_DIR};${LIBS_${testname}}" PARENT_SCOPE
     )
===================================================================

> 
>  --
> > 2.46.0
> >

-- 
Best regards,
Sergey Kaplun


More information about the Tarantool-patches mailing list