unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
From: Eric Wong <e@80x24.org>
To: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Cc: meta@public-inbox.org
Subject: Re: [PATCH] gcf2: die if pkg-config is missing
Date: Thu, 9 Sep 2021 21:14:36 +0000	[thread overview]
Message-ID: <20210909211436.GA29028@dcvr> (raw)
In-Reply-To: <20210909210138.ssiv5tri65mf4l4o@meerkat.local>

Konstantin Ryabitsev <konstantin@linuxfoundation.org> wrote:
> Yep, that was the culprit. After installing pkg-config, gcf2 builds and tests
> pass. I still have this while running "make test":

Good to know.  We'll have to document that when adding libgit2
stuff to the already-huge INSTALL file.

> t/git.t ...................... 1/? fatal: Needed a single revision
> 
> But I do get "All tests successful" in the end, so I assume that's the
> expected condition.

Yes, it was making sure errors got propagated properly.
It always got lost in the "make -j4 check" parallel output for me :x

--------8<---------
Subject: [PATCH] t/git.t: quiet intentional git-rev-parse failure

It can get confusing, especially when running non-parallel "make test"

Link: https://public-inbox.org/meta/20210909210138.ssiv5tri65mf4l4o@meerkat.local/
---
 t/git.t | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/t/git.t b/t/git.t
index bc1dea50..844e0111 100644
--- a/t/git.t
+++ b/t/git.t
@@ -98,8 +98,10 @@ if (1) {
 
 	$gcf->qx(qw(repack -adq));
 	ok($gcf->packed_bytes > 0, 'packed size is positive');
-	$gcf->qx(qw(rev-parse --verify bogus));
-	isnt($?, 0, '$? set on failure'.$?);
+	my $rdr;
+	open $rdr->{2}, '+>', '/dev/null' or xbail "open $!";
+	$gcf->qx([qw(rev-parse --verify bogus)], undef, $rdr);
+	isnt($?, 0, '$? set on failure: '.$?);
 }
 
 SKIP: {

  reply	other threads:[~2021-09-09 21:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-09 18:23 make test in a debian-11 container Konstantin Ryabitsev
2021-09-09 20:45 ` [PATCH] gcf2: die if pkg-config is missing Eric Wong
2021-09-09 21:01   ` Konstantin Ryabitsev
2021-09-09 21:14     ` Eric Wong [this message]
2021-09-09 21:21       ` Konstantin Ryabitsev
2021-09-09 21:23         ` Eric Wong
2021-09-09 21:29           ` Konstantin Ryabitsev
2021-09-09 21:34             ` Eric Wong

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

  List information: https://public-inbox.org/README

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

  git send-email \
    --in-reply-to=20210909211436.GA29028@dcvr \
    --to=e@80x24.org \
    --cc=konstantin@linuxfoundation.org \
    --cc=meta@public-inbox.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).