summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-02-17 05:07:43 +0000
committerSam James <sam@gentoo.org>2023-02-17 05:07:44 +0000
commit0ef8d2c6e29522842341f2b791dec7e9f3335a0f (patch)
tree9e1693e9f7697680ed8442f7858604f82832ca7b /sys-fs/btrfs-progs
parentsys-fs/btrfs-progs: add python3.11 to PYTHON_COMPAT (diff)
downloadgentoo-0ef8d2c6e29522842341f2b791dec7e9f3335a0f.tar.gz
gentoo-0ef8d2c6e29522842341f2b791dec7e9f3335a0f.tar.bz2
gentoo-0ef8d2c6e29522842341f2b791dec7e9f3335a0f.zip
sys-fs/btrfs-progs: wire up tests for USE=python
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-fs/btrfs-progs')
-rw-r--r--sys-fs/btrfs-progs/btrfs-progs-6.1.3.ebuild11
-rw-r--r--sys-fs/btrfs-progs/btrfs-progs-9999.ebuild11
2 files changed, 22 insertions, 0 deletions
diff --git a/sys-fs/btrfs-progs/btrfs-progs-6.1.3.ebuild b/sys-fs/btrfs-progs/btrfs-progs-6.1.3.ebuild
index ec68083a59d3..14332b1b7112 100644
--- a/sys-fs/btrfs-progs/btrfs-progs-6.1.3.ebuild
+++ b/sys-fs/btrfs-progs/btrfs-progs-6.1.3.ebuild
@@ -128,6 +128,17 @@ src_compile() {
emake V=1 all $(usev static)
}
+src_test() {
+ default
+
+ if use python ; then
+ cd libbtrfsutil/python || die
+
+ local -x LD_LIBRARY_PATH="${S}:libbtrfsutil/python:${LD_LIBRARY_PATH}"
+ ${EPYTHON} -m unittest tests/test_*.py || die
+ fi
+}
+
src_install() {
local makeargs=(
$(usex python install_python '')
diff --git a/sys-fs/btrfs-progs/btrfs-progs-9999.ebuild b/sys-fs/btrfs-progs/btrfs-progs-9999.ebuild
index ec68083a59d3..14332b1b7112 100644
--- a/sys-fs/btrfs-progs/btrfs-progs-9999.ebuild
+++ b/sys-fs/btrfs-progs/btrfs-progs-9999.ebuild
@@ -128,6 +128,17 @@ src_compile() {
emake V=1 all $(usev static)
}
+src_test() {
+ default
+
+ if use python ; then
+ cd libbtrfsutil/python || die
+
+ local -x LD_LIBRARY_PATH="${S}:libbtrfsutil/python:${LD_LIBRARY_PATH}"
+ ${EPYTHON} -m unittest tests/test_*.py || die
+ fi
+}
+
src_install() {
local makeargs=(
$(usex python install_python '')