From 27f17d80e4e8e15b5e7d50045b1853ec7bdb4b3b Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 10 Jun 2020 07:04:44 +0000 Subject: xt/*: show some tunable parameters This will make it easier to show parameters used for testing and potential tweaks to be made. --- xt/eml_check_limits.t | 5 ++++- xt/git_async_cmp.t | 1 + xt/imapd-mbsync-oimap.t | 4 +++- xt/imapd-validate.t | 1 + xt/mem-msgview.t | 1 + 5 files changed, 10 insertions(+), 2 deletions(-) diff --git a/xt/eml_check_limits.t b/xt/eml_check_limits.t index 2d632799..cf780c77 100644 --- a/xt/eml_check_limits.t +++ b/xt/eml_check_limits.t @@ -13,7 +13,10 @@ require_git(2.19); # for --unordered require_mods(qw(BSD::Resource)); BSD::Resource->import(qw(getrusage)); my $cls = $ENV{TEST_CLASS}; -require_mods($cls) if $cls; +if ($cls) { + diag "TEST_CLASS=$cls"; + require_mods($cls); +} $cls //= 'PublicInbox::Eml'; my $inboxdir = $ENV{GIANT_INBOX_DIR}; plan skip_all => "GIANT_INBOX_DIR not defined for $0" unless $inboxdir; diff --git a/xt/git_async_cmp.t b/xt/git_async_cmp.t index 8f8d1cf4..f9c9ddef 100644 --- a/xt/git_async_cmp.t +++ b/xt/git_async_cmp.t @@ -18,6 +18,7 @@ if (require_git(2.19, 1)) { } my @dig; my $nr = $ENV{NR} || 1; +diag "NR=$nr"; my $async = timeit($nr, sub { my $dig = Digest::SHA->new(1); my $cb = sub { diff --git a/xt/imapd-mbsync-oimap.t b/xt/imapd-mbsync-oimap.t index fdaa22aa..c097a026 100644 --- a/xt/imapd-mbsync-oimap.t +++ b/xt/imapd-mbsync-oimap.t @@ -116,7 +116,9 @@ while (scalar keys %pids) { is($?, 0, join(' ', @$cmd, 'done')); } -if (my $sec = $ENV{TEST_PERSIST}) { +my $sec = $ENV{TEST_PERSIST} // 0; +diag "TEST_PERSIST=$sec"; +if ($sec) { diag "sleeping ${sec}s, imap://$host:$port/$mailbox available"; diag "tmpdir=$tmpdir (Maildirs available)"; diag "stdout=$out"; diff --git a/xt/imapd-validate.t b/xt/imapd-validate.t index aeeb43b9..9a56c2d0 100644 --- a/xt/imapd-validate.t +++ b/xt/imapd-validate.t @@ -13,6 +13,7 @@ plan skip_all => "GIANT_INBOX_DIR not defined for $0" unless $inbox_dir; # how many emails to read into memory at once per-process my $BATCH = $ENV{TEST_BATCH} // 100; my $REPEAT = $ENV{TEST_REPEAT} // 1; +diag "TEST_BATCH=$BATCH TEST_REPEAT=$REPEAT"; require_mods(qw(Mail::IMAPClient)); my $imap_client = 'Mail::IMAPClient'; diff --git a/xt/mem-msgview.t b/xt/mem-msgview.t index bffb1768..c09afde0 100644 --- a/xt/mem-msgview.t +++ b/xt/mem-msgview.t @@ -13,6 +13,7 @@ my @mods = qw(DBD::SQLite BSD::Resource PublicInbox::WWW); require_mods(@mods); use_ok($_) for @mods; my $lines = $ENV{NR_LINES} // 50000; +diag "NR_LINES=$lines"; my ($tmpdir, $for_destroy) = tmpdir(); my $inboxname = 'big'; my $inboxdir = "$tmpdir/big"; -- cgit v1.2.3-24-ge0c7