summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-11-22 09:44:08 +0000
committerSam James <sam@gentoo.org>2021-11-22 09:44:08 +0000
commit51c86b17c89d06bacda268a75f9a8dfa88f36e7d (patch)
tree86368c8c522bc40dfdadfee7c2328a3d2438155f /sys-libs
parentsys-libs/libblockdev: python 3.10 support (diff)
downloadgentoo-51c86b17c89d06bacda268a75f9a8dfa88f36e7d.tar.gz
gentoo-51c86b17c89d06bacda268a75f9a8dfa88f36e7d.tar.bz2
gentoo-51c86b17c89d06bacda268a75f9a8dfa88f36e7d.zip
sys-libs/libblockdev: fix tests (to extent possible; they need root still)
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/libblockdev/libblockdev-2.26.ebuild11
-rw-r--r--sys-libs/libblockdev/libblockdev-9999.ebuild11
2 files changed, 20 insertions, 2 deletions
diff --git a/sys-libs/libblockdev/libblockdev-2.26.ebuild b/sys-libs/libblockdev/libblockdev-2.26.ebuild
index 9dbccbc4377d..0682b4b778eb 100644
--- a/sys-libs/libblockdev/libblockdev-2.26.ebuild
+++ b/sys-libs/libblockdev/libblockdev-2.26.ebuild
@@ -25,7 +25,9 @@ fi
LICENSE="LGPL-2+"
SLOT="0"
IUSE="bcache +cryptsetup device-mapper dmraid escrow gtk-doc introspection lvm kbd test +tools vdo"
-RESTRICT="!test? ( test )"
+# Tests require root. In a future release, we may be able to run a smaller
+# subset with new run_tests.py arguments.
+RESTRICT="!test? ( test ) test"
RDEPEND="
>=dev-libs/glib-2.42.2
@@ -107,6 +109,13 @@ src_configure() {
econf "${myeconfargs[@]}"
}
+src_test() {
+ # See http://storaged.org/libblockdev/ch03.html
+ # The 'check' target just does Pylint.
+ # ... but it needs root.
+ emake test
+}
+
src_install() {
default
find "${ED}" -type f -name "*.la" -delete || die
diff --git a/sys-libs/libblockdev/libblockdev-9999.ebuild b/sys-libs/libblockdev/libblockdev-9999.ebuild
index 9dbccbc4377d..0682b4b778eb 100644
--- a/sys-libs/libblockdev/libblockdev-9999.ebuild
+++ b/sys-libs/libblockdev/libblockdev-9999.ebuild
@@ -25,7 +25,9 @@ fi
LICENSE="LGPL-2+"
SLOT="0"
IUSE="bcache +cryptsetup device-mapper dmraid escrow gtk-doc introspection lvm kbd test +tools vdo"
-RESTRICT="!test? ( test )"
+# Tests require root. In a future release, we may be able to run a smaller
+# subset with new run_tests.py arguments.
+RESTRICT="!test? ( test ) test"
RDEPEND="
>=dev-libs/glib-2.42.2
@@ -107,6 +109,13 @@ src_configure() {
econf "${myeconfargs[@]}"
}
+src_test() {
+ # See http://storaged.org/libblockdev/ch03.html
+ # The 'check' target just does Pylint.
+ # ... but it needs root.
+ emake test
+}
+
src_install() {
default
find "${ED}" -type f -name "*.la" -delete || die