summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoonas Niilola <juippis@gentoo.org>2022-08-23 16:40:55 +0300
committerJoonas Niilola <juippis@gentoo.org>2022-08-23 16:40:55 +0300
commit31862cd96272809389aa0a6389bfa9d7dc333309 (patch)
tree0ae79a180fe46afc447e5722fa1a64ce898c2db6 /dev-util/librnp
parentwww-client/firefox: add 102.2.0 (diff)
downloadgentoo-31862cd96272809389aa0a6389bfa9d7dc333309.tar.gz
gentoo-31862cd96272809389aa0a6389bfa9d7dc333309.tar.bz2
gentoo-31862cd96272809389aa0a6389bfa9d7dc333309.zip
dev-util/librnp: enable tests, use "usex" in ebuild
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'dev-util/librnp')
-rw-r--r--dev-util/librnp/librnp-0.16.0.ebuild22
1 files changed, 12 insertions, 10 deletions
diff --git a/dev-util/librnp/librnp-0.16.0.ebuild b/dev-util/librnp/librnp-0.16.0.ebuild
index 3c528fc1c13e..4f3c972de1fe 100644
--- a/dev-util/librnp/librnp-0.16.0.ebuild
+++ b/dev-util/librnp/librnp-0.16.0.ebuild
@@ -12,20 +12,22 @@ SRC_URI="https://github.com/rnpgp/rnp/archive/refs/tags/v${PV}.tar.gz -> ${P}.ta
LICENSE="Apache-2.0 BSD BSD-2"
SLOT="0"
KEYWORDS="~amd64"
-IUSE="man"
+IUSE="man test"
-DEPEND="app-arch/bzip2
+RDEPEND="app-arch/bzip2
dev-libs/botan:2=
dev-libs/json-c:=
sys-libs/zlib"
-RDEPEND="${DEPEND}"
+DEPEND="${RDEPEND}
+ test? ( dev-cpp/gtest )"
BDEPEND="man? ( dev-ruby/asciidoctor )"
+RESTRICT="!test? ( test )"
S="${WORKDIR}/${P/*lib/}"
src_configure() {
local mycmakeargs=(
- -DBUILD_TESTING=off
+ -DBUILD_TESTING=$(usex test on off)
-DCRYPTO_BACKEND=botan
@@ -33,15 +35,15 @@ src_configure() {
-DDOWNLOAD_RUBYRNP=off
-DENABLE_COVERAGE=off
+ -DENABLE_DOC=$(usex man on off)
-DENABLE_FUZZERS=off
-DENABLE_SANITIZERS=off
)
- if use man; then
- mycmakeargs+=( -DENABLE_DOC=on )
- else
- mycmakeargs+=( -DENABLE_DOC=off )
- fi
-
cmake_src_configure
}
+
+src_test() {
+ cd "${BUILD_DIR}" || die
+ ctest -j"${MAKEOPTS}" -R .* --output-on-failure || die
+}