Tarantool development patches archive
 help / color / mirror / Atom feed
From: Sergey Kaplun via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Kirill Yukhin <kyukhin@tarantool.org>, Igor Munkin <imun@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: [Tarantool-patches] [PATCH] test: fix dynamic modules loading on macOS
Date: Wed, 29 Dec 2021 14:58:10 +0300	[thread overview]
Message-ID: <20211229115810.22661-1-skaplun@tarantool.org> (raw)

Since the auxiliary libraries are built as dynamically loaded modules on
macOS instead of shared libraries as it is done on Linux and BSD,
another environment variable should be used to guide `ffi.load()` while
searching the extension. Hence the paths are set in test need to be set
to `DYLD_LIBRARY_PATH` variable instead of `LD_LIBRARY_PATH` on macOS.

Branch: https://github.com/tarantool/tarantool/tree/skaplun/gh-noticket-fix-macos-fiber-switch-test-full-ci

 .../gh-1700-abort-recording-on-fiber-switch.test.lua        | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/test/app-tap/gh-1700-abort-recording-on-fiber-switch.test.lua b/test/app-tap/gh-1700-abort-recording-on-fiber-switch.test.lua
index 7b9156c22..47408e5b8 100755
--- a/test/app-tap/gh-1700-abort-recording-on-fiber-switch.test.lua
+++ b/test/app-tap/gh-1700-abort-recording-on-fiber-switch.test.lua
@@ -25,17 +25,19 @@ if #arg == 0 then
+  local libext = package.cpath:match('?.(%a+);')
   local vars = {
     LUABIN = arg[-1],
     SCRIPT = arg[0],
     -- To support out-of-source build use relative paths in repo
     PATH   = arg[-1]:gsub('src/tarantool$', 'test/app-tap'),
-    SUFFIX = package.cpath:match('?.(%a+);'),
+    SUFFIX = libext,
   local cmd = string.gsub('LUA_CPATH="$LUA_CPATH;<PATH>/?.<SUFFIX>" ' ..
                           'LUA_PATH="$LUA_PATH;<PATH>/?.lua" ' ..
-                          'LD_LIBRARY_PATH=<PATH> ' ..
+                          ((libext == 'dylib' and 'DYLD' or 'LD') ..
+                           '_LIBRARY_PATH=<PATH> ') ..
                           '<LUABIN> 2>&1 <SCRIPT>', '%<(%w+)>', vars)
   for _, ch in pairs(checks) do

             reply	other threads:[~2021-12-29 12:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-29 11:58 Sergey Kaplun via Tarantool-patches [this message]
2021-12-30  9:59 ` Kirill Yukhin 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:

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

  git send-email \
    --in-reply-to=20211229115810.22661-1-skaplun@tarantool.org \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=imun@tarantool.org \
    --cc=kyukhin@tarantool.org \
    --cc=skaplun@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH] test: fix dynamic modules loading on macOS' \


* 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