public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Georgy Yakovlev <gyakovlev@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: Georgy Yakovlev <gyakovlev@gentoo.org>
Subject: [gentoo-dev] [PATCH 2/2] cargo.eclass: add standard src_test
Date: Mon,  7 Jan 2019 12:33:51 -0800	[thread overview]
Message-ID: <20190107203351.5406-2-gyakovlev@gentoo.org> (raw)
In-Reply-To: <20190107203351.5406-1-gyakovlev@gentoo.org>

But not set IUSE=test by default

Signed-off-by: Georgy Yakovlev <gyakovlev@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	other threads:[~2019-01-07 20:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-07  4:01 [gentoo-dev] [PATCH 1/2] cargo.eclass: allow passing additional arguments to cargo Georgy Yakovlev
2019-01-07  4:01 ` [gentoo-dev] [PATCH 2/2] cargo.eclass: add standard src_test Georgy Yakovlev
2019-01-07  7:27 ` [gentoo-dev] [PATCH 1/2] cargo.eclass: allow passing additional arguments to cargo Ulrich Mueller
2019-01-07 20:33   ` Georgy Yakovlev
2019-01-07 20:33     ` Georgy Yakovlev [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190107203351.5406-2-gyakovlev@gentoo.org \
    --to=gyakovlev@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox