Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/cppcheck/
Date: Tue, 23 Nov 2021 22:07:13
Message-Id: 1637705221.a3a5e06f8f574a3b11800aab9ea8b282a144848a.sam@gentoo
1 commit: a3a5e06f8f574a3b11800aab9ea8b282a144848a
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Tue Nov 23 22:00:54 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Tue Nov 23 22:07:01 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a3a5e06f
7
8 dev-util/cppcheck: partial plumbing for (small) Python tests
9
10 Done most of the plumbing here but it needs some additional
11 work to actually find the cppcheck binary as it expects
12 it in the source directory.
13
14 Bug: https://bugs.gentoo.org/826970
15 Signed-off-by: Sam James <sam <AT> gentoo.org>
16
17 dev-util/cppcheck/cppcheck-2.6.2.ebuild | 18 ++++++++++++++++++
18 1 file changed, 18 insertions(+)
19
20 diff --git a/dev-util/cppcheck/cppcheck-2.6.2.ebuild b/dev-util/cppcheck/cppcheck-2.6.2.ebuild
21 index c7aad8ff5e63..a934618d7ad9 100644
22 --- a/dev-util/cppcheck/cppcheck-2.6.2.ebuild
23 +++ b/dev-util/cppcheck/cppcheck-2.6.2.ebuild
24 @@ -38,6 +38,9 @@ BDEPEND="
25 dev-libs/libxslt
26 virtual/pkgconfig
27 qt5? ( dev-qt/linguist-tools:5 )
28 + test? (
29 + htmlreport? ( dev-python/unittest-or-fail[${PYTHON_USEDEP}] )
30 + )
31 "
32
33 src_prepare() {
34 @@ -68,6 +71,21 @@ src_compile() {
35 fi
36 }
37
38 +src_test() {
39 + cmake_src_test
40 +
41 + # TODO: Needs some hackery to find the right binary
42 + #if use htmlreport ; then
43 + # distutils-r1_src_test
44 + #fi
45 +}
46 +
47 +python_test() {
48 + pushd htmlreport || die
49 + eunittest
50 + popd || die
51 +}
52 +
53 src_install() {
54 cmake_src_install