From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E9F491382C5 for ; Wed, 20 Jan 2021 21:27:58 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AADE7E0857; Wed, 20 Jan 2021 21:27:55 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 65D97E07AE for ; Wed, 20 Jan 2021 21:27:55 +0000 (UTC) Subject: Re: [gentoo-dev] [PATCH v3] eclass/lua-utils.eclass: Add support for test-runners To: gentoo-dev@lists.gentoo.org References: <20210108001415.3124-1-conikost@gentoo.org> From: Conrad Kostecki Message-ID: Date: Wed, 20 Jan 2021 22:27:48 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 In-Reply-To: <20210108001415.3124-1-conikost@gentoo.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: de-DE X-Archives-Salt: 4f3ff632-5d5e-4a4c-8bd3-e8ad626ccbf5 X-Archives-Hash: 398489680bd01c4f11b433db5e4f4e1c Am 08.01.2021 um 01:14 schrieb Conrad Kostecki: > During migration of dev-lua/* ebuilds to slotted lua, I noticed, that > many ebuilds use 'dev-lua/busted' for running tests. This change adds > support for running a test-runner, at first only 'busted' for now. > Also a non-color and plaintext output will be used for the test-runner 'busted'. > > This is basically a copy of the test-runner section, written by mgorny, > which already exists in 'distutils-r1', but modified and adapted to lua. > > In order to use this feature, you can define 'lua_enable_tests busted' > to setup everything needed for tests and run them. By default, > 'dev-lua/busted' assumes, that tests are in the 'spec' folder. > > If this is not the case, you can add a second argument to specify a > different folder. For example, if the folder is called 'foo', you can > just run 'lua_enable_tests busted foo'. > > More test-runners can be added in future, if needed. > > PATCH v2 has two changes: > - removed EAPI condition, as lua-utils is EAPI=7 only. > - make test_directoy as a local variable and use eval in src_test to > read it. > > PATCH v3 has the right patch, as v2 was wrong. Merged!