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: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 139281F9FD for ; Sun, 24 Nov 2019 00:22:43 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 15/17] tests: quiet down commit graph Date: Sun, 24 Nov 2019 00:22:35 +0000 Message-Id: <20191124002237.15713-16-e@80x24.org> In-Reply-To: <20191124002237.15713-1-e@80x24.org> References: <20191124002237.15713-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Newer versions of git enable the commit graph by default. Since we blow away our temporary directories every test, generating graphis is a waste and clutters stderr with "Computing commit graph generation numbers" messages. --- MANIFEST | 1 + t/.gitconfig | 4 ++++ t/purge.t | 1 + t/replace.t | 3 +++ t/v2mirror.t | 2 ++ t/v2writable.t | 2 ++ 6 files changed, 13 insertions(+) create mode 100644 t/.gitconfig diff --git a/MANIFEST b/MANIFEST index 689d3d4e..9475667b 100644 --- a/MANIFEST +++ b/MANIFEST @@ -194,6 +194,7 @@ scripts/report-spam scripts/slrnspool2maildir scripts/ssoma-replay scripts/xhdr-num2mid +t/.gitconfig t/address.t t/admin.t t/altid.t diff --git a/t/.gitconfig b/t/.gitconfig new file mode 100644 index 00000000..645a3041 --- /dev/null +++ b/t/.gitconfig @@ -0,0 +1,4 @@ +; this becomes ~/.gitconfig for tests where we use +; "$ENV{HOME} = '/path/to/worktree/t'" in tests +[gc] + writeCommitGraph = false diff --git a/t/purge.t b/t/purge.t index 12644d69..db09b731 100644 --- a/t/purge.t +++ b/t/purge.t @@ -11,6 +11,7 @@ foreach my $mod (@mods) { plan skip_all => "missing $mod for t/purge.t" if $@; }; use Cwd qw(abs_path); # we need this since we chdir below +local $ENV{HOME} = abs_path('t'); my $purge = abs_path('blib/script/public-inbox-purge'); my ($tmpdir, $for_destroy) = tmpdir(); use_ok 'PublicInbox::V2Writable'; diff --git a/t/replace.t b/t/replace.t index 039c6bc6..e9361856 100644 --- a/t/replace.t +++ b/t/replace.t @@ -6,12 +6,15 @@ use Test::More; use PublicInbox::MIME; use PublicInbox::InboxWritable; require './t/common.perl'; +use Cwd qw(abs_path); require_git(2.6); # replace is v2 only, for now... foreach my $mod (qw(DBD::SQLite)) { eval "require $mod"; plan skip_all => "$mod missing for $0" if $@; } +local $ENV{HOME} = abs_path('t'); + sub test_replace ($$$) { my ($v, $level, $opt) = @_; diag "v$v $level replace"; diff --git a/t/v2mirror.t b/t/v2mirror.t index 96657fdc..a45a262e 100644 --- a/t/v2mirror.t +++ b/t/v2mirror.t @@ -4,7 +4,9 @@ use strict; use warnings; use Test::More; require './t/common.perl'; +use Cwd qw(abs_path); require_git(2.6); +local $ENV{HOME} = abs_path('t'); # Integration tests for HTTP cloning + mirroring foreach my $mod (qw(Plack::Util Plack::Builder diff --git a/t/v2writable.t b/t/v2writable.t index 7519b487..8bbcd45a 100644 --- a/t/v2writable.t +++ b/t/v2writable.t @@ -6,11 +6,13 @@ use Test::More; use PublicInbox::MIME; use PublicInbox::ContentId qw(content_digest); require './t/common.perl'; +use Cwd qw(abs_path); require_git(2.6); foreach my $mod (qw(DBD::SQLite Search::Xapian)) { eval "require $mod"; plan skip_all => "$mod missing for nntpd.t" if $@; } +local $ENV{HOME} = abs_path('t'); use_ok 'PublicInbox::V2Writable'; umask 007; my ($inboxdir, $for_destroy) = tmpdir();