public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sergei Trofimovich" <slyfox@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/crystal/, dev-lang/crystal/files/
Date: Sat, 10 Nov 2018 11:36:18 +0000 (UTC)	[thread overview]
Message-ID: <1541849773.4aaa3e8bdd96de853891cfe7e9c9254ed33c2dce.slyfox@gentoo> (raw)

commit:     4aaa3e8bdd96de853891cfe7e9c9254ed33c2dce
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 10 11:35:59 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Nov 10 11:36:13 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4aaa3e8b

dev-lang/crystal: add EXTRA_SPEC_FLAGS variable

This allows running only individual crystal tests
in src_test() phase. Useful to quickly debug single test:
    USE=debug EXTRA_SPEC_FLAGS='-e parse_set_cookie' emerge -1 crystal

Package-Manager: Portage-2.3.51, Repoman-2.3.12
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 dev-lang/crystal/crystal-0.27.0.ebuild                       |  8 +++++++-
 dev-lang/crystal/files/crystal-0.27.0-extra-spec-flags.patch | 11 +++++++++++
 2 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/dev-lang/crystal/crystal-0.27.0.ebuild b/dev-lang/crystal/crystal-0.27.0.ebuild
index 71778f6c2c1..b7dcd5f70cf 100644
--- a/dev-lang/crystal/crystal-0.27.0.ebuild
+++ b/dev-lang/crystal/crystal-0.27.0.ebuild
@@ -43,6 +43,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-0.25.0-verbose.patch
 	"${FILESDIR}"/${PN}-0.26.1-gentoo-tests-sandbox.patch
 	"${FILESDIR}"/${PN}-0.26.1-gentoo-tests-network-sandbox-3.patch
+	"${FILESDIR}"/${PN}-0.27.0-extra-spec-flags.patch
 )
 
 src_prepare() {
@@ -77,6 +78,9 @@ src_compile() {
 }
 
 src_test() {
+	# EXTRA_SPEC_FLAGS is useful to debug individual tests
+	# as part of full build:
+	#    USE=debug EXTRA_SPEC_FLAGS='-e parse_set_cookie' emerge -1 crystal
 	emake spec \
 		$(usex debug "" release=1) \
 		progress=true \
@@ -89,7 +93,9 @@ src_test() {
 		AR=$(tc-getAR) \
 		\
 		CRYSTAL_PATH=src \
-		CRYSTAL_CONFIG_VERSION=${PV}
+		CRYSTAL_CONFIG_VERSION=${PV} \
+		\
+		"EXTRA_SPEC_FLAGS=${EXTRA_SPEC_FLAGS}"
 }
 
 src_install() {

diff --git a/dev-lang/crystal/files/crystal-0.27.0-extra-spec-flags.patch b/dev-lang/crystal/files/crystal-0.27.0-extra-spec-flags.patch
new file mode 100644
index 00000000000..bd86c13a78a
--- /dev/null
+++ b/dev-lang/crystal/files/crystal-0.27.0-extra-spec-flags.patch
@@ -0,0 +1,11 @@
+Allow injecting additional arguments to test suite.
+Useful to be able to run small subset of individual
+test suite:
+
+    make spec EXTRA_SPEC_FLAGS='-e parse_set_cookie'
+
+--- a/Makefile
++++ b/Makefile
+@@ -31 +31 @@ override FLAGS += $(if $(release),--release )$(if $(stats),--stats )$(if $(progr
+-SPEC_FLAGS := $(if $(verbose),-v )$(if $(junit_output),--junit_output $(junit_output) )
++SPEC_FLAGS := $(if $(verbose),-v )$(if $(junit_output),--junit_output $(junit_output) )$(EXTRA_SPEC_FLAGS)


             reply	other threads:[~2018-11-10 11:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-10 11:36 Sergei Trofimovich [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-09-24 19:17 [gentoo-commits] repo/gentoo:master commit in: dev-lang/crystal/, dev-lang/crystal/files/ Sergei Trofimovich
2019-06-14 18:32 Sergei Trofimovich
2018-06-11 13:24 Sergei Trofimovich
2018-03-15 23:33 Sergei Trofimovich
2017-12-21 10:27 Sergei Trofimovich
2017-04-22 10:24 Sergei Trofimovich
2017-01-28 13:37 Sergei Trofimovich
2017-01-28 12:48 Sergei Trofimovich

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=1541849773.4aaa3e8bdd96de853891cfe7e9c9254ed33c2dce.slyfox@gentoo \
    --to=slyfox@gentoo.org \
    --cc=gentoo-commits@lists.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