From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id BE7111580E0 for ; Sun, 26 Jan 2025 08:56:18 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id A9C0A3434A3 for ; Sun, 26 Jan 2025 08:56:18 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 4A4C9110471; Sun, 26 Jan 2025 08:56:13 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 3BAC411046F for ; Sun, 26 Jan 2025 08:56:13 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BB2923433E8 for ; Sun, 26 Jan 2025 08:56:12 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 23A4913CE for ; Sun, 26 Jan 2025 08:56:11 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1737881737.4b6147bda80ae5a8326c85c0fb4ea72c3b318ae3.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: games-simulation/corsix-th/ X-VCS-Repository: repo/gentoo X-VCS-Files: games-simulation/corsix-th/corsix-th-0.68.0.ebuild X-VCS-Directories: games-simulation/corsix-th/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 4b6147bda80ae5a8326c85c0fb4ea72c3b318ae3 X-VCS-Branch: master Date: Sun, 26 Jan 2025 08:56:11 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 2dd72a59-d418-4c79-ba71-11d8fb2bcf2e X-Archives-Hash: cc15fce0554ee045ebbbfbc0b53c1b5f commit: 4b6147bda80ae5a8326c85c0fb4ea72c3b318ae3 Author: Sam James gentoo org> AuthorDate: Sun Jan 26 08:52:34 2025 +0000 Commit: Sam James gentoo org> CommitDate: Sun Jan 26 08:55:37 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4b6147bd games-simulation/corsix-th: wire up tests Signed-off-by: Sam James gentoo.org> games-simulation/corsix-th/corsix-th-0.68.0.ebuild | 23 ++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/games-simulation/corsix-th/corsix-th-0.68.0.ebuild b/games-simulation/corsix-th/corsix-th-0.68.0.ebuild index 32f0eab26d9f..257dadab1230 100644 --- a/games-simulation/corsix-th/corsix-th-0.68.0.ebuild +++ b/games-simulation/corsix-th/corsix-th-0.68.0.ebuild @@ -1,11 +1,11 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 LUA_COMPAT=( lua5-{1..4} ) -inherit cmake lua-single xdg +inherit cmake edo lua-single xdg MY_PN="CorsixTH" MY_PV="${PV/_/-}" @@ -21,8 +21,8 @@ SLOT="0" if [[ ${PV} != *_beta* && ${PV} != *_rc* ]] ; then KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" fi -IUSE="doc +midi +sound tools +truetype +videos" - +IUSE="doc +midi +sound test tools +truetype +videos" +RESTRICT="!test? ( test )" REQUIRED_USE="${LUA_REQUIRED_USE}" RDEPEND="${LUA_DEPS} @@ -52,16 +52,22 @@ BDEPEND=" >=dev-lua/lpeg-0.9[${LUA_USEDEP}] ') ) + test? ( + >=dev-cpp/catch-3:0 + ) " PATCHES=( "${FILESDIR}"/${PN}-0.67-cmake_lua_detection.patch ) +lua_enable_tests busted + src_configure() { local mycmakeargs=( -DLUA_VERSION=$(lua_get_version) -DBUILD_TOOLS=$(usex tools) + -DENABLE_UNIT_TESTS=$(usex test) -DWITH_AUDIO=$(usex sound) -DWITH_FREETYPE2=$(usex truetype) -DWITH_MOVIES=$(usex videos) @@ -76,6 +82,15 @@ src_compile() { use doc && cmake_src_compile doc } +src_test() { + # https://github.com/CorsixTH/CorsixTH/blob/master/.github/workflows/Linux.yml#L88 + # C++ tests + BUILD_DIR="${BUILD_DIR}"/CorsixTH cmake_src_test + + # Lua tests + edo busted --lua="${ELUA}" --output="TAP" --verbose --directory=CorsixTH/Luatest +} + src_install() { cmake_src_install dodoc changelog.txt CONTRIBUTING.md