From 0ef8d2c6e29522842341f2b791dec7e9f3335a0f Mon Sep 17 00:00:00 2001 From: Sam James Date: Fri, 17 Feb 2023 05:07:43 +0000 Subject: sys-fs/btrfs-progs: wire up tests for USE=python Signed-off-by: Sam James --- sys-fs/btrfs-progs/btrfs-progs-6.1.3.ebuild | 11 +++++++++++ sys-fs/btrfs-progs/btrfs-progs-9999.ebuild | 11 +++++++++++ 2 files changed, 22 insertions(+) (limited to 'sys-fs/btrfs-progs') 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 '') -- cgit v1.2.3-65-gdbad