Tarantool development patches archive
 help / color / mirror / Atom feed
From: Maxim Kokryashkin via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: tarantool-patches@dev.tarantool.org, imun@tarantool.org,
	skaplun@tarantool.org
Subject: [Tarantool-patches] [PATCH 1/4] test: resolving program name
Date: Mon,  5 Jul 2021 14:49:42 +0300
Message-ID: <d377115fa4b7cb3d7f22eb248dccefc5a1ac3c3d.1625484589.git.max.kokryashkin@gmail.com> (raw)
In-Reply-To: <cover.1625484589.git.max.kokryashkin@gmail.com>

From: Maxim Kokryashkin <m.kokryashkin@tarantool.org>

Part of tarantool/tarantool#5970
---
The patch `fperrad/lua-Harness@1be25a8` from lua-Harness suite is the 
same as the patch `tarantool/luajit@8376885`, except for 
`get_lua_binary_name()`, which was renamed to `_retrieve_progname()` 
in `fperadd/lua-Harness`.

 test/lua-Harness-tests/241-standalone.t.disabled | 2 +-
 test/lua-Harness-tests/242-luac.t                | 2 +-
 test/lua-Harness-tests/301-basic.t               | 2 +-
 test/lua-Harness-tests/308-io.t                  | 2 +-
 test/lua-Harness-tests/309-os.t                  | 2 +-
 test/lua-Harness-tests/320-stdin.t               | 2 +-
 test/lua-Harness-tests/411-luajit.t.disabled     | 2 +-
 test/lua-Harness-tests/tap.lua                   | 8 ++++++++
 8 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/test/lua-Harness-tests/241-standalone.t.disabled b/test/lua-Harness-tests/241-standalone.t.disabled
index c5237eed..b8b6aa60 100755
--- a/test/lua-Harness-tests/241-standalone.t.disabled
+++ b/test/lua-Harness-tests/241-standalone.t.disabled
@@ -41,7 +41,7 @@ elseif ravi then
     banner = '^Ravi %d%.%d%.%d'
 end
 
-local lua = get_lua_binary_name()
+local lua = _retrieve_progname()
 local luac = jit and lua or (lua .. 'c')
 
 if not pcall(io.popen, lua .. [[ -e "a=1"]]) then
diff --git a/test/lua-Harness-tests/242-luac.t b/test/lua-Harness-tests/242-luac.t
index a95a334a..93c990ed 100755
--- a/test/lua-Harness-tests/242-luac.t
+++ b/test/lua-Harness-tests/242-luac.t
@@ -38,7 +38,7 @@ if ravi then
     skip_all("ravi")
 end
 
-local lua = get_lua_binary_name()
+local lua = _retrieve_progname()
 local luac = lua .. 'c'
 
 if not pcall(io.popen, lua .. [[ -e "a=1"]]) then
diff --git a/test/lua-Harness-tests/301-basic.t b/test/lua-Harness-tests/301-basic.t
index a4bb09ff..a4fe6381 100755
--- a/test/lua-Harness-tests/301-basic.t
+++ b/test/lua-Harness-tests/301-basic.t
@@ -48,7 +48,7 @@ local has_warn = _VERSION >= 'Lua 5.4'
 local has_xpcall52 = _VERSION >= 'Lua 5.2' or jit
 local has_xpcall53 = _VERSION >= 'Lua 5.3' or jit
 
-local lua = get_lua_binary_name()
+local lua = _retrieve_progname()
 
 plan'no_plan'
 
diff --git a/test/lua-Harness-tests/308-io.t b/test/lua-Harness-tests/308-io.t
index 35d39c02..dfe2d832 100755
--- a/test/lua-Harness-tests/308-io.t
+++ b/test/lua-Harness-tests/308-io.t
@@ -40,7 +40,7 @@ local has_read53 = _VERSION >= 'Lua 5.3' or luajit21
 local has_meta53 = _VERSION >= 'Lua 5.3'
 local has_meta54 = _VERSION >= 'Lua 5.4'
 
-local lua = get_lua_binary_name()
+local lua = _retrieve_progname()
 
 plan'no_plan'
 
