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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 37AB915800A for ; Sat, 22 Jul 2023 13:51:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 123EAE079C; Sat, 22 Jul 2023 13:51:38 +0000 (UTC) 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) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E9485E079C for ; Sat, 22 Jul 2023 13:51:37 +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 D1358340B1C for ; Sat, 22 Jul 2023 13:51:36 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 397EFBF1 for ; Sat, 22 Jul 2023 13:51:35 +0000 (UTC) From: "Anna Vyalkova" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Anna Vyalkova" Message-ID: <1690033843.b12e7da73c72b580d2ebdf94d53895b7d9921661.cybertailor@gentoo> Subject: [gentoo-commits] repo/proj/guru:dev commit in: dev-cpp/coeurl/ X-VCS-Repository: repo/proj/guru X-VCS-Files: dev-cpp/coeurl/coeurl-0.3.0.ebuild X-VCS-Directories: dev-cpp/coeurl/ X-VCS-Committer: cybertailor X-VCS-Committer-Name: Anna Vyalkova X-VCS-Revision: b12e7da73c72b580d2ebdf94d53895b7d9921661 X-VCS-Branch: dev Date: Sat, 22 Jul 2023 13:51:35 +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: e13114c4-3b85-40ec-8b8c-d30e1126e328 X-Archives-Hash: 6a560894fa62a67ebe6495a0bb7196dd commit: b12e7da73c72b580d2ebdf94d53895b7d9921661 Author: Anna (cybertailor) Vyalkova sysrq in> AuthorDate: Sat Jul 22 13:49:03 2023 +0000 Commit: Anna Vyalkova sysrq in> CommitDate: Sat Jul 22 13:50:43 2023 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=b12e7da7 dev-cpp/coeurl: enable tests Signed-off-by: Anna (cybertailor) Vyalkova sysrq.in> dev-cpp/coeurl/coeurl-0.3.0.ebuild | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/dev-cpp/coeurl/coeurl-0.3.0.ebuild b/dev-cpp/coeurl/coeurl-0.3.0.ebuild index 832f0857e..37dfa3669 100644 --- a/dev-cpp/coeurl/coeurl-0.3.0.ebuild +++ b/dev-cpp/coeurl/coeurl-0.3.0.ebuild @@ -3,7 +3,8 @@ EAPI=8 -inherit meson +PYTHON_COMPAT=( python3_{10..12} ) +inherit edo meson python-any-r1 DESCRIPTION="A simple async wrapper around CURL for C++" HOMEPAGE="https://nheko.im/nheko-reborn/coeurl" @@ -14,7 +15,8 @@ LICENSE="MIT" SLOT="0/$(ver_cut 1-2)" KEYWORDS="~amd64" IUSE="ssl test" -RESTRICT="test" # Tests turned off because they need a local webserver. +REQUIRED_USE="test? ( ssl )" +RESTRICT="!test? ( test )" RDEPEND=" net-misc/curl[ssl?] @@ -26,6 +28,16 @@ DEPEND=" ${RDEPEND} test? ( dev-cpp/doctest ) " +BDEPEND=" + test? ( + dev-libs/openssl + $(python_gen_any_dep 'dev-python/flask[${PYTHON_USEDEP}]') + ) +" + +python_check_deps() { + python_has_version "dev-python/flask[${PYTHON_USEDEP}]" +} src_prepare() { default @@ -38,3 +50,17 @@ src_configure() { ) meson_src_configure } + +src_test() { + openssl req -x509 -newkey rsa:4096 -nodes \ + -out "${T}"/cert.pem -keyout "${T}"/key.pem \ + -days 365 -subj "/CN=localhost" || die + + edo ${EPYTHON} ./tests/testserver.py & + sleep 3 + + edo ${EPYTHON} ./tests/testserver.py "${T}" & + sleep 3 + + meson_src_test +}