On 2021-10-27 04:07+0000, Eric Wong wrote:
> Thomas Weißschuh <[email protected]> wrote:
> > On 2021-10-26 05:28+0000, Eric Wong wrote:
> > > Thomas Weißschuh <[email protected]> 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 <[email protected]>
> ---
>  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 <[email protected]>

Reply via email to