# New Ticket Created by  Aleks-Daniel Jakimenko-Aleksejev 
# Please include the string:  [perl #132108]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=132108 >


When I'm running prove with more than one job (-j) I'm expecting to see the 
progress continuously. However, after the recent buffering change all you can 
see in prove is this:
===(       4;0  1/?  1/?  1/?  1/? )====================================^

In other words, 4 files are running but you can't see how many tests were done 
in each.

Compare it with output like this:

===(      27;4  8/?  9/?  4/?  6/? )====================================



**How to replicate:**

Create 8 files like this:

use Test;
for ^20 {
    sleep rand;
    is 42, 42, ‘42 is 42’;
}
done-testing;


Now run it with:

$ prove -j 4 --exec=perl6 t/



It can be “fixed” with a crude patch like this:

diff --git a/lib/Test.pm6 b/lib/Test.pm6
index ea4176a40..8ef52b9d0 100644
--- a/lib/Test.pm6
+++ b/lib/Test.pm6
@@ -39,6 +39,8 @@ my int $done_testing_has_been_run = 0;
 _init_vars();
 
 sub _init_io {
+    nqp::setbuffersizefh(nqp::getstdin(),  0);
+    nqp::setbuffersizefh(nqp::getstdout(), 0);
     $output         = $PROCESS::OUT;
     $failure_output = $PROCESS::ERR;
$todo_output = $PROCESS::OUT;



But is there any better way to do it?


See also:
* 
https://github.com/rakudo/rakudo/commit/4b02b8aadcb47072bc87fb8be8069177b74cd59d
* RT #132030 https://rt.perl.org/Ticket/Display.html?id=132030

Reply via email to