* [PATCH 0/2] tiny fixes to comments
@ 2020-04-07 21:55 4% Eric Wong
2020-04-07 21:55 7% ` [PATCH 1/2] tests: document run_mode=1 as not implemented Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2020-04-07 21:55 UTC (permalink / raw)
To: meta
I think all the documentation for users is free of errors,
so start ficksing r comments so other hackers don't think
were ulliter8.
Eric Wong (2):
tests: document run_mode=1 as not implemented
triewyde: ficks soem speling errrors
lib/PublicInbox/DS.pm | 2 +-
lib/PublicInbox/Hval.pm | 2 +-
lib/PublicInbox/MsgTime.pm | 2 +-
lib/PublicInbox/SearchIdx.pm | 2 +-
lib/PublicInbox/SearchThread.pm | 2 +-
lib/PublicInbox/TestCommon.pm | 6 +++---
lib/PublicInbox/View.pm | 2 +-
t/data/0001.patch | 2 +-
t/httpd-corner.t | 2 +-
t/mda.t | 2 +-
t/nntpd.t | 2 +-
t/run.perl | 2 +-
t/search.t | 2 +-
13 files changed, 15 insertions(+), 15 deletions(-)
^ permalink raw reply [relevance 4%]
* [PATCH 1/2] tests: document run_mode=1 as not implemented
2020-04-07 21:55 4% [PATCH 0/2] tiny fixes to comments Eric Wong
@ 2020-04-07 21:55 7% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2020-04-07 21:55 UTC (permalink / raw)
To: meta
It was implemented at some point, but it was more things to
support and the worst of both worlds: both unrealistic compared
to real-world use and slower than run_mode=2.
Noticed while looking for speling erorrs.
---
lib/PublicInbox/TestCommon.pm | 6 +++---
t/nntpd.t | 2 +-
t/run.perl | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/PublicInbox/TestCommon.pm b/lib/PublicInbox/TestCommon.pm
index 386610ff..6e3e9d8c 100644
--- a/lib/PublicInbox/TestCommon.pm
+++ b/lib/PublicInbox/TestCommon.pm
@@ -119,11 +119,11 @@ sub _undo_redirects ($) {
}
}
-# $opt->{run_mode} (or $ENV{TEST_RUN_MODE}) allows chosing between
+# $opt->{run_mode} (or $ENV{TEST_RUN_MODE}) allows choosing between
# three ways to spawn our own short-lived Perl scripts for testing:
#
# 0 - (fork|vfork) + execve, the most realistic but slowest
-# 1 - preloading and running in a forked subprocess (fast)
+# 1 - (not currently implemented)
# 2 - preloading and running in current process (slightly faster than 1)
#
# 2 is not compatible with scripts which use "exit" (which we'll try to
@@ -247,7 +247,7 @@ sub wait_for_tail () { sleep(2) }
sub start_script {
my ($cmd, $env, $opt) = @_;
my ($key, @argv) = @$cmd;
- my $run_mode = $ENV{TEST_RUN_MODE} // $opt->{run_mode} // 1;
+ my $run_mode = $ENV{TEST_RUN_MODE} // $opt->{run_mode} // 2;
my $sub = $run_mode == 0 ? undef : key2sub($key);
my $tail_pid;
if (my $tail_cmd = $ENV{TAIL}) {
diff --git a/t/nntpd.t b/t/nntpd.t
index 89085049..43b14d66 100644
--- a/t/nntpd.t
+++ b/t/nntpd.t
@@ -301,7 +301,7 @@ Date: Fri, 02 Oct 1993 00:00:00 +0000
is($? >> 8, 0, 'no errors');
}
SKIP: {
- if ($INC{'Search/Xapian.pm'} && ($ENV{TEST_RUN_MODE}//1)) {
+ if ($INC{'Search/Xapian.pm'} && ($ENV{TEST_RUN_MODE}//2)) {
skip 'Search/Xapian.pm pre-loaded (by t/run.perl?)', 1;
}
my @of = `lsof -p $td->{pid} 2>/dev/null`;
diff --git a/t/run.perl b/t/run.perl
index 3e6801f2..017ca3e8 100755
--- a/t/run.perl
+++ b/t/run.perl
@@ -26,7 +26,7 @@ GetOptions('j|jobs=i' => \$jobs,
'log=s' => \$log_suffix,
's|shuffle' => \$shuffle,
) or die "Usage: $0 [-j JOBS] [--log=SUFFIX] [--repeat RUNS]";
-if (($ENV{TEST_RUN_MODE} // 1) == 0) {
+if (($ENV{TEST_RUN_MODE} // 2) == 0) {
die "$0 is not compatible with TEST_RUN_MODE=0\n";
}
my @tests = scalar(@ARGV) ? @ARGV : glob('t/*.t');
^ permalink raw reply related [relevance 7%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2020-04-07 21:55 4% [PATCH 0/2] tiny fixes to comments Eric Wong
2020-04-07 21:55 7% ` [PATCH 1/2] tests: document run_mode=1 as not implemented Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).