Tarantool development patches archive
 help / color / mirror / Atom feed
From: Sergey Kaplun via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Sergey Bronnikov <estetus@gmail.com>
Cc: max.kokryashkin@gmail.com, tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH luajit 2/3][v2] test: set dependencies to tarantool-tests explicitly
Date: Mon, 13 Nov 2023 10:10:04 +0300	[thread overview]
Message-ID: <ZVHLzL4YqZy4tXfi@root> (raw)
In-Reply-To: <6ea1998ab3bf37b75e3f399fc55572bb99392c0f.1699534835.git.sergeyb@tarantool.org>

Hi, Sergey!
Thanks for the patch!
LGTM, after fixing my comments below.

On 09.11.23, Sergey Bronnikov wrote:
> From: Sergey Bronnikov <sergeyb@tarantool.org>
> 
> In testsuite `tarantool-tests` we are using CMake macro `BuildTestCLib`

Typo: s/`tarantool-tests`/`tarantool-tests`,/
Typo: s/CMake/the CMake/

> for building test C libraries. This macro builds a list `TESTLIBS` that
> contains all libraries required for tarantool tests. However, CMake
> skips adding C library to `TESTLIBS` on building test C library in the

Typo: s/adding C library/adding the C library/
Nit: s/on/when/
Typo: s/building test C library/building the test C library/

> following commit.
> 
> The patch removes `TESTLIBS` and adds each test C library as dependence

Typo: s/dependence/a dependency/

> to CMake target `tarantool-tests` explicitly using `add_dependence`

Typo: s/using/using the/

> command.
> ---
>  test/tarantool-tests/CMakeLists.txt | 17 +++++------------
>  1 file changed, 5 insertions(+), 12 deletions(-)
> 
> diff --git a/test/tarantool-tests/CMakeLists.txt b/test/tarantool-tests/CMakeLists.txt
> index c15d6037..d46e69a0 100644
> --- a/test/tarantool-tests/CMakeLists.txt
> +++ b/test/tarantool-tests/CMakeLists.txt
> @@ -10,6 +10,10 @@ if(NOT PROVE)
>    return()
>  endif()
>  
> +add_custom_target(tarantool-tests
> +  DEPENDS ${LUAJIT_TEST_BINARY}
> +)
> +
>  macro(BuildTestCLib lib sources)
>    add_library(${lib} SHARED EXCLUDE_FROM_ALL ${sources})
>    target_include_directories(${lib} PRIVATE
> @@ -37,12 +41,7 @@ macro(BuildTestCLib lib sources)
>        CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}"
>      )
>    endif()
> -  # XXX: Append the lib to be built to the dependency list.
> -  # 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)
> +  add_dependencies(tarantool-tests ${lib})
>    # Add the directory where the lib is built to the list with
>    # entries for LUA_CPATH environment variable, so LuaJIT can find
>    # and load it. See the comment about extending the list in the
> @@ -133,11 +132,6 @@ else()
>    list(APPEND LUA_TEST_ENV_MORE LD_LIBRARY_PATH=${LD_LIBRARY_PATH})
>  endif()
>  
> -# LUA_CPATH and LD_LIBRARY_PATH variables and also TESTLIBS list

I suppose that information about LUA_PATH and LD_LIBRARY_PATH may stay.

> -# with dependecies are set in scope of BuildTestLib macro.
> -add_custom_target(tarantool-tests
> -  DEPENDS ${LUAJIT_TEST_BINARY} ${TESTLIBS}
> -)
>  add_custom_command(TARGET tarantool-tests
>    COMMENT "Running Tarantool tests"
>    COMMAND
> @@ -154,4 +148,3 @@ add_custom_command(TARGET tarantool-tests
>        ${LUA_TEST_FLAGS}
>    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
>  )
> -
> -- 
> 2.34.1
> 

-- 
Best regards,
Sergey Kaplun

  reply	other threads:[~2023-11-13  7:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-09 13:06 [Tarantool-patches] [PATCH luajit 0/3][v2] Fix C file generation in jit.bcsave Sergey Bronnikov via Tarantool-patches
2023-11-09 13:08 ` [Tarantool-patches] [PATCH luajit 1/3][v2] Add 'cc' file type for saving bytecode Sergey Bronnikov via Tarantool-patches
2023-11-13  7:04   ` Sergey Kaplun via Tarantool-patches
2023-11-15  9:39     ` Sergey Bronnikov via Tarantool-patches
2023-11-09 13:08 ` [Tarantool-patches] [PATCH luajit 2/3][v2] test: set dependencies to tarantool-tests explicitly Sergey Bronnikov via Tarantool-patches
2023-11-13  7:10   ` Sergey Kaplun via Tarantool-patches [this message]
2023-11-15 11:34     ` Sergey Bronnikov via Tarantool-patches
2023-11-09 13:08 ` [Tarantool-patches] [PATCH luajit 3/3][v2] Fix C file generation in jit.bcsave Sergey Bronnikov via Tarantool-patches
2023-11-13  7:10   ` Sergey Kaplun via Tarantool-patches
2024-02-29  7:40 ` [Tarantool-patches] [PATCH luajit 0/3][v2] " Igor Munkin via Tarantool-patches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZVHLzL4YqZy4tXfi@root \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=estetus@gmail.com \
    --cc=max.kokryashkin@gmail.com \
    --cc=skaplun@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH luajit 2/3][v2] test: set dependencies to tarantool-tests explicitly' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox