commit: a3a5e06f8f574a3b11800aab9ea8b282a144848a Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Tue Nov 23 22:00:54 2021 +0000 Commit: Sam James <sam <AT> gentoo <DOT> 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 <sam <AT> 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