summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-11-23 22:00:54 +0000
committerSam James <sam@gentoo.org>2021-11-23 22:07:01 +0000
commita3a5e06f8f574a3b11800aab9ea8b282a144848a (patch)
tree93e45eb358c6509ddd981bc42ecf46d5a67283fd
parentdev-python/aiohttp-socks: Restrict python-socks dep in old versions (diff)
downloadgentoo-a3a5e06f8f574a3b11800aab9ea8b282a144848a.tar.gz
gentoo-a3a5e06f8f574a3b11800aab9ea8b282a144848a.tar.bz2
gentoo-a3a5e06f8f574a3b11800aab9ea8b282a144848a.zip
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 <sam@gentoo.org>
-rw-r--r--dev-util/cppcheck/cppcheck-2.6.2.ebuild18
1 files changed, 18 insertions, 0 deletions
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