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 0C3F52ADDED; Mon, 27 Feb 2023 12:12:06 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 0C3F52ADDED DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1677489126; bh=x1vP7sH4oz0cZwHNZG7ZZ/moR/Ii/AcnyejnPTjgrus=; 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=yGk6fUi5sKgKXgUInCc+GDW5JdGMKrKCHiUqfbmSYJnKgJIDxaPQvNXjlLfSTE7K3 dE6wyYOY+CgIIjVk1pUXOLd1sI5QxEXaROY7CSkAO+0Mw/3gV0Ar/6IXCFUPXaKS/O C2LYUa7ttHVssLe2HfnEzusrGmRLGIE+Oz7hG/IA= Received: from smtp31.i.mail.ru (smtp31.i.mail.ru [95.163.41.72]) (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 AF2642ADDE5 for ; Mon, 27 Feb 2023 12:10:05 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org AF2642ADDE5 Received: by smtp31.i.mail.ru with esmtpa (envelope-from ) id 1pWZWG-002jL3-Lw; Mon, 27 Feb 2023 12:10:05 +0300 To: Sergey Kaplun , Maxim Kokryashkin Date: Mon, 27 Feb 2023 09:07:22 +0000 Message-Id: <73121e49f78fb8fee355ce09a80f77ef12046e67.1677236706.git.imun@tarantool.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9806C989EC2150E3328F2CD81DB6B81556375ED936772CB93182A05F5380850406E56738A20CC3156215AB18EC03D55FFE17846A90F41B1C253BFC5B2C2101B55 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7BC08626EA5717D14EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637DA5CEC9EE7F170198638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D84419162775C3BF39824B91AF55CFE9CD117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC2FD16FCC8DB5F8BEA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F4460429728776938767073520437C869540D2AB0F6FD1C55BDD38FC3FD2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EEC24E1E72F37C03A0A68A47777D5C6D9CD8FC6C240DEA7642DBF02ECDB25306B2B78CF848AE20165D0A6AB1C7CE11FEE389DDFE3E282F3DD12D242C3BD2E3F4C6C4224003CC836476E2F48590F00D11D6E2021AF6380DFAD1A18204E546F3947CB11811A4A51E3B096D1867E19FE1407959CC434672EE6371089D37D7C0E48F6C8AA50765F79006371F24DFF1B2961425731C566533BA786AA5CC5B56E945C8DA X-C1DE0DAB: 0D63561A33F958A5AA253F5706ED70F6AB363DFE61A064F483DB883267CACA3A4EAF44D9B582CE87C8A4C02DF684249CC203C45FEA855C8F X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D340A59E724FC7897F7A554BBE64AE35B577CC3912E0C834E5147A0C60C5916B4FA108D7BE8F85C4A451D7E09C32AA3244CBB1440BEFD00830F4EEEC7062ACFCEC1E8FBBEFAE1C4874C927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojY+HhiuGRi+quHLl5F1YTug== X-Mailru-Sender: 2FEBA92C8E508479FE7B9A1DF348D53124005329899888351118B64796B86AEA67519DCE7611EF282326FE6F2A341ACE0FB9F97486540B4CD9E8847AB8CFED4D9ABF8A61C016C2CFB0DAF586E7D11B3E67EA787935ED9F1B X-Mras: Ok Subject: [Tarantool-patches] [PATCH luajit 4/5] test: introduce test:skiprest TAP helper 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: Igor Munkin via Tarantool-patches Reply-To: Igor Munkin Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Sometimes one need to skip the remaining tests in the script. There is no special stub in TAP13 protocol for this, but this could be done via skipping all the remaining planned tests. Within this commit helper is introduced that calls (planned - total) times and exits the test script. As for the previous commit it's worth to mention, that skiprest helper is implemented only for root (i.e. test with no parent) tests and subtests are not supported at the moment. The corresponding assertion with FIXME reason can be found in routine. Signed-off-by: Igor Munkin --- test/tarantool-tests/tap.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/tarantool-tests/tap.lua b/test/tarantool-tests/tap.lua index 92d59ce9..343f97e3 100644 --- a/test/tarantool-tests/tap.lua +++ b/test/tarantool-tests/tap.lua @@ -101,6 +101,13 @@ local function skipall(test, reason) finalize(test) end +local function skiprest(test, reason) + for _ = 1, test.planned - test.total do + test:skip(reason) + end + finalize(test) +end + local function like(test, got, pattern, message, extra) extra = extra or {} extra.got = got @@ -330,6 +337,7 @@ test_mt = { fail = fail, skip = skip, skipall = skipall, + skiprest = skiprest, is = is, isnt = isnt, isnil = isnil, -- 2.30.2