commit:     ad71749807549d721f6675fedd025978dc8d9201
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed May 31 03:24:26 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed May 31 03:24:26 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ad717498

sys-fs/mtd-utils: wire up tests

Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-fs/mtd-utils/mtd-utils-2.1.5.ebuild | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/sys-fs/mtd-utils/mtd-utils-2.1.5.ebuild 
b/sys-fs/mtd-utils/mtd-utils-2.1.5.ebuild
index b0f0145367f0..871721ed7e9b 100644
--- a/sys-fs/mtd-utils/mtd-utils-2.1.5.ebuild
+++ b/sys-fs/mtd-utils/mtd-utils-2.1.5.ebuild
@@ -10,7 +10,8 @@ SRC_URI="https://infraroot.at/pub/mtd/${P}.tar.bz2";
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="amd64 arm arm64 ~mips ppc ppc64 ~riscv x86 ~amd64-linux ~x86-linux"
-IUSE="+lzo xattr +zstd"
+IUSE="+lzo test xattr +zstd"
+RESTRICT="!test? ( test )"
 
 DEPEND="
        sys-apps/util-linux:=
@@ -20,6 +21,7 @@ DEPEND="
        zstd? ( app-arch/zstd:= )
 "
 RDEPEND="${DEPEND}"
+BDEPEND="test? ( dev-util/cmocka )"
 
 DOCS=( jffsX-utils/device_table.txt ubifs-utils/mkfs.ubifs/README )
 
@@ -33,7 +35,10 @@ src_prepare() {
 }
 
 src_configure() {
+       # --enable-tests is for test programs that are installed
        econf \
+               --enable-tests \
+               $(use_enable test unit-tests) \
                $(use_with lzo) \
                $(use_with xattr) \
                $(use_with zstd)

Reply via email to