[Tarantool-patches] [PATCH 3/4] test: CI-environment
Maxim Kokryashkin
max.kokryashkin at gmail.com
Mon Jul 5 14:49:44 MSK 2021
From: Maxim Kokryashkin <m.kokryashkin at tarantool.org>
Part of tarantool/tarantool#5970
---
The patch `fperrad/lua-Harness at 6c2aa87` makes 309-os.t check
`os.getenv()` function by examining HOME environment variable
instead of USER, so we don't need to set USERNAME explicitly anymore,
as it stated in POSIX standard that every user must have HOME
varibale set. Therefore, `tarantool/luajit at 45ed138` should be
replaced with `fperrad/lua-Harness at 6c2aa87`.
test/lua-Harness-tests/309-os.t | 4 ++--
test/lua-Harness-tests/CMakeLists.txt | 5 -----
2 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/test/lua-Harness-tests/309-os.t b/test/lua-Harness-tests/309-os.t
index 8258e8af..a55d272a 100755
--- a/test/lua-Harness-tests/309-os.t
+++ b/test/lua-Harness-tests/309-os.t
@@ -169,8 +169,8 @@ end
do -- getenv
is(os.getenv('__IMPROBABLE__'), nil, "function getenv")
- local user = os.getenv('LOGNAME') or os.getenv('USERNAME')
- type_ok(user, 'string', "function getenv")
+ local home = os.getenv('HOME') or os.getenv('HOMEPATH')
+ type_ok(home, 'string', "function getenv")
end
do -- remove
diff --git a/test/lua-Harness-tests/CMakeLists.txt b/test/lua-Harness-tests/CMakeLists.txt
index 9fddd625..b9804033 100644
--- a/test/lua-Harness-tests/CMakeLists.txt
+++ b/test/lua-Harness-tests/CMakeLists.txt
@@ -26,11 +26,6 @@ add_custom_command(TARGET lua-Harness-tests
COMMAND
env
LUA_PATH="${LUA_PATH}\;"
- # XXX: 309-os.t checks os.getenv() function by examining
- # USERNAME or LOGNAME environment variable.
- # These variables might not be set in the environment, so
- # set one of them explicitly.
- USERNAME="fperrad"
${PROVE} ${CMAKE_CURRENT_SOURCE_DIR}
--exec '${LUAJIT_TEST_COMMAND} -l profile_luajit21'
${LUA_TEST_FLAGS}
--
2.31.1
More information about the Tarantool-patches
mailing list