about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-11-29 10:14:09 +0000
committerEric Wong <e@80x24.org>2019-12-11 08:10:27 +0000
commit48282c640eb4871f8fa07ea2ea06a2ef0e16535f (patch)
tree54e1fe2ac57cb376ef02f6f7515e0ed13eb46665 /t
parente4d3be19612b20829426b129a2e1fb2316d38473 (diff)
downloadpublic-inbox-48282c640eb4871f8fa07ea2ea06a2ef0e16535f.tar.gz
We can localize changes to $0 so $0 is restored when the
"script" sub is done.  This will be helpful when we encounter
a stuck/slow processes during our tests (hopefully never!)
Diffstat (limited to 't')
-rw-r--r--t/common.perl1
1 files changed, 1 insertions, 0 deletions
diff --git a/t/common.perl b/t/common.perl
index 0ff5de4a..288a0a19 100644
--- a/t/common.perl
+++ b/t/common.perl
@@ -171,6 +171,7 @@ sub run_script ($;$$) {
                 local *STDERR = *STDERR;
                 local %ENV = $env ? (%ENV, %$env) : %ENV;
                 local %SIG = %SIG;
+                local $0 = join(' ', @$cmd);
                 _prepare_redirects($fhref);
                 _run_sub($sub, $key, \@argv);
         }