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 27513158086 for ; Tue, 23 Nov 2021 22:07:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6BB0CE08E0; Tue, 23 Nov 2021 22:07:12 +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)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3B416E08E0 for ; Tue, 23 Nov 2021 22:07:12 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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 smtp.gentoo.org (Postfix) with ESMTPS id 4C78B34335C for ; Tue, 23 Nov 2021 22:07:11 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 02A108E for ; Tue, 23 Nov 2021 22:07:10 +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: <1637705221.a3a5e06f8f574a3b11800aab9ea8b282a144848a.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/cppcheck/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-util/cppcheck/cppcheck-2.6.2.ebuild X-VCS-Directories: dev-util/cppcheck/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: a3a5e06f8f574a3b11800aab9ea8b282a144848a X-VCS-Branch: master Date: Tue, 23 Nov 2021 22:07:10 +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: 38fe4260-034f-46b8-b52f-fe91bc5ce7aa X-Archives-Hash: 2b5f680f12b8c7036bd827774648067c commit: a3a5e06f8f574a3b11800aab9ea8b282a144848a Author: Sam James gentoo org> AuthorDate: Tue Nov 23 22:00:54 2021 +0000 Commit: Sam James gentoo org> CommitDate: Tue Nov 23 22:07:01 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a3a5e06f dev-util/cppcheck: partial plumbing for (small) Python tests Done most of the plumbing here but it needs some additional work to actually find the cppcheck binary as it expects it in the source directory. Bug: https://bugs.gentoo.org/826970 Signed-off-by: Sam James gentoo.org> dev-util/cppcheck/cppcheck-2.6.2.ebuild | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/dev-util/cppcheck/cppcheck-2.6.2.ebuild b/dev-util/cppcheck/cppcheck-2.6.2.ebuild index c7aad8ff5e63..a934618d7ad9 100644 --- a/dev-util/cppcheck/cppcheck-2.6.2.ebuild +++ b/dev-util/cppcheck/cppcheck-2.6.2.ebuild @@ -38,6 +38,9 @@ BDEPEND=" dev-libs/libxslt virtual/pkgconfig qt5? ( dev-qt/linguist-tools:5 ) + test? ( + htmlreport? ( dev-python/unittest-or-fail[${PYTHON_USEDEP}] ) + ) " src_prepare() { @@ -68,6 +71,21 @@ src_compile() { fi } +src_test() { + cmake_src_test + + # TODO: Needs some hackery to find the right binary + #if use htmlreport ; then + # distutils-r1_src_test + #fi +} + +python_test() { + pushd htmlreport || die + eunittest + popd || die +} + src_install() { cmake_src_install