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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A734C158649 for ; Thu, 11 May 2023 14:32:07 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 79793E0D16; Thu, 11 May 2023 14:32:05 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5BB59E0D23 for ; Thu, 11 May 2023 14:32:05 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4947A340B46 for ; Thu, 11 May 2023 14:32:04 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 775B8A73 for ; Thu, 11 May 2023 14:32:01 +0000 (UTC) From: "Andrew Ammerlaan" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andrew Ammerlaan" Message-ID: <1683646967.471145080920d7798f2e00a1001f7d454b29f02f.andrewammerlaan@gentoo> Subject: [gentoo-commits] repo/proj/guru:master commit in: eclass/ X-VCS-Repository: repo/proj/guru X-VCS-Files: eclass/crystal-utils.eclass eclass/shards.eclass X-VCS-Directories: eclass/ X-VCS-Committer: andrewammerlaan X-VCS-Committer-Name: Andrew Ammerlaan X-VCS-Revision: 471145080920d7798f2e00a1001f7d454b29f02f X-VCS-Branch: master Date: Thu, 11 May 2023 14:32:01 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: f8331e01-eeb4-4bcc-8310-a4551a6c6f53 X-Archives-Hash: 7669cd800fa2b8a2805c2c12e28862e8 commit: 471145080920d7798f2e00a1001f7d454b29f02f Author: Anna (cybertailor) Vyalkova sysrq in> AuthorDate: Mon May 8 18:53:50 2023 +0000 Commit: Andrew Ammerlaan gentoo org> CommitDate: Tue May 9 15:42:47 2023 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=47114508 crystal-utils.eclass: add crystal_spec function Signed-off-by: Anna (cybertailor) Vyalkova sysrq.in> eclass/crystal-utils.eclass | 8 ++++++++ eclass/shards.eclass | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/eclass/crystal-utils.eclass b/eclass/crystal-utils.eclass index 3c0b7d48a..8456c5af6 100644 --- a/eclass/crystal-utils.eclass +++ b/eclass/crystal-utils.eclass @@ -164,4 +164,12 @@ crystal_build() { ecrystal build "${build_args[@]}" "${@}" } +# @FUNCTION: crystal_spec +# @USAGE: [...] +# @DESCRIPTION: +# Function for running tests. All arguments are passed to crystal. +crystal_spec() { + ecrystal spec --verbose "${@}" || die -n "Tests failed" +} + fi diff --git a/eclass/shards.eclass b/eclass/shards.eclass index 122464cc5..5fd9f6c10 100644 --- a/eclass/shards.eclass +++ b/eclass/shards.eclass @@ -87,7 +87,7 @@ shards_src_test() { debug-print-function ${FUNCNAME} "${@}" if [[ -d "spec" ]]; then - ecrystal spec --verbose "${@}" || die "Tests failed" + crystal_spec "${@}" fi return 0