Tarantool development patches archive
 help / color / mirror / Atom feed
From: Igor Munkin <imun@tarantool.org>
To: Sergey Ostanevich <sergos@tarantool.org>,
	Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: [Tarantool-patches] [PATCH 2/4] test: adjust luajit-tap testing machinery
Date: Fri, 27 Mar 2020 16:23:36 +0300	[thread overview]
Message-ID: <58bc0a41c265e891099d20f4362f3baa887d3bdf.1585312984.git.imun@tarantool.org> (raw)
In-Reply-To: <cover.1585312984.git.imun@tarantool.org>

This changeset makes possible to run luajit-tap tests requiring
libraries implemented in C:
* symlink to luajit test is created on configuration phase instead of
  build one.
* introduced a CMake function for building shared libraries required for
  luajit tests.

Signed-off-by: Igor Munkin <imun@tarantool.org>
---
 test/CMakeLists.txt | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 9b5df7dc5..00fce7270 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -13,6 +13,13 @@ function(build_module module files)
     endif(TARGET_OS_DARWIN)
 endfunction()
 
+function(build_lualib lib sources)
+    add_library(${lib} SHARED ${sources})
+    set_target_properties(${lib} PROPERTIES PREFIX "")
+    if(TARGET_OS_DARWIN)
+        set_target_properties(${lib} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
+    endif(TARGET_OS_DARWIN)
+endfunction()
 
 add_compile_flags("C;CXX"
     "-Wno-unused-parameter")
@@ -21,13 +28,9 @@ if(POLICY CMP0037)
     cmake_policy(SET CMP0037 OLD)
 endif(POLICY CMP0037)
 
-add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/luajit-tap
-    COMMAND ${CMAKE_COMMAND} -E create_symlink
+execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
         ${PROJECT_SOURCE_DIR}/third_party/luajit/test
-        ${CMAKE_CURRENT_BINARY_DIR}/luajit-tap
-        COMMENT Create a symlink for luajit test dir to fix out-of-source tests)
-add_custom_target(symlink_luajit_tests ALL
-   DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/luajit-tap)
+        ${CMAKE_CURRENT_BINARY_DIR}/luajit-tap)
 
 add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/small
     COMMAND ${CMAKE_COMMAND} -E create_symlink
-- 
2.25.0

  parent reply	other threads:[~2020-03-27 13:29 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-27 13:23 [Tarantool-patches] [PATCH 0/4] Enable LuaJIT tests written in C Igor Munkin
2020-03-27 13:23 ` [Tarantool-patches] [PATCH 1/4] luajit: bump new version Igor Munkin
2020-03-27 13:23 ` Igor Munkin [this message]
2020-04-05 19:32   ` [Tarantool-patches] [PATCH 2/4] test: adjust luajit-tap testing machinery Vladislav Shpilevoy
2020-04-07 23:05     ` Igor Munkin
2020-03-27 13:23 ` [Tarantool-patches] [PATCH 3/4] test: enable luajit-tap:gh-4427-ffi-sandwich tests Igor Munkin
2020-03-30 18:53   ` Igor Munkin
2020-04-05 19:32   ` Vladislav Shpilevoy
2020-04-07 23:28     ` Igor Munkin
2020-04-09 22:05       ` Vladislav Shpilevoy
2020-04-15  0:46         ` Igor Munkin
2020-03-27 13:23 ` [Tarantool-patches] [PATCH 4/4] test: enable luajit-tap:lj-flush-on-trace tests Igor Munkin
2020-03-30 18:53   ` Igor Munkin
2020-04-05 19:32   ` Vladislav Shpilevoy
2020-04-07 23:33     ` Igor Munkin
2020-04-09 22:05       ` Vladislav Shpilevoy
2020-04-15  0:47         ` Igor Munkin
2020-03-27 13:32 ` [Tarantool-patches] [PATCH 0/4] Enable LuaJIT tests written in C Igor Munkin
2020-03-28 11:18   ` Igor Munkin
2020-03-30 18:55     ` Igor Munkin

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=58bc0a41c265e891099d20f4362f3baa887d3bdf.1585312984.git.imun@tarantool.org \
    --to=imun@tarantool.org \
    --cc=sergos@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH 2/4] test: adjust luajit-tap testing machinery' \
    /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