diff --git a/test/lua-Harness-tests/309-os.t b/test/lua-Harness-tests/309-os.t
index a787b147..8258e8af 100755
--- a/test/lua-Harness-tests/309-os.t
+++ b/test/lua-Harness-tests/309-os.t
@@ -34,7 +34,7 @@ require'tap'
 local profile = require'profile'
 local luajit20 = jit and (jit.version_num < 20100 and not jit.version:match'^RaptorJIT')
 local has_execute51 = _VERSION == 'Lua 5.1' and (not profile.luajit_compat52 or ujit)
-local lua = get_lua_binary_name()
+local lua = _retrieve_progname()
 
 plan'no_plan'
 
diff --git a/test/lua-Harness-tests/320-stdin.t b/test/lua-Harness-tests/320-stdin.t
index 4828285d..8b19c5c5 100755
--- a/test/lua-Harness-tests/320-stdin.t
+++ b/test/lua-Harness-tests/320-stdin.t
@@ -26,7 +26,7 @@ Tests Lua Basic & IO Libraries with stdin
 
 require'tap'
 
-local lua = get_lua_binary_name()
+local lua = _retrieve_progname()
 
 if not pcall(io.popen, lua .. [[ -e "a=1"]]) then
     skip_all "io.popen not supported"
diff --git a/test/lua-Harness-tests/411-luajit.t.disabled b/test/lua-Harness-tests/411-luajit.t.disabled
index feb752eb..25c3ee52 100755
--- a/test/lua-Harness-tests/411-luajit.t.disabled
+++ b/test/lua-Harness-tests/411-luajit.t.disabled
@@ -31,7 +31,7 @@ if not jit or ujit then
     skip_all("only with LuaJIT")
 end
 
-local lua = get_lua_binary_name()
+local lua = _retrieve_progname()
 
 if not pcall(io.popen, lua .. [[ -e "a=1"]]) then
     skip_all("io.popen not supported")
diff --git a/test/lua-Harness-tests/tap.lua b/test/lua-Harness-tests/tap.lua
index a8454ae0..86cca4e0 100644
--- a/test/lua-Harness-tests/tap.lua
+++ b/test/lua-Harness-tests/tap.lua
@@ -9,6 +9,14 @@
 
 ]]
 
+function _retrieve_progname ()
+    local i = 0
+    while arg[i] do
+        i = i - 1
+    end
+    return arg[i + 1]
+end
+
 if pcall(require, 'Test.More') then
     diag 'Test.More loaded'
     return
-- 
2.31.1


  reply	other threads:[~2021-07-05 12:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-05 11:49 [Tarantool-patches] [PATCH 0/4] test: bump lua-Harness suite Maxim Kokryashkin via Tarantool-patches
2021-07-05 11:49 ` Maxim Kokryashkin via Tarantool-patches [this message]
2021-07-06 20:29   ` [Tarantool-patches] [PATCH 1/4] test: resolving program name Igor Munkin via Tarantool-patches
2021-07-05 11:49 ` [Tarantool-patches] [PATCH 2/4] test: out-of-source testing Maxim Kokryashkin via Tarantool-patches
2021-07-06 20:29   ` Igor Munkin via Tarantool-patches
2021-07-05 11:49 ` [Tarantool-patches] [PATCH 3/4] test: CI-environment Maxim Kokryashkin via Tarantool-patches
2021-07-06 20:29   ` Igor Munkin via Tarantool-patches
2021-07-05 11:49 ` [Tarantool-patches] [PATCH 4/4] test: TAP module name collisions Maxim Kokryashkin via Tarantool-patches
2021-07-06 20:30   ` Igor Munkin via Tarantool-patches
2021-07-06 20:29 ` [Tarantool-patches] [PATCH 0/4] test: bump lua-Harness suite 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=d377115fa4b7cb3d7f22eb248dccefc5a1ac3c3d.1625484589.git.max.kokryashkin@gmail.com \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=imun@tarantool.org \
    --cc=max.kokryashkin@gmail.com \
    --cc=skaplun@tarantool.org \
    /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

Tarantool development patches archive

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://lists.tarantool.org/tarantool-patches/0 tarantool-patches/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 tarantool-patches tarantool-patches/ https://lists.tarantool.org/tarantool-patches \
		tarantool-patches@dev.tarantool.org.
	public-inbox-index tarantool-patches

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git