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 E04AA6F3C1; Fri, 12 Mar 2021 08:29:00 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org E04AA6F3C1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1615526940; bh=FXANI7PBywsdOjcL4gKTR+yCjPK2ev4LbGNlq82C0bg=; 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=yRxnWKKNYk2yfcVhIaNB8d+/8+Xe+yHggKOFwYhcK+62aGu4iECG/XuZlxWP517TL TM5ldZcChrvxUayp7NHzOmkLP8XM5cE5YFNQBOih92tV02BBQ96Xd89nWd9TxLGziM +G91ZkgpqrCF/S3IoYonBVIdRwb0qZ54BGmqiXgs= Received: from smtp56.i.mail.ru (smtp56.i.mail.ru [217.69.128.36]) (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 1A3AB6F3C4 for ; Fri, 12 Mar 2021 08:28:33 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 1A3AB6F3C4 Received: by smtp56.i.mail.ru with esmtpa (envelope-from ) id 1lKaLf-0000YU-U7; Fri, 12 Mar 2021 08:28:32 +0300 To: Sergey Ostanevich , Igor Munkin Date: Fri, 12 Mar 2021 08:27:30 +0300 Message-Id: X-Mailer: git-send-email 2.28.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-7564579A: 78E4E2B564C1792B X-77F55803: 4F1203BC0FB41BD9EC9B6B2B0ADCE374C6464EFB285CB0A3E8B79B2FEE7BF913182A05F538085040E48501D284133C8C8396CA86225A03F531F74294118B3593F92DB64CA88E0FDC X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7D77100FFB2844417EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637EA9DEEAA3ECF8E948638F802B75D45FF914D58D5BE9E6BC131B5C99E7648C95C11F5982A89E0728CC9E14D332E9792CBDBE8B7824A6B5E76A471835C12D1D9774AD6D5ED66289B5259CC434672EE6371117882F4460429724CE54428C33FAD30A8DF7F3B2552694AC26CFBAC0749D213D2E47CDBA5A9658359CC434672EE6371117882F4460429728AD0CFFFB425014E868A13BD56FB6657A7F4EDE966BC389F9E8FC8737B5C22495B4C35AC65A386B3089D37D7C0E48F6CCF19DD082D7633A0E7DDDDC251EA7DABAAAE862A0553A39223F8577A6DFFEA7C054662F8F2CA352F43847C11F186F3C5E7DDDDC251EA7DABCC89B49CDF41148FA8EF81845B15A4842623479134186CDE6BA297DBC24807EABDAD6C7F3747799A X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C414F749A5E30D975C11F5982A89E0728CC9E14D332E9792CBDBE8B7824A6B5E769C2B6934AE262D3EE7EAB7254005DCED7532B743992DF240BDC6A1CF3F042BAD6DF99611D93F60EFF532FBFD8162E58C699F904B3F4130E343918A1A30D5E7FCCB5012B2E24CD356 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34BD150993ED26DDF4524F3D2629EC3F16D520DDBE716CF73184880CB84B65879D57A18804280938181D7E09C32AA3244CC5A1F86B6C3ABC2F4783D7E993BB36EDF94338140B71B8EE927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojQNwI24iyQ+qptozM0wxYgg== X-Mailru-Sender: 3B9A0136629DC91206CBC582EFEF4CB458E6B812D952872BC0B803CAF451073A9D1542602A18FEA3F2400F607609286E924004A7DEC283833C7120B22964430C52B393F8C72A41A89437F6177E88F7363CDA0F3B3F5B9367 X-Mras: Ok Subject: [Tarantool-patches] [PATCH luajit 2/6] 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. Tarantool has its own loaded tap built in so need to change name to another one. 203-lexico.t and 301-basic.t is adjusted to valid working with out-of-source build in Tarantool CI. Also creates additional list of files provided to prove via stdin. This is required to avoid tests hungs via Tarantool's binary. Partially this problem is descripted in tarantool/tarantool#5040. Part of tarantool/tarantool#5844 Part of tarantool/tarantool#4473 --- Author: Mergen Imeev .gitignore | 1 + test/lua-Harness-tests/090-tap.t | 2 +- test/lua-Harness-tests/091-profile.t | 2 +- test/lua-Harness-tests/101-boolean.t | 2 +- test/lua-Harness-tests/102-function.t | 2 +- test/lua-Harness-tests/103-nil.t | 2 +- test/lua-Harness-tests/104-number.t | 2 +- test/lua-Harness-tests/105-string.t | 2 +- test/lua-Harness-tests/106-table.t | 2 +- test/lua-Harness-tests/107-thread.t | 2 +- test/lua-Harness-tests/108-userdata.t | 2 +- test/lua-Harness-tests/200-examples.t | 2 +- test/lua-Harness-tests/201-assign.t | 2 +- test/lua-Harness-tests/202-expr.t | 2 +- test/lua-Harness-tests/203-lexico.t | 14 +++++++++----- test/lua-Harness-tests/204-grammar.t | 2 +- test/lua-Harness-tests/211-scope.t | 2 +- test/lua-Harness-tests/212-function.t | 2 +- test/lua-Harness-tests/213-closure.t | 2 +- test/lua-Harness-tests/214-coroutine.t | 2 +- test/lua-Harness-tests/221-table.t | 2 +- test/lua-Harness-tests/222-constructor.t | 2 +- test/lua-Harness-tests/223-iterator.t | 2 +- test/lua-Harness-tests/231-metatable.t | 2 +- test/lua-Harness-tests/232-object.t | 2 +- test/lua-Harness-tests/241-standalone.t | 10 +++++----- test/lua-Harness-tests/242-luac.t | 2 +- test/lua-Harness-tests/301-basic.t | 7 +++++-- test/lua-Harness-tests/303-package.t | 6 +++--- test/lua-Harness-tests/304-string.t | 2 +- test/lua-Harness-tests/305-utf8.t | 2 +- test/lua-Harness-tests/306-table.t | 2 +- test/lua-Harness-tests/307-math.t | 2 +- test/lua-Harness-tests/308-io.t | 2 +- test/lua-Harness-tests/309-os.t | 2 +- test/lua-Harness-tests/310-debug.t | 2 +- test/lua-Harness-tests/311-bit32.t | 2 +- test/lua-Harness-tests/314-regex.t | 2 +- test/lua-Harness-tests/320-stdin.t | 2 +- test/lua-Harness-tests/401-bitop.t | 2 +- test/lua-Harness-tests/402-ffi.t | 2 +- test/lua-Harness-tests/403-jit.t | 2 +- test/lua-Harness-tests/404-ext.t | 2 +- test/lua-Harness-tests/411-luajit.t | 2 +- test/lua-Harness-tests/CMakeLists.txt | 17 +++++++++++++++-- .../{tap.lua => tap_harness.lua} | 0 46 files changed, 77 insertions(+), 56 deletions(-) rename test/lua-Harness-tests/{tap.lua => tap_harness.lua} (100%) diff --git a/.gitignore b/.gitignore index 2103a30..1fb81bc 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ compile_commands.json install_manifest.txt luajit-parse-memprof luajit.pc +tests_list diff --git a/test/lua-Harness-tests/090-tap.t b/test/lua-Harness-tests/090-tap.t index 92f04d8..99932f2 100755 --- a/test/lua-Harness-tests/090-tap.t +++ b/test/lua-Harness-tests/090-tap.t @@ -22,7 +22,7 @@ ]] -require'tap' +require'tap_harness' plan(3) ok( true, 'ok' ) diff --git a/test/lua-Harness-tests/091-profile.t b/test/lua-Harness-tests/091-profile.t index db47438..ebc142d 100755 --- a/test/lua-Harness-tests/091-profile.t +++ b/test/lua-Harness-tests/091-profile.t @@ -22,7 +22,7 @@ ]] -require'tap' +require'tap_harness' plan'no_plan' diff --git a/test/lua-Harness-tests/101-boolean.t b/test/lua-Harness-tests/101-boolean.t index 0033eff..653509f 100755 --- a/test/lua-Harness-tests/101-boolean.t +++ b/test/lua-Harness-tests/101-boolean.t @@ -22,7 +22,7 @@ ]] -require'tap' +require'tap_harness' local has_op53 = _VERSION >= 'Lua 5.3' plan'no_plan' diff --git a/test/lua-Harness-tests/102-function.t b/test/lua-Harness-tests/102-function.t index 48ed814..cb7e9d0 100755 --- a/test/lua-Harness-tests/102-function.t +++ b/test/lua-Harness-tests/102-function.t @@ -22,7 +22,7 @@ --]] -require'tap' +require'tap_harness' local has_op53 = _VERSION >= 'Lua 5.3' plan'no_plan' diff --git a/test/lua-Harness-tests/103-nil.t b/test/lua-Harness-tests/103-nil.t index 561b101..a74c491 100755 --- a/test/lua-Harness-tests/103-nil.t +++ b/test/lua-Harness-tests/103-nil.t @@ -22,7 +22,7 @@ --]] -require'tap' +require'tap_harness' local has_op53 = _VERSION >= 'Lua 5.3' plan'no_plan' diff --git a/test/lua-Harness-tests/104-number.t b/test/lua-Harness-tests/104-number.t index 0d4d3fd..634d22a 100755 --- a/test/lua-Harness-tests/104-number.t +++ b/test/lua-Harness-tests/104-number.t @@ -22,7 +22,7 @@ --]] -require'tap' +require'tap_harness' local profile = require'profile' local has_op53 = _VERSION >= 'Lua 5.3' diff --git a/test/lua-Harness-tests/105-string.t b/test/lua-Harness-tests/105-string.t index cd8c88b..f2ea067 100755 --- a/test/lua-Harness-tests/105-string.t +++ b/test/lua-Harness-tests/105-string.t @@ -22,7 +22,7 @@ --]] -require'tap' +require'tap_harness' local profile = require'profile' local has_op53 = _VERSION >= 'Lua 5.3' diff --git a/test/lua-Harness-tests/106-table.t b/test/lua-Harness-tests/106-table.t index 0c0ba49..4a66f69 100755 --- a/test/lua-Harness-tests/106-table.t +++ b/test/lua-Harness-tests/106-table.t @@ -22,7 +22,7 @@ --]] -require'tap' +require'tap_harness' local has_op53 = _VERSION >= 'Lua 5.3' plan'no_plan' diff --git a/test/lua-Harness-tests/107-thread.t b/test/lua-Harness-tests/107-thread.t index 3d4af18..e67ef36 100755 --- a/test/lua-Harness-tests/107-thread.t +++ b/test/lua-Harness-tests/107-thread.t @@ -22,7 +22,7 @@ --]] -require'tap' +require'tap_harness' local has_op53 = _VERSION >= 'Lua 5.3' plan'no_plan' diff --git a/test/lua-Harness-tests/108-userdata.t b/test/lua-Harness-tests/108-userdata.t index b1e3641..687b1b8 100755 --- a/test/lua-Harness-tests/108-userdata.t +++ b/test/lua-Harness-tests/108-userdata.t @@ -22,7 +22,7 @@ --]] -require'tap' +require'tap_harness' local has_op53 = _VERSION >= 'Lua 5.3' plan'no_plan' diff --git a/test/lua-Harness-tests/200-examples.t b/test/lua-Harness-tests/200-examples.t index 362aae3..cb06a80 100755 --- a/test/lua-Harness-tests/200-examples.t +++ b/test/lua-Harness-tests/200-examples.t @@ -24,7 +24,7 @@ First tests in order to check infrastructure. --]] -require'tap' +require'tap_harness' plan(5) diff --git a/test/lua-Harness-tests/201-assign.t b/test/lua-Harness-tests/201-assign.t index 7d023d8..f7ed472 100755 --- a/test/lua-Harness-tests/201-assign.t +++ b/test/lua-Harness-tests/201-assign.t @@ -28,7 +28,7 @@ L --]] -require'tap' +require'tap_harness' local has_env = _VERSION >= 'Lua 5.2' plan'no_plan' diff --git a/test/lua-Harness-tests/202-expr.t b/test/lua-Harness-tests/202-expr.t index 2576750..f03d5ea 100755 --- a/test/lua-Harness-tests/202-expr.t +++ b/test/lua-Harness-tests/202-expr.t @@ -28,7 +28,7 @@ L --]] -require'tap' +require'tap_harness' local profile = require'profile' local nocvtn2s = profile.nocvtn2s local nocvts2n = profile.nocvts2n diff --git a/test/lua-Harness-tests/203-lexico.t b/test/lua-Harness-tests/203-lexico.t index c1abebf..0a73f8c 100755 --- a/test/lua-Harness-tests/203-lexico.t +++ b/test/lua-Harness-tests/203-lexico.t @@ -31,7 +31,7 @@ L --]] -require'tap' +require'tap_harness' local loadstring = loadstring or load local luajit21 = jit and (jit.version_num >= 20100 or jit.version:match'^RaptorJIT') @@ -117,20 +117,24 @@ do like(msg, "^[^:]+:%d+: unfinished long comment .-near") end +-- Adapt tests for testing with Tarantool's out of source build +-- on read only file system. CUR_SOURCE_DIR is set via CMake. +local path_to_sources = os.getenv('CUR_SOURCE_DIR') .. '/' + if _VERSION >= 'Lua 5.2' or jit then - dofile'lexico52/lexico.t' + dofile(path_to_sources .. 'lexico52/lexico.t') end if _VERSION >= 'Lua 5.3' or luajit21 then - dofile'lexico53/lexico.t' + dofile(path_to_sources .. 'lexico53/lexico.t') end if _VERSION >= 'Lua 5.4' then - dofile'lexico54/lexico.t' + dofile(path_to_sources .. 'lexico54/lexico.t') end if jit and pcall(require, 'ffi') then - dofile'lexicojit/lexico.t' + dofile(path_to_sources .. 'lexicojit/lexico.t') end done_testing() diff --git a/test/lua-Harness-tests/204-grammar.t b/test/lua-Harness-tests/204-grammar.t index d9ae3a6..03580f4 100755 --- a/test/lua-Harness-tests/204-grammar.t +++ b/test/lua-Harness-tests/204-grammar.t @@ -28,7 +28,7 @@ L --]] -require'tap' +require'tap_harness' local profile = require'profile' local has_goto = _VERSION >= 'Lua 5.2' or jit local has_attr = _VERSION >= 'Lua 5.4' diff --git a/test/lua-Harness-tests/211-scope.t b/test/lua-Harness-tests/211-scope.t index 64eed52..8e26a6f 100755 --- a/test/lua-Harness-tests/211-scope.t +++ b/test/lua-Harness-tests/211-scope.t @@ -30,7 +30,7 @@ See section "Local Variables and Blocks" in "Programming in Lua". --]] -require'tap' +require'tap_harness' plan(10) diff --git a/test/lua-Harness-tests/212-function.t b/test/lua-Harness-tests/212-function.t index 2851053..405035e 100755 --- a/test/lua-Harness-tests/212-function.t +++ b/test/lua-Harness-tests/212-function.t @@ -30,7 +30,7 @@ See section "Functions" in "Programming in Lua". --]] -require'tap' +require'tap_harness' local loadstring = loadstring or load plan(68) diff --git a/test/lua-Harness-tests/213-closure.t b/test/lua-Harness-tests/213-closure.t index fc3bd29..16a8a21 100755 --- a/test/lua-Harness-tests/213-closure.t +++ b/test/lua-Harness-tests/213-closure.t @@ -24,7 +24,7 @@ See section "Closures" in "Programming in Lua". --]] -require'tap' +require'tap_harness' plan(15) diff --git a/test/lua-Harness-tests/214-coroutine.t b/test/lua-Harness-tests/214-coroutine.t index 92929e1..1ca1cb5 100755 --- a/test/lua-Harness-tests/214-coroutine.t +++ b/test/lua-Harness-tests/214-coroutine.t @@ -30,7 +30,7 @@ See section "Coroutines" in "Programming in Lua". --]] -require'tap' +require'tap_harness' local profile = require'profile' local luajit21 = jit and (jit.version_num >= 20100 or jit.version:match'^RaptorJIT') local has_coroutine52 = _VERSION >= 'Lua 5.2' or jit diff --git a/test/lua-Harness-tests/221-table.t b/test/lua-Harness-tests/221-table.t index c064a33..07ac952 100755 --- a/test/lua-Harness-tests/221-table.t +++ b/test/lua-Harness-tests/221-table.t @@ -24,7 +24,7 @@ See section "Tables" in "Programming in Lua". --]] -require'tap' +require'tap_harness' plan(25) diff --git a/test/lua-Harness-tests/222-constructor.t b/test/lua-Harness-tests/222-constructor.t index a01be2e..28037bf 100755 --- a/test/lua-Harness-tests/222-constructor.t +++ b/test/lua-Harness-tests/222-constructor.t @@ -30,7 +30,7 @@ See section "Table Constructors" in "Programming in Lua". --]] -require'tap' +require'tap_harness' plan(16) diff --git a/test/lua-Harness-tests/223-iterator.t b/test/lua-Harness-tests/223-iterator.t index 777ad73..073f3cd 100755 --- a/test/lua-Harness-tests/223-iterator.t +++ b/test/lua-Harness-tests/223-iterator.t @@ -25,7 +25,7 @@ section "Coroutines as Iterators" in "Programming in Lua". --]] -require'tap' +require'tap_harness' plan(8) diff --git a/test/lua-Harness-tests/231-metatable.t b/test/lua-Harness-tests/231-metatable.t index a2c6499..b94f608 100755 --- a/test/lua-Harness-tests/231-metatable.t +++ b/test/lua-Harness-tests/231-metatable.t @@ -30,7 +30,7 @@ See section "Metatables and Metamethods" in "Programming in Lua". --]] -require'tap' +require'tap_harness' local profile = require'profile' local has_metamethod52 = _VERSION >= 'Lua 5.2' or profile.luajit_compat52 local has_metamethod_ipairs = _VERSION == 'Lua 5.2' or profile.compat52 or profile.luajit_compat52 diff --git a/test/lua-Harness-tests/232-object.t b/test/lua-Harness-tests/232-object.t index 0d87572..0d22232 100755 --- a/test/lua-Harness-tests/232-object.t +++ b/test/lua-Harness-tests/232-object.t @@ -24,7 +24,7 @@ See section "Object-Oriented Programming" in "Programming in Lua". --]] -require'tap' +require'tap_harness' plan(18) diff --git a/test/lua-Harness-tests/241-standalone.t b/test/lua-Harness-tests/241-standalone.t index c5237ee..33d5159 100755 --- a/test/lua-Harness-tests/241-standalone.t +++ b/test/lua-Harness-tests/241-standalone.t @@ -28,7 +28,7 @@ L --]] -require'tap' +require'tap_harness' local has_bytecode = not ujit and not ravi local has_error52 = _VERSION >= 'Lua 5.2' local has_error53 = _VERSION >= 'Lua 5.3' @@ -228,14 +228,14 @@ end like(f:read'*l', "^usage: ", "no file") f:close() -cmd = lua .. [[ -ltap -e "print(type(ok))"]] +cmd = lua .. [[ -ltap_harness -e "print(type(ok))"]] f = io.popen(cmd) -is(f:read'*l', 'function', "-ltap") +is(f:read'*l', 'function', "-ltap_harness") f:close() -cmd = lua .. [[ -l tap -e "print(type(ok))"]] +cmd = lua .. [[ -l tap_harness -e "print(type(ok))"]] f = io.popen(cmd) -is(f:read'*l', 'function', "-l tap") +is(f:read'*l', 'function', "-l tap_harness") f:close() cmd = lua .. [[ -l lpeg -e "print(1)" 2>&1]] diff --git a/test/lua-Harness-tests/242-luac.t b/test/lua-Harness-tests/242-luac.t index a95a334..9a3a3c3 100755 --- a/test/lua-Harness-tests/242-luac.t +++ b/test/lua-Harness-tests/242-luac.t @@ -28,7 +28,7 @@ L --]] -require'tap' +require'tap_harness' if jit then skip_all("LuaJIT") diff --git a/test/lua-Harness-tests/301-basic.t b/test/lua-Harness-tests/301-basic.t index f4f9235..13472cd 100755 --- a/test/lua-Harness-tests/301-basic.t +++ b/test/lua-Harness-tests/301-basic.t @@ -30,7 +30,7 @@ L --]] -require'tap' +require'tap_harness' local profile = require'profile' local has_error53 = _VERSION >= 'Lua 5.3' local has_gcinfo = _VERSION == 'Lua 5.1' @@ -843,7 +843,10 @@ do -- xpcall end if jit and pcall(require, 'ffi') then - dofile'lexicojit/basic.t' + -- Adapt test for testing with Tarantool's out of source build + -- on read only file system. CUR_SOURCE_DIR is set via CMake. + local path_to_sources = os.getenv('CUR_SOURCE_DIR') + dofile(path_to_sources .. '/lexicojit/basic.t') end done_testing() diff --git a/test/lua-Harness-tests/303-package.t b/test/lua-Harness-tests/303-package.t index 7e5216d..996ce22 100755 --- a/test/lua-Harness-tests/303-package.t +++ b/test/lua-Harness-tests/303-package.t @@ -30,7 +30,7 @@ L --]] -require'tap' +require'tap_harness' local profile = require'profile' local luajit21 = jit and (jit.version_num >= 20100 or jit.version:match'^RaptorJIT') local has_loaders = _VERSION == 'Lua 5.1' @@ -130,9 +130,9 @@ end -- searchpath if has_searcherpath then - local p = package.searchpath('tap', package.path) + local p = package.searchpath('tap_harness', package.path) type_ok(p, 'string', "searchpath") - p = package.searchpath('tap', 'bad path') + p = package.searchpath('tap_harness', 'bad path') is(p, nil) else is(package.searchpath, nil, "no package.searchpath") diff --git a/test/lua-Harness-tests/304-string.t b/test/lua-Harness-tests/304-string.t index 991600a..293fd8e 100755 --- a/test/lua-Harness-tests/304-string.t +++ b/test/lua-Harness-tests/304-string.t @@ -30,7 +30,7 @@ L ]] -require'tap' +require'tap_harness' local profile = require'profile' local luajit21 = jit and (jit.version_num >= 20100 or jit.version:match'^RaptorJIT') local has_dump53 = _VERSION >= 'Lua 5.3' or jit diff --git a/test/lua-Harness-tests/305-utf8.t b/test/lua-Harness-tests/305-utf8.t index 4304b6c..59a2e6b 100755 --- a/test/lua-Harness-tests/305-utf8.t +++ b/test/lua-Harness-tests/305-utf8.t @@ -30,7 +30,7 @@ L --]] -require 'tap' +require'tap_harness' local profile = require'profile' local has_utf8 = _VERSION >= 'Lua 5.3' or (jit and jit.version:match'moonjit') or profile.utf8 diff --git a/test/lua-Harness-tests/306-table.t b/test/lua-Harness-tests/306-table.t index 9836655..6e76492 100755 --- a/test/lua-Harness-tests/306-table.t +++ b/test/lua-Harness-tests/306-table.t @@ -30,7 +30,7 @@ L --]] -require'tap' +require'tap_harness' local profile = require'profile' local luajit21 = jit and (jit.version_num >= 20100 or jit.version:match'^RaptorJIT') local has_foreach = _VERSION == 'Lua 5.1' diff --git a/test/lua-Harness-tests/307-math.t b/test/lua-Harness-tests/307-math.t index 8b51ed1..762567f 100755 --- a/test/lua-Harness-tests/307-math.t +++ b/test/lua-Harness-tests/307-math.t @@ -30,7 +30,7 @@ L --]] -require'tap' +require'tap_harness' local profile = require'profile' local has_integer = _VERSION >= 'Lua 5.3' or (jit and jit.version:match'moonjit') or profile.integer local has_mathx = _VERSION < 'Lua 5.3' or profile.compat52 or profile.compat53 or profile.has_mathx diff --git a/test/lua-Harness-tests/308-io.t b/test/lua-Harness-tests/308-io.t index 35d39c0..1945ce3 100755 --- a/test/lua-Harness-tests/308-io.t +++ b/test/lua-Harness-tests/308-io.t @@ -30,7 +30,7 @@ L --]] -require'tap' +require'tap_harness' local profile = require'profile' local luajit21 = jit and (jit.version_num >= 20100 or jit.version:match'^RaptorJIT') local has_write51 = _VERSION == 'Lua 5.1' and (not profile.luajit_compat52 or ujit) diff --git a/test/lua-Harness-tests/309-os.t b/test/lua-Harness-tests/309-os.t index a787b14..f94db00 100755 --- a/test/lua-Harness-tests/309-os.t +++ b/test/lua-Harness-tests/309-os.t @@ -30,7 +30,7 @@ L --]] -require'tap' +require'tap_harness' local profile = require'profile' local luajit20 = jit and (jit.version_num < 20100 and not jit.version:match'^RaptorJIT') local has_execute51 = _VERSION == 'Lua 5.1' and (not profile.luajit_compat52 or ujit) diff --git a/test/lua-Harness-tests/310-debug.t b/test/lua-Harness-tests/310-debug.t index f78af03..63194ac 100755 --- a/test/lua-Harness-tests/310-debug.t +++ b/test/lua-Harness-tests/310-debug.t @@ -30,7 +30,7 @@ L ]] -require 'tap' +require'tap_harness' local profile = require'profile' local has_getfenv = _VERSION == 'Lua 5.1' local has_gethook54 = _VERSION >= 'Lua 5.4' diff --git a/test/lua-Harness-tests/311-bit32.t b/test/lua-Harness-tests/311-bit32.t index 7023906..a314f47 100755 --- a/test/lua-Harness-tests/311-bit32.t +++ b/test/lua-Harness-tests/311-bit32.t @@ -29,7 +29,7 @@ L --]] -require 'tap' +require'tap_harness' local profile = require'profile' local has_bit32 = _VERSION == 'Lua 5.2' or profile.compat52 or profile.has_bit32 diff --git a/test/lua-Harness-tests/314-regex.t b/test/lua-Harness-tests/314-regex.t index ad4554c..ac7ad80 100755 --- a/test/lua-Harness-tests/314-regex.t +++ b/test/lua-Harness-tests/314-regex.t @@ -49,7 +49,7 @@ Description of the test. --]] -require'tap' +require'tap_harness' local loadstring = loadstring or load plan(162) diff --git a/test/lua-Harness-tests/320-stdin.t b/test/lua-Harness-tests/320-stdin.t index 4828285..a0eabcb 100755 --- a/test/lua-Harness-tests/320-stdin.t +++ b/test/lua-Harness-tests/320-stdin.t @@ -24,7 +24,7 @@ Tests Lua Basic & IO Libraries with stdin --]] -require'tap' +require'tap_harness' local lua = get_lua_binary_name() diff --git a/test/lua-Harness-tests/401-bitop.t b/test/lua-Harness-tests/401-bitop.t index f95aebf..d1225bd 100755 --- a/test/lua-Harness-tests/401-bitop.t +++ b/test/lua-Harness-tests/401-bitop.t @@ -24,7 +24,7 @@ See L. --]] -require 'tap' +require'tap_harness' if not jit then skip_all("only with LuaJIT") diff --git a/test/lua-Harness-tests/402-ffi.t b/test/lua-Harness-tests/402-ffi.t index a2e32a5..2423b2e 100755 --- a/test/lua-Harness-tests/402-ffi.t +++ b/test/lua-Harness-tests/402-ffi.t @@ -24,7 +24,7 @@ See L. --]] -require 'tap' +require'tap_harness' if not jit then skip_all("only with LuaJIT") diff --git a/test/lua-Harness-tests/403-jit.t b/test/lua-Harness-tests/403-jit.t index 0073c90..6c0870a 100755 --- a/test/lua-Harness-tests/403-jit.t +++ b/test/lua-Harness-tests/403-jit.t @@ -24,7 +24,7 @@ See L. --]] -require 'tap' +require'tap_harness' local profile = require'profile' if not jit then diff --git a/test/lua-Harness-tests/404-ext.t b/test/lua-Harness-tests/404-ext.t index 22a52c7..906ed51 100755 --- a/test/lua-Harness-tests/404-ext.t +++ b/test/lua-Harness-tests/404-ext.t @@ -24,7 +24,7 @@ See L. --]] -require 'tap' +require'tap_harness' local profile = require'profile' local luajit21 = jit and (jit.version_num >= 20100 or jit.version:match'^RaptorJIT') diff --git a/test/lua-Harness-tests/411-luajit.t b/test/lua-Harness-tests/411-luajit.t index feb752e..b8cb547 100755 --- a/test/lua-Harness-tests/411-luajit.t +++ b/test/lua-Harness-tests/411-luajit.t @@ -24,7 +24,7 @@ See L --]] -require'tap' +require'tap_harness' local profile = require'profile' if not jit or ujit then diff --git a/test/lua-Harness-tests/CMakeLists.txt b/test/lua-Harness-tests/CMakeLists.txt index 9b35e5a..e28cadd 100644 --- a/test/lua-Harness-tests/CMakeLists.txt +++ b/test/lua-Harness-tests/CMakeLists.txt @@ -26,7 +26,17 @@ string(CONCAT LUA_CPATH "${LUAJIT_SOURCE_DIR}/?${CMAKE_SHARED_LIBRARY_SUFFIX}\;" ) -add_custom_target(lua-Harness-tests DEPENDS ${LUAJIT_TEST_BINARY}) +# FIXME: Until https://github.com/tarantool/tarantool/issues/5040 +# is resolved, Tarantool enters interactive mode if prove input +# is not stdin. As a result test hungs and not run at all. +# This part should be dropped, and argument to prove is passed +# as directory. +file(GLOB TESTS_LIST ${CMAKE_CURRENT_SOURCE_DIR}/*.t) +string(REPLACE ";" "\n" TESTS_LIST "${TESTS_LIST}") +set(LIST_FILE ${CMAKE_CURRENT_BINARY_DIR}/tests_list) +file(WRITE ${LIST_FILE} ${TESTS_LIST}) + +add_custom_target(lua-Harness-tests DEPENDS ${LUAJIT_TEST_BINARY} ${LIST_FILE}) add_custom_command(TARGET lua-Harness-tests COMMENT "Running lua-Harness tests" @@ -40,7 +50,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. - ${PROVE} ${CMAKE_CURRENT_SOURCE_DIR} + # XXX: Adapt to run test witht Tarantool on read-only + # file systems with dofile(CUR_SOURCE_DIR..filename). + CUR_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} + ${PROVE} - < ${LIST_FILE} --exec '${LUAJIT_TEST_COMMAND} -l profile_luajit21' ${LUA_TEST_FLAGS} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} diff --git a/test/lua-Harness-tests/tap.lua b/test/lua-Harness-tests/tap_harness.lua similarity index 100% rename from test/lua-Harness-tests/tap.lua rename to test/lua-Harness-tests/tap_harness.lua -- 2.28.0