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 7D180158649 for ; Tue, 9 May 2023 15:43:10 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3F3E4E0843; Tue, 9 May 2023 15:43:09 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0A1E7E0843 for ; Tue, 9 May 2023 15:43:08 +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) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BE3D0340D8E for ; Tue, 9 May 2023 15:43:07 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 329BAA66 for ; Tue, 9 May 2023 15:43:06 +0000 (UTC) From: "Anna Vyalkova" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Anna Vyalkova" Message-ID: <1683646967.471145080920d7798f2e00a1001f7d454b29f02f.cybertailor@gentoo> Subject: [gentoo-commits] repo/proj/guru:dev 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: cybertailor X-VCS-Committer-Name: Anna Vyalkova X-VCS-Revision: 471145080920d7798f2e00a1001f7d454b29f02f X-VCS-Branch: dev Date: Tue, 9 May 2023 15:43:06 +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: 14d11bbb-3b03-4f13-a9c9-a24e14116edb X-Archives-Hash: 1f22da153c8281d688907eae7fcf64e5 commit: 471145080920d7798f2e00a1001f7d454b29f02f Author: Anna (cybertailor) Vyalkova sysrq in> AuthorDate: Mon May 8 18:53:50 2023 +0000 Commit: Anna Vyalkova sysrq in> 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