From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id B3F216EC56; Tue, 20 Jul 2021 19:29:04 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org B3F216EC56 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1626798544; bh=D56Ec8BT2C8qFC7ypwsi4uAh1hRGs6NCSJVIW1CuGAo=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=J/Q2BFDVurkTJR931o4ZDTBVVqwVUL08oii9P49lhFo2q6GpnW0C5fCMEqnBtySYB 2KxP5jLXqfAbj77gcJnBnhRzcqlhjFbbsASrWATJmQKLLtffx2a5zjX/yHthhE4hI4 uOCxzTh0nlqkCbi0YB9luU0QJb9NHZ4Q1RORa9C8= Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id B57C86EC5A for ; Tue, 20 Jul 2021 19:27:50 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org B57C86EC5A Received: by mail-lf1-f51.google.com with SMTP id f30so36725770lfj.1 for ; Tue, 20 Jul 2021 09:27:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LvG41bDMzJjlo05v89mGYh+8R+gnsfysYNFarFKSkeQ=; b=awrOy2Fk9S/hgIlDeXoNXohxWJLfUZAmOwqyZ5Lb6Vr51KgK5jd841W+v3PqPW2P/n aQNvpCBqMBIraaYD0eu+hUjmeyMqmZcW1vR6VBDGhyw6RxltXxesCqTE4Jdtv9ax3rAN roJynWnzRRrkSPXoj0z/QA/kC49SZvl2BysLSy+xjQqf3GJPdzAA1hPDYd8kzwKCdwbA GShztMXv0QfV7AJg/MD2aYeM7IvoNs4K4QwE4UPQQZxmDqiUAMXBA1bE9MJ6N79aNzBQ 1rFhxgqfn2p1nVv+oVCzLymmI9aWjYuWVFLNk2MPrgatPyrugg87dAW67WFrI2OeAoI2 awdg== X-Gm-Message-State: AOAM531H0+nb7adbh8ZAtGZgxsWRrtPBHqXjF8rm4BMzw12TK0VtIquT zvLlZPJvmBYUrUfRnEAM1JVWPMeJdzyrBOJX X-Google-Smtp-Source: ABdhPJwYzKoZM+Ju2zg6PduCFdhMTemUOm3bq8a29jy0XjSl7qXncLrJi117F1cIpKgSePMVumM93w== X-Received: by 2002:ac2:4910:: with SMTP id n16mr23544089lfi.608.1626798470111; Tue, 20 Jul 2021 09:27:50 -0700 (PDT) Received: from localhost.localdomain ([2a00:1fa0:44c8:ff00:875c:6e54:99e0:fb4a]) by smtp.gmail.com with ESMTPSA id d8sm1562660lfi.129.2021.07.20.09.27.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jul 2021 09:27:49 -0700 (PDT) X-Google-Original-From: Maxim Kokryashkin To: tarantool-patches@dev.tarantool.org, imun@tarantool.org, skaplun@tarantool.org Date: Tue, 20 Jul 2021 19:26:51 +0300 Message-Id: X-Mailer: git-send-email 2.32.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH v2 03/10] test: use CI friendly variables in lua-Harness X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Maxim Kokryashkin via Tarantool-patches Reply-To: Maxim Kokryashkin Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 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