From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id F3CDC138334 for ; Mon, 7 Jan 2019 20:34:36 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2862AE0B1D; Mon, 7 Jan 2019 20:34:09 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id CAE8DE0B14 for ; Mon, 7 Jan 2019 20:34:08 +0000 (UTC) Received: from ws.gaikai.org (unknown [100.42.98.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: gyakovlev) by smtp.gentoo.org (Postfix) with ESMTPSA id 50664335D0A; Mon, 7 Jan 2019 20:34:07 +0000 (UTC) From: Georgy Yakovlev To: gentoo-dev@lists.gentoo.org Cc: Georgy Yakovlev Subject: [gentoo-dev] [PATCH 2/2] cargo.eclass: add standard src_test Date: Mon, 7 Jan 2019 12:33:51 -0800 Message-Id: <20190107203351.5406-2-gyakovlev@gentoo.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190107203351.5406-1-gyakovlev@gentoo.org> References: <20190107203351.5406-1-gyakovlev@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Archives-Salt: 46d2aa1b-d3d6-46a3-a147-bf03a653a2fa X-Archives-Hash: 7b4e91f31d881bf246dbf1930c4be875 But not set IUSE=test by default Signed-off-by: Georgy Yakovlev --- 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