diff options
author | Alexander Miller <alex.miller@gmx.de> | 2024-03-09 23:49:18 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2024-03-16 17:25:02 +0100 |
commit | 8f942acab59678609ede1e07522f50db9bbe04b5 (patch) | |
tree | 2442997ce640be1fc1a0f630f2e09b9a5dbafe73 /dev-util/nihtest | |
parent | app-arch/torrentzip: Enable tests (diff) | |
download | gentoo-8f942acab59678609ede1e07522f50db9bbe04b5.tar.gz gentoo-8f942acab59678609ede1e07522f50db9bbe04b5.tar.bz2 gentoo-8f942acab59678609ede1e07522f50db9bbe04b5.zip |
dev-util/nihtest: Wire up tests
Signed-off-by: Alexander Miller <alex.miller@gmx.de>
Closes: https://github.com/gentoo/gentoo/pull/35644
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-util/nihtest')
-rw-r--r-- | dev-util/nihtest/nihtest-1.5.0.ebuild | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/dev-util/nihtest/nihtest-1.5.0.ebuild b/dev-util/nihtest/nihtest-1.5.0.ebuild index e71045c4aa7e..15d9fa136dbe 100644 --- a/dev-util/nihtest/nihtest-1.5.0.ebuild +++ b/dev-util/nihtest/nihtest-1.5.0.ebuild @@ -7,7 +7,7 @@ DISTUTILS_SINGLE_IMPL=1 DISTUTILS_USE_PEP517=setuptools PYTHON_COMPAT=( python3_{10..12} ) -inherit distutils-r1 pypi +inherit cmake distutils-r1 pypi DESCRIPTION="A testing tool for command line utilities" HOMEPAGE=" @@ -22,13 +22,35 @@ SRC_URI+=" LICENSE="BSD" SLOT="0" KEYWORDS="~amd64 ~x86" +IUSE="test" +RESTRICT="!test? ( test )" RDEPEND=" $(python_gen_cond_dep 'dev-python/python-dateutil[${PYTHON_USEDEP}]') " +BDEPEND="test? ( ${RDEPEND} )" +CMAKE_SKIP_TESTS=( + preload-pass.test # https://github.com/nih-at/nihtest/issues/7 +) DOCS=( NEWS.md README.md TODO.md ) +src_prepare() { + distutils-r1_src_prepare + if use test; then + CMAKE_USE_DIR=${S}/tests + BUILD_DIR=${WORKDIR}/tests_build cmake_src_prepare + fi +} + +python_test() { + local BUILD_DIR=${WORKDIR}/tests_build + local mycmakeargs=( -DNIHTEST=nihtest ) + cmake_src_configure + cmake_src_compile + cmake_src_test +} + src_install() { distutils-r1_src_install newman manpages/nihtest.man nihtest.1 |