about summary refs log tree commit homepage
path: root/lib/PublicInbox/TestCommon.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-04-22 05:44:16 -0400
committerEric Wong <e@80x24.org>2021-04-22 17:05:52 -0400
commit6840164c54895eee776f95ceaeae0fccab0880aa (patch)
tree9064365b65f4f5d3f4818c87329fd79d866dffed /lib/PublicInbox/TestCommon.pm
parent3a6e13b7f3cf04b9a3dd0fdd3ed4d96a05e31e9f (diff)
downloadpublic-inbox-6840164c54895eee776f95ceaeae0fccab0880aa.tar.gz
We'll support this mode of operation for now to quiet down
testing of oneshot mode where the daemon doesn't persist.
Diffstat (limited to 'lib/PublicInbox/TestCommon.pm')
-rw-r--r--lib/PublicInbox/TestCommon.pm9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/PublicInbox/TestCommon.pm b/lib/PublicInbox/TestCommon.pm
index 67fe6336..b5d0b9f8 100644
--- a/lib/PublicInbox/TestCommon.pm
+++ b/lib/PublicInbox/TestCommon.pm
@@ -468,7 +468,7 @@ sub have_xapian_compact () {
         PublicInbox::Spawn::which($ENV{XAPIAN_COMPACT} || 'xapian-compact');
 }
 
-our ($err_skip, $lei_opt, $lei_out, $lei_err);
+our ($lei_opt, $lei_out, $lei_err);
 # favor lei() or lei_ok() over $lei for new code
 sub lei (@) {
         my ($cmd, $env, $xopt) = @_;
@@ -478,8 +478,6 @@ sub lei (@) {
                 $cmd = [ grep { defined && !ref } @_ ];
         }
         my $res = run_script(['lei', @$cmd], $env, $xopt // $lei_opt);
-        $err_skip and
-                $lei_err = join('', grep(!/$err_skip/, split(/^/m, $lei_err)));
         if ($lei_err ne '') {
                 if ($lei_err =~ /Use of uninitialized/ ||
                         $lei_err =~ m!\bArgument .*? isn't numeric in !) {
@@ -570,10 +568,7 @@ EOM
                 my $home = "$tmpdir/lei-oneshot";
                 mkdir($home, 0700) or BAIL_OUT "mkdir: $!";
                 local $ENV{HOME} = $home;
-                # force sun_path[108] overflow:
-                my $xrd = "$home/1shot-test".('.sun_path' x 108);
-                local $err_skip = qr!\Q$xrd!; # for lei() filtering
-                local $ENV{XDG_RUNTIME_DIR} = $xrd;
+                local $ENV{XDG_RUNTIME_DIR} = '/dev/null';
                 $cb->();
         }
         if ($daemon_pid) {