summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-02-06 01:08:26 +0000
committerSam James <sam@gentoo.org>2024-02-06 01:08:26 +0000
commitc8ed0471455a1aef07a5798620175f4d54a07e87 (patch)
tree7440ff3931864c4abc87fadcb17e836de9383612 /dev-util/pkgcruft
parentdev-build/ninja: Stabilize 1.11.1-r5 arm, #923850 (diff)
downloadgentoo-c8ed0471455a1aef07a5798620175f4d54a07e87.tar.gz
gentoo-c8ed0471455a1aef07a5798620175f4d54a07e87.tar.bz2
gentoo-c8ed0471455a1aef07a5798620175f4d54a07e87.zip
dev-util/pkgcruft: wire up tests
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-util/pkgcruft')
-rw-r--r--dev-util/pkgcruft/pkgcruft-0.0.1.ebuild12
-rw-r--r--dev-util/pkgcruft/pkgcruft-9999.ebuild12
2 files changed, 16 insertions, 8 deletions
diff --git a/dev-util/pkgcruft/pkgcruft-0.0.1.ebuild b/dev-util/pkgcruft/pkgcruft-0.0.1.ebuild
index c3b4af5141dd..c2c6182cc283 100644
--- a/dev-util/pkgcruft/pkgcruft-0.0.1.ebuild
+++ b/dev-util/pkgcruft/pkgcruft-0.0.1.ebuild
@@ -4,7 +4,7 @@
EAPI=8
CRATES=" "
-inherit cargo toolchain-funcs
+inherit cargo edo toolchain-funcs
DESCRIPTION="QA library and tools based on pkgcraft"
HOMEPAGE="https://pkgcraft.github.io/"
@@ -26,14 +26,14 @@ LICENSE+="
Apache-2.0 BSD-2 BSD CC0-1.0 GPL-3+ ISC MIT MPL-2.0 Unicode-DFS-2016
"
SLOT="0"
-# "error[E0432]: unresolved import `pkgcruft::test`"
-# TODO: speak to radhermit
-RESTRICT="test"
+IUSE="test"
+RESTRICT="!test? ( test )"
# clang needed for bindgen
BDEPEND+="
sys-devel/clang
>=virtual/rust-1.71
+ test? ( dev-util/cargo-nextest )
"
QA_FLAGS_IGNORED="usr/bin/pkgcruft"
@@ -53,3 +53,7 @@ src_compile() {
cargo_src_compile
}
+
+src_test() {
+ edo cargo nextest run $(usev !debug '--release') --color always --all-features --tests
+}
diff --git a/dev-util/pkgcruft/pkgcruft-9999.ebuild b/dev-util/pkgcruft/pkgcruft-9999.ebuild
index c3b4af5141dd..c2c6182cc283 100644
--- a/dev-util/pkgcruft/pkgcruft-9999.ebuild
+++ b/dev-util/pkgcruft/pkgcruft-9999.ebuild
@@ -4,7 +4,7 @@
EAPI=8
CRATES=" "
-inherit cargo toolchain-funcs
+inherit cargo edo toolchain-funcs
DESCRIPTION="QA library and tools based on pkgcraft"
HOMEPAGE="https://pkgcraft.github.io/"
@@ -26,14 +26,14 @@ LICENSE+="
Apache-2.0 BSD-2 BSD CC0-1.0 GPL-3+ ISC MIT MPL-2.0 Unicode-DFS-2016
"
SLOT="0"
-# "error[E0432]: unresolved import `pkgcruft::test`"
-# TODO: speak to radhermit
-RESTRICT="test"
+IUSE="test"
+RESTRICT="!test? ( test )"
# clang needed for bindgen
BDEPEND+="
sys-devel/clang
>=virtual/rust-1.71
+ test? ( dev-util/cargo-nextest )
"
QA_FLAGS_IGNORED="usr/bin/pkgcruft"
@@ -53,3 +53,7 @@ src_compile() {
cargo_src_compile
}
+
+src_test() {
+ edo cargo nextest run $(usev !debug '--release') --color always --all-features --tests
+}