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 v2 03/10] test: use CI friendly variables in lua-Harness
Date: Tue, 20 Jul 2021 19:26:51 +0300	[thread overview]
Message-ID: <c7336b9dbd4d160ab9290e425c6773bcfb40c556.1626797225.git.m.kokryashkin@tarantool.org> (raw)
In-Reply-To: <cover.1626797225.git.m.kokryashkin@tarantool.org>

In scope of the commit 45ed138dcb9228d8ac5b8d82331ddd20a0bfada1
('test: set USERNAME env var for lua-Harness suite') the environment
of the testing process is tweaked via CMake, since both LOGNAME and
USERNAME environment variables might be missing.

Actually, POSIX standard states that every user must have HOME
environment variable set. It allows to use this in the corresponding
assertion instead of LOGNAME and USERNAME without additional
environment setup.

As a result this patch[1] from lua-Harness suite supersedes the
mentioned commit, and CMake hack can be dropped.

[1]: https://framagit.org/fperrad/lua-Harness/-/commit/6c2aa87

Part of tarantool/tarantool#5970
Part of tarantool/tarantool#4473
---
 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 2002ca47..14cbb89a 100755
--- a/test/lua-Harness-tests/309-os.t
+++ b/test/lua-Harness-tests/309-os.t
@@ -169,8 +169,8 @@ end
 do -- getenv
     equals(os.getenv('__IMPROBABLE__'), nil, "function getenv")
 
-    local user = os.getenv('LOGNAME') or os.getenv('USERNAME')
-    is_string(user, "function getenv")
+    local home = os.getenv('HOME') or os.getenv('HOMEPATH')
+    is_string(home, "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.32.0


  parent reply	other threads:[~2021-07-20 16:29 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-20 16:26 [Tarantool-patches] [PATCH v2 00/10] test: lua-Harness suite patch bump Maxim Kokryashkin via Tarantool-patches
2021-07-20 16:26 ` [Tarantool-patches] [PATCH v2 01/10] test: port lua-Harness to Test.Assertion Maxim Kokryashkin via Tarantool-patches
2021-07-25 21:08   ` Igor Munkin via Tarantool-patches
2021-07-26 10:38     ` Максим Корякшин via Tarantool-patches
2021-07-27  6:41       ` Sergey Kaplun via Tarantool-patches
2021-07-27 22:18         ` Максим Корякшин via Tarantool-patches
2021-07-20 16:26 ` [Tarantool-patches] [PATCH v2 02/10] test: rename lua-Harness tap to test_assertion Maxim Kokryashkin via Tarantool-patches
2021-07-25 21:08   ` Igor Munkin via Tarantool-patches
2021-07-27  6:27   ` Sergey Kaplun via Tarantool-patches
2021-07-20 16:26 ` Maxim Kokryashkin via Tarantool-patches [this message]
2021-07-25 21:09   ` [Tarantool-patches] [PATCH v2 03/10] test: use CI friendly variables in lua-Harness Igor Munkin via Tarantool-patches
2021-07-27  9:01     ` Sergey Kaplun via Tarantool-patches
2021-07-27 22:23       ` Максим Корякшин via Tarantool-patches
2021-07-20 16:26 ` [Tarantool-patches] [PATCH v2 04/10] test: refactor with _retrieve_progname Maxim Kokryashkin via Tarantool-patches
2021-07-25 21:09   ` Igor Munkin via Tarantool-patches
2021-07-27  9:27     ` Sergey Kaplun via Tarantool-patches
2021-07-27 22:28       ` Максим Корякшин via Tarantool-patches
2021-07-20 16:26 ` [Tarantool-patches] [PATCH v2 05/10] test: refactor with _dofile Maxim Kokryashkin via Tarantool-patches
2021-07-25 21:10   ` Igor Munkin via Tarantool-patches
2021-07-26 12:11     ` Максим Корякшин via Tarantool-patches
2021-07-27  9:34       ` Sergey Kaplun via Tarantool-patches
2021-07-27 22:36         ` Максим Корякшин via Tarantool-patches
2021-07-20 16:26 ` [Tarantool-patches] [PATCH v2 06/10] test: support tarantool in lua-Harness Maxim Kokryashkin via Tarantool-patches
2021-07-25 21:11   ` Igor Munkin via Tarantool-patches
2021-07-26 11:07     ` Максим Корякшин via Tarantool-patches
2021-07-26 19:46       ` Igor Munkin via Tarantool-patches
2021-07-27 10:04   ` Sergey Kaplun via Tarantool-patches
2021-07-28 17:40     ` Максим Корякшин via Tarantool-patches
2021-07-28 17:42     ` Максим Корякшин via Tarantool-patches
2021-07-28 18:34       ` Sergey Kaplun via Tarantool-patches
2021-07-29  9:19         ` Максим Корякшин via Tarantool-patches
2021-07-29  9:22           ` Igor Munkin via Tarantool-patches
2021-07-29 10:12             ` Максим Корякшин via Tarantool-patches
2021-07-29  9:47           ` Sergey Kaplun via Tarantool-patches
2021-07-20 16:26 ` [Tarantool-patches] [PATCH v2 07/10] test: backport lua-Harness directory detection Maxim Kokryashkin via Tarantool-patches
2021-07-25 21:12   ` Igor Munkin via Tarantool-patches
2021-07-26 11:13     ` Максим Корякшин via Tarantool-patches
2021-07-28 18:37       ` Sergey Kaplun via Tarantool-patches
2021-07-20 16:26 ` [Tarantool-patches] [PATCH v2 08/10] test: support tarantool cli in lua-Harness Maxim Kokryashkin via Tarantool-patches
2021-07-25 21:13   ` Igor Munkin via Tarantool-patches
2021-07-26 11:17     ` Максим Корякшин via Tarantool-patches
2021-07-26 19:53       ` Igor Munkin via Tarantool-patches
2021-07-28 18:44       ` Sergey Kaplun via Tarantool-patches
2021-07-28 18:50         ` Sergey Kaplun via Tarantool-patches
2021-07-29  9:23         ` Максим Корякшин via Tarantool-patches
2021-07-20 16:26 ` [Tarantool-patches] [PATCH v2 09/10] test: update lua-Harness to b7b1a9a2 Maxim Kokryashkin via Tarantool-patches
2021-07-25 21:14   ` Igor Munkin via Tarantool-patches
2021-07-26 12:21     ` Максим Корякшин via Tarantool-patches
2021-07-26 20:04       ` Igor Munkin via Tarantool-patches
2021-07-28 18:48       ` Sergey Kaplun via Tarantool-patches
2021-07-29  9:27         ` Максим Корякшин via Tarantool-patches
2021-07-20 16:26 ` [Tarantool-patches] [PATCH v2 10/10] test: disable test/lua-Harness-tests/241-standalone.t on FreeBSD Maxim Kokryashkin via Tarantool-patches
2021-07-25 21:17   ` Igor Munkin via Tarantool-patches
2021-07-26 12:31     ` Максим Корякшин via Tarantool-patches
2021-07-26 12:32       ` Максим Корякшин via Tarantool-patches
2021-07-26 12:36         ` Максим Корякшин via Tarantool-patches
2021-07-26 20:13           ` Igor Munkin via Tarantool-patches
2021-07-27  6:21           ` Sergey Kaplun via Tarantool-patches
2021-07-29  9:41             ` Максим Корякшин via Tarantool-patches
2021-07-29  9:45               ` Sergey Kaplun via Tarantool-patches
2021-07-29  9:57                 ` Максим Корякшин via Tarantool-patches
2021-07-30 17:09                   ` Igor Munkin via Tarantool-patches
2021-07-25 21:03 ` [Tarantool-patches] [PATCH v2 00/10] test: lua-Harness suite patch bump Igor Munkin via Tarantool-patches
2021-07-30 19:19 ` 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=c7336b9dbd4d160ab9290e425c6773bcfb40c556.1626797225.git.m.kokryashkin@tarantool.org \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=imun@tarantool.org \
    --cc=max.kokryashkin@gmail.com \
    --cc=skaplun@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH v2 03/10] test: use CI friendly variables in lua-Harness' \
    /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