From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS24940 159.69.0.0/16 X-Spam-Status: No, score=-3.2 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (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 dcvr.yhbt.net (Postfix) with ESMTPS id 05D641F953 for ; Wed, 27 Oct 2021 05:04:55 +0000 (UTC) Date: Wed, 27 Oct 2021 07:04:51 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=t-8ch.de; s=mail; t=1635311092; bh=W++dOZZQBV1l/SSXcgK7jokyy+MZguHqVDhARzAb6X0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=EzJ67KdkGFXMouU3JAq4zKQmrYHeEYXPmaii/K14t42mT6SOmCfrA+uHF5Fy1tqiu 4Qmhp7tQqSijNeddN/AvNan8WcEdtynEMQHy8ogONMTw27SaEGqdan5J8s4TozYFUC PZWENlqAuLC3w/P8wYApWdbNuZ+Q3Whwfc/vLukQ= From: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= To: Eric Wong Cc: meta@public-inbox.org Subject: Re: [PATCH] test_common: key test inboxes to init.defaultBranch Message-ID: References: <20211025222453.252181-1-thomas@t-8ch.de> <20211025225822.GA28875@dcvr> <20211026052815.GA13265@dcvr> <5116e23a-b5de-4419-a909-0e4df787ac53@t-8ch.de> <20211027040754.GA18609@dcvr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20211027040754.GA18609@dcvr> Jabber-ID: thomas@t-8ch.de X-Accept: text/plain, text/html;q=0.2, text/*;q=0.1 X-Accept-Language: en-us, en;q=0.8, de-de;q=0.7, de;q=0.6 List-Id: On 2021-10-27 04:07+0000, Eric Wong wrote: > Thomas Weißschuh wrote: > > On 2021-10-26 05:28+0000, Eric Wong wrote: > > > Thomas Weißschuh wrote: > > > > On 2021-10-25 16:58-0600, Eric Wong wrote: > > > > > Thanks, pushed as 9f3fb207. It looks like there's several > > > > > other tests broken with non-master being the default. Can we > > > > > expect fixes for those, too? Thanks again. > > > > > > > > Which tests are failing for you? > > > > > > t/edit.t > > > t/indexlevels-mirror.t > > > t/indexlevels-mirror-v1.t > > > t/convert-compact.t > > > t/multi-mid.t > > > t/feed.t > > > > I think these are because of stale data in t/data-gen/ that was generated when > > you still had the master branch configured. > > Try to clean out these files and rerun the tests. > > Ah, thanks for spotting that. I think it's better if the > cache-invalidation is transparent: Sounds reasonable. > -----------8<---------- > Subject: [PATCH] test_common: key test inboxes to init.defaultBranch > > This lets users change their global init.defaultBranch config > knob in ~/.gitconfig or similar without breaking tests. > > Reported-by: Thomas Weißschuh > --- > lib/PublicInbox/TestCommon.pm | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/lib/PublicInbox/TestCommon.pm b/lib/PublicInbox/TestCommon.pm > index fb0d5a4e..c3820d3a 100644 > --- a/lib/PublicInbox/TestCommon.pm > +++ b/lib/PublicInbox/TestCommon.pm > @@ -674,8 +674,10 @@ sub create_inbox ($$;@) { > my %opt = @_; > require PublicInbox::Lock; > require PublicInbox::InboxWritable; > + require PublicInbox::Import; > my ($base) = ($0 =~ m!\b([^/]+)\.[^\.]+\z!); > - my $dir = "t/data-gen/$base.$ident"; > + my ($db) = (PublicInbox::Import::default_branch() =~ m!([^/]+)\z!); > + my $dir = "t/data-gen/$base.$ident-$db"; > my $new = !-d $dir; > if ($new) { > mkdir $dir; # may race Tested-by: Thomas Weißschuh