user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* Re: [PATCH] t/lei-mirror: skip lei comparisons if lei missing
  2021-11-22 13:47  8%         ` Jörg Rödel
@ 2021-11-22 17:24  8%           ` Eric Wong
  0 siblings, 0 replies; 3+ results
From: Eric Wong @ 2021-11-22 17:24 UTC (permalink / raw)
  To: Jörg Rödel; +Cc: meta

Jörg Rödel <joro@8bytes.org> wrote:
> This seems to cause warnings:
> 
> [   56s] t/lei-lcat.t ................. ok
> [   57s] Useless use of sort in scalar context at t/lei-mirror.t line 175.
> [   59s] Use of uninitialized value in join or string at t/lei-mirror.t line 175.
> [   59s] t/lei-mirror.t ............... ok

Oops :x  I'll squash this in before pushing:

diff --git a/t/lei-mirror.t b/t/lei-mirror.t
index d6fa6db5e3cb..32a5b0390714 100644
--- a/t/lei-mirror.t
+++ b/t/lei-mirror.t
@@ -172,7 +172,8 @@ SKIP: {
 	ok(run_script([qw(-index -Lbasic), "$d/t2"]), 'index v2');
 
 	SKIP: {
-		skip "lei didn't run", 2 if join(sort keys %created) ne 'v1v2';
+		join('', sort(keys %created)) eq 'v1v2' or
+			skip "lei didn't run", 2;
 		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');

^ permalink raw reply	[relevance 8%]

* Re: [PATCH] t/lei-mirror: skip lei comparisons if lei missing
  2021-11-22  7:42 14%       ` [PATCH] t/lei-mirror: skip lei comparisons if lei missing Eric Wong
@ 2021-11-22 13:47  8%         ` Jörg Rödel
  2021-11-22 17:24  8%           ` Eric Wong
  0 siblings, 1 reply; 3+ results
From: Jörg Rödel @ 2021-11-22 13:47 UTC (permalink / raw)
  To: Eric Wong; +Cc: meta

On Mon, Nov 22, 2021 at 07:42:41AM +0000, Eric Wong wrote:
>  t/lei-mirror.t | 17 +++++++++++------
>  1 file changed, 11 insertions(+), 6 deletions(-)

This seems to cause warnings:

[   56s] t/lei-lcat.t ................. ok
[   57s] Useless use of sort in scalar context at t/lei-mirror.t line 175.
[   59s] Use of uninitialized value in join or string at t/lei-mirror.t line 175.
[   59s] t/lei-mirror.t ............... ok

Regards,

	Joerg

^ permalink raw reply	[relevance 8%]

* [PATCH] t/lei-mirror: skip lei comparisons if lei missing
  @ 2021-11-22  7:42 14%       ` Eric Wong
  2021-11-22 13:47  8%         ` Jörg Rödel
  0 siblings, 1 reply; 3+ results
From: Eric Wong @ 2021-11-22  7:42 UTC (permalink / raw)
  To: Jörg Rödel; +Cc: meta

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');

^ permalink raw reply	[relevance 14%]

Results 1-3 of 3 | reverse | sort options + mbox downloads above
-- links below jump to the message on this page --
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 14%       ` [PATCH] t/lei-mirror: skip lei comparisons if lei missing Eric Wong
2021-11-22 13:47  8%         ` Jörg Rödel
2021-11-22 17:24  8%           ` Eric Wong

Code repositories for project(s) associated with this inbox:

	https://80x24.org/public-inbox.git

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).