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 EB8C16EC5A; Mon, 15 Mar 2021 18:31:25 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org EB8C16EC5A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1615822286; bh=4ya/k1z2GLojgdg18hD++G7Jp52YTEA2dZ7DVM20M+4=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=uUM0/1TJhHKlSGo319a0sDzur1Cna6pCkssW+OR9Xomzuaeu3ADu0ey6p+yIq5nws GxAUalvE9ecksDbbBQyP8usME2Nje6+YzHUH++cL3xQ+ipVnAlnhMEZN/PvfM9Xn62 Dq9qltqhKfVa1AKZK9fT3naSqbDydvlDSFShVqeU= Received: from smtp48.i.mail.ru (smtp48.i.mail.ru [94.100.177.108]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 74F1F6EC5A for ; Mon, 15 Mar 2021 18:30:27 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 74F1F6EC5A Received: by smtp48.i.mail.ru with esmtpa (envelope-from ) id 1lLpAo-0003Ga-Gp; Mon, 15 Mar 2021 18:30:26 +0300 To: Sergey Ostanevich , Igor Munkin Date: Mon, 15 Mar 2021 18:29:28 +0300 Message-Id: <31d2b8f880693c4af3d47d7c6693acfd79459052.1615819534.git.skaplun@tarantool.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD9D3134714A9BDB69B54C6354AEEB3BDF9AAE3283F1E6CEA6100894C459B0CD1B9BA4E1C393A5AA41140093C28919840697A1DC2EC41CB43ED19F33B7625D3E01E X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE745229D52CF30560CEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637E8D1333770DC60CDEA1F7E6F0F101C67CDEEF6D7F21E0D1D174C73DBBBFC7664D1199D9D91952AFAB1EA81A03E14B00F0A3073DD71F17145389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C0A29E2F051442AF778941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B636DA1BED736F9328CC7F00164DA146DA6F5DAA56C3B73B23C77107234E2CFBA567F23339F89546C55F5C1EE8F4F765FCD77DF2741F6D7EBCA7F4EDE966BC389F395957E7521B51C24C7702A67D5C33162DBA43225CD8A89FC0F9454058DFE53CC6EABA9B74D0DA47B5C8C57E37DE458B4C7702A67D5C3316FA3894348FB808DB48C21F01D89DB561574AF45C6390F7469DAA53EE0834AAEE X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C414F749A5E30D975C7FF294EE7CC9FD50CAB9190640EC38BD3387318C2B7C28D79C2B6934AE262D3EE7EAB7254005DCED7532B743992DF240BDC6A1CF3F042BAD6DF99611D93F60EFF532FBFD8162E58C699F904B3F4130E343918A1A30D5E7FCCB5012B2E24CD356 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34F7CC4EA888783AE0E0C4AF7BDC22345E30852AAE56E517EB0841CC8FB61800D87E470D2AD86986EA1D7E09C32AA3244C456D8CEA732363BA4E9962CC1C6416588894E9C85370243E927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojmD8gqPF9k0lwzCe1A8hYcw== X-Mailru-Sender: 3B9A0136629DC91206CBC582EFEF4CB464D91C0CF0A5D7F86D899F7266266161100CBC36EE59ED45F2400F607609286E924004A7DEC283833C7120B22964430C52B393F8C72A41A89437F6177E88F7363CDA0F3B3F5B9367 X-Mras: Ok Subject: [Tarantool-patches] [PATCH v2 luajit 3/5] test: adjust lua-Harness test suite for Tarantool 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: Sergey Kaplun via Tarantool-patches Reply-To: Sergey Kaplun Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 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