From: Eric Wong <e@80x24.org>
To: "Jörg Rödel" <joro@8bytes.org>
Cc: meta@public-inbox.org
Subject: [PATCH] t/lei-mirror: skip lei comparisons if lei missing
Date: Mon, 22 Nov 2021 07:42:41 +0000 [thread overview]
Message-ID: <20211122074241.M224754@dcvr> (raw)
In-Reply-To: <20211122065545.GA31379@dcvr>
Eric Wong <e@80x24.org> wrote:
> Will work on a patch to ensure lei ran successfully.
---------8<--------
Subject: [PATCH] t/lei-mirror: skip lei comparisons if lei missing
We can't compare created_at times with lei if lei tests are
skipped due to Inline::C or Socket::MsgHdr unavailability.
Reported-by: Jörg Rödel <joro@8bytes.org>
Link: https://public-inbox.org/meta/YZebmAxlFJy4lqAw@8bytes.org/
---
t/lei-mirror.t | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/t/lei-mirror.t b/t/lei-mirror.t
index 646ff2b19f98..d6fa6db5e3cb 100644
--- a/t/lei-mirror.t
+++ b/t/lei-mirror.t
@@ -170,12 +170,17 @@ SKIP: {
local $ENV{HOME} = $tmpdir;
ok(run_script([qw(-index -Lbasic), "$d/t1"]), 'index v1');
ok(run_script([qw(-index -Lbasic), "$d/t2"]), 'index v2');
- my $f = "$d/t1/public-inbox/msgmap.sqlite3";
- my $ca = PublicInbox::Msgmap->new_file($f)->created_at;
- is($ca, $created{v1}, 'clone + index v1 synced ->created_at');
- $f = "$d/t2/msgmap.sqlite3";
- $ca = PublicInbox::Msgmap->new_file($f)->created_at;
- is($ca, $created{v2}, 'clone + index v1 synced ->created_at');
+
+ SKIP: {
+ skip "lei didn't run", 2 if join(sort keys %created) ne 'v1v2';
+ my $f = "$d/t1/public-inbox/msgmap.sqlite3";
+ my $ca = PublicInbox::Msgmap->new_file($f)->created_at;
+ is($ca, $created{v1}, 'clone + index v1 synced ->created_at');
+
+ $f = "$d/t2/msgmap.sqlite3";
+ $ca = PublicInbox::Msgmap->new_file($f)->created_at;
+ is($ca, $created{v2}, 'clone + index v2 synced ->created_at');
+ }
test_lei(sub {
lei_ok qw(inspect num:1 --dir), "$d/t1";
ok(ref(json_utf8->decode($lei_out)), 'inspect num: on v1');
next prev parent reply other threads:[~2021-11-22 7:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-19 12:42 'make test' failures while packaging for openSUSE Jörg Rödel
2021-11-19 18:54 ` Eric Wong
2021-11-19 21:46 ` Jörg Rödel
2021-11-22 6:55 ` [PATCH] searchidx: add some extra diagnostics for odd message Eric Wong
2021-11-22 7:42 ` Eric Wong [this message]
2021-11-22 13:47 ` [PATCH] t/lei-mirror: skip lei comparisons if lei missing Jörg Rödel
2021-11-22 17:24 ` Eric Wong
2021-11-22 13:20 ` [PATCH] searchidx: add some extra diagnostics for odd message Jörg Rödel
2021-11-22 18:23 ` [PATCH] searchidx: avoid modification of read-only `$_' 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=20211122074241.M224754@dcvr \
--to=e@80x24.org \
--cc=joro@8bytes.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).