But not set IUSE=test by default

Signed-off-by: Georgy Yakovlev <gyakov...@gentoo.org>
---
 eclass/cargo.eclass | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/eclass/cargo.eclass b/eclass/cargo.eclass
index 06c85ce9de8..051d5c499a6 100644
--- a/eclass/cargo.eclass
+++ b/eclass/cargo.eclass
@@ -23,7 +23,7 @@ esac
 
 inherit multiprocessing
 
-EXPORT_FUNCTIONS src_unpack src_compile src_install
+EXPORT_FUNCTIONS src_unpack src_compile src_install src_test
 
 IUSE="${IUSE} debug"
 
@@ -139,4 +139,14 @@ cargo_src_install() {
        [ -d "${S}/man" ] && doman "${S}/man" || return 0
 }
 
+# @FUNCTION: cargo_src_test
+# @DESCRIPTION:
+# Test the package using cargo test
+cargo_src_test() {
+       debug-print-function ${FUNCNAME} "$@"
+
+       cargo test -j $(makeopts_jobs) $(usex debug "" --release) "$@" \
+               || die "cargo test failed"
+}
+
 fi
-- 
2.20.1


Reply via email to