]> Sergey Matveev's repositories - public-inbox.git/commitdiff
xt/*: show some tunable parameters
authorEric Wong <e@yhbt.net>
Wed, 10 Jun 2020 07:04:44 +0000 (07:04 +0000)
committerEric Wong <e@yhbt.net>
Sat, 13 Jun 2020 07:55:45 +0000 (07:55 +0000)
This will make it easier to show parameters used for testing
and potential tweaks to be made.

xt/eml_check_limits.t
xt/git_async_cmp.t
xt/imapd-mbsync-oimap.t
xt/imapd-validate.t
xt/mem-msgview.t

index 2d632799956730bbb124b1795921259d3e490fce..cf780c77babaac401b72b6a38eb4925a1bc660c2 100644 (file)
@@ -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;
index 8f8d1cf4d01e12e21740e3c1de2a5f560052ace2..f9c9ddefeb0cb23240397ebf58b5282e4da8910f 100644 (file)
@@ -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 {
index fdaa22aa9efb868b1b4da4206cc4ef525f81da37..c097a0262f06f908189ed89477c0ea545dd55336 100644 (file)
@@ -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";
index aeeb43b9b40f2de330286349830929a8154d30e2..9a56c2d04c8fefc62aeead2f52da0bc1e6a1b193 100644 (file)
@@ -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';
index bffb1768b9e57cafcd135b16a69b8232296480da..c09afde083da9d1f6ec6b73ed1cc9ac92d7f2817 100644 (file)
@@ -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";