From: Sergey Kaplun via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Sergey Ostanevich <sergos@tarantool.org>,
Igor Munkin <imun@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: [Tarantool-patches] [PATCH v2 luajit 3/5] test: adjust lua-Harness test suite for Tarantool
Date: Mon, 15 Mar 2021 18:29:28 +0300 [thread overview]
Message-ID: <31d2b8f880693c4af3d47d7c6693acfd79459052.1615819534.git.skaplun@tarantool.org> (raw)
In-Reply-To: <cover.1615819534.git.skaplun@tarantool.org>
This patch makes it possible to run lua-Harness test suite using
Tarantool.
203-lexico.t and 301-basic.t is adjusted to valid working with
out-of-source build in Tarantool CI.
Inside Tarantool's GitHub-CI there is no defined variable LOGNAME nor
USERNAME. This leads to test failure inside CI, because a string is
expected. So, now USERNAME is set manually via CMake.
Part of tarantool/tarantool#5844
Part of tarantool/tarantool#4473
---
test/lua-Harness-tests/203-lexico.t | 14 ++++++++++----
test/lua-Harness-tests/301-basic.t | 6 +++++-
test/lua-Harness-tests/CMakeLists.txt | 4 ++++
3 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/test/lua-Harness-tests/203-lexico.t b/test/lua-Harness-tests/203-lexico.t
index c1abebf..5f79b3f 100755
--- a/test/lua-Harness-tests/203-lexico.t
+++ b/test/lua-Harness-tests/203-lexico.t
@@ -117,20 +117,26 @@ do
like(msg, "^[^:]+:%d+: unfinished long comment .-near")
end
+-- XXX: If this test is run out of the tests source tree, the
+-- relative paths below become invalid. Hence, we need to
+-- prepend the directory from the script (i.e. test) name to
+-- the auxiliary files to be loaded and executed.
+local test_srcdir = arg[0]:gsub('([^/]+)%.t$', '')
+
if _VERSION >= 'Lua 5.2' or jit then
- dofile'lexico52/lexico.t'
+ dofile(test_srcdir .. 'lexico52/lexico.t')
end
if _VERSION >= 'Lua 5.3' or luajit21 then
- dofile'lexico53/lexico.t'
+ dofile(test_srcdir .. 'lexico53/lexico.t')
end
if _VERSION >= 'Lua 5.4' then
- dofile'lexico54/lexico.t'
+ dofile(test_srcdir .. 'lexico54/lexico.t')
end
if jit and pcall(require, 'ffi') then
- dofile'lexicojit/lexico.t'
+ dofile(test_srcdir .. 'lexicojit/lexico.t')
end
done_testing()
diff --git a/test/lua-Harness-tests/301-basic.t b/test/lua-Harness-tests/301-basic.t
index f4f9235..c4ab594 100755
--- a/test/lua-Harness-tests/301-basic.t
+++ b/test/lua-Harness-tests/301-basic.t
@@ -843,7 +843,11 @@ do -- xpcall
end
if jit and pcall(require, 'ffi') then
- dofile'lexicojit/basic.t'
+ -- XXX: If this test is run out of the tests source tree, the
+ -- relative paths below become invalid. Hence, we need to
+ -- prepend the directory from the script (i.e. test) name to
+ -- the auxiliary files to be loaded and executed.
+ dofile(arg[0]:gsub('([^/]+)%.t$', '') .. '/lexicojit/basic.t')
end
done_testing()
diff --git a/test/lua-Harness-tests/CMakeLists.txt b/test/lua-Harness-tests/CMakeLists.txt
index 9b35e5a..bac279f 100644
--- a/test/lua-Harness-tests/CMakeLists.txt
+++ b/test/lua-Harness-tests/CMakeLists.txt
@@ -40,6 +40,10 @@ add_custom_command(TARGET lua-Harness-tests
# for more info.
# So use less preferable way for tests.
# See the root CMakeLists.txt for more info.
+ # XXX: 309-os.t checks os.getenv() function by examine of
+ # USERNAME or LOGNAME enviroment variable. It is not present
+ # inside CI by itself, so it is set here manually.
+ USERNAME="fperrad"
${PROVE} ${CMAKE_CURRENT_SOURCE_DIR}
--exec '${LUAJIT_TEST_COMMAND} -l profile_luajit21'
${LUA_TEST_FLAGS}
--
2.28.0
next prev parent reply other threads:[~2021-03-15 15:31 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-15 15:29 [Tarantool-patches] [PATCH v2 luajit 0/5] Adapt lua-Harness test suite Sergey Kaplun via Tarantool-patches
2021-03-15 15:29 ` [Tarantool-patches] [PATCH v2 luajit 1/5] test: add " Sergey Kaplun via Tarantool-patches
2021-03-15 17:37 ` Igor Munkin via Tarantool-patches
2021-03-15 18:10 ` Sergey Kaplun via Tarantool-patches
2021-03-15 21:06 ` Igor Munkin via Tarantool-patches
2021-03-16 9:38 ` Sergey Kaplun via Tarantool-patches
2021-03-16 11:08 ` Igor Munkin via Tarantool-patches
2021-03-16 12:02 ` Sergey Kaplun via Tarantool-patches
2021-03-16 13:50 ` Sergey Ostanevich via Tarantool-patches
2021-03-15 15:29 ` [Tarantool-patches] [PATCH v2 luajit 2/5] test: adjust lua-Harness suite for LuaJIT Sergey Kaplun via Tarantool-patches
2021-03-15 17:39 ` Igor Munkin via Tarantool-patches
2021-03-15 18:33 ` Sergey Kaplun via Tarantool-patches
2021-03-15 21:27 ` Igor Munkin via Tarantool-patches
2021-03-16 14:25 ` Sergey Ostanevich via Tarantool-patches
2021-03-15 15:29 ` Sergey Kaplun via Tarantool-patches [this message]
2021-03-15 17:44 ` [Tarantool-patches] [PATCH v2 luajit 3/5] test: adjust lua-Harness test suite for Tarantool Igor Munkin via Tarantool-patches
2021-03-16 6:01 ` Sergey Kaplun via Tarantool-patches
2021-03-16 10:51 ` Igor Munkin via Tarantool-patches
2021-03-16 14:51 ` Sergey Ostanevich via Tarantool-patches
2021-03-16 14:59 ` Sergey Kaplun via Tarantool-patches
2021-03-15 19:12 ` Igor Munkin via Tarantool-patches
2021-03-15 15:29 ` [Tarantool-patches] [PATCH v2 luajit 4/5] test: disable 241-standalone of lua-Harness suite Sergey Kaplun via Tarantool-patches
2021-03-16 14:51 ` Sergey Ostanevich via Tarantool-patches
2021-03-15 15:29 ` [Tarantool-patches] [PATCH v2 luajit 5/5] test: disable 411-luajit " Sergey Kaplun via Tarantool-patches
2021-03-16 14:52 ` Sergey Ostanevich via Tarantool-patches
2021-03-17 0:46 ` [Tarantool-patches] [PATCH v2 luajit 0/5] Adapt lua-Harness test suite Igor Munkin via Tarantool-patches
2021-03-17 7:32 ` Sergey Kaplun via Tarantool-patches
2021-03-17 10:27 ` Igor Munkin via Tarantool-patches
2021-03-17 10:31 ` Sergey Kaplun via Tarantool-patches
2021-03-17 16:49 ` 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=31d2b8f880693c4af3d47d7c6693acfd79459052.1615819534.git.skaplun@tarantool.org \
--to=tarantool-patches@dev.tarantool.org \
--cc=imun@tarantool.org \
--cc=sergos@tarantool.org \
--cc=skaplun@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH v2 luajit 3/5] test: adjust lua-Harness test suite for Tarantool' \
/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