This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch main
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=deb4cfe6071c27805fdb611b317096d97ebfdc41

commit deb4cfe6071c27805fdb611b317096d97ebfdc41
Author: Guillem Jover <[email protected]>
AuthorDate: Thu Jun 13 00:33:16 2024 +0200

    build: Workaround Tap::Harness verbose misbehavior on parallel mode
    
    The Tap::Harness module misbehaves when enabling both parallel and
    verbose mode, where the verbose output is eaten by some concurrency
    statistics output, and only the last test output is emitted.
    
    We set the formatter_class explicitly to the file formatter in case we
    are running in verbose and parallel modes as a workaround.
    
    Ref: https://github.com/Perl-Toolchain-Gang/Test-Harness/issues/105
---
 build-aux/test-runner | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/build-aux/test-runner b/build-aux/test-runner
index 73c33fbbb..d73369b27 100755
--- a/build-aux/test-runner
+++ b/build-aux/test-runner
@@ -13,6 +13,14 @@ $ENV{LC_ALL} = 'C';
 $ENV{DPKG_COLORS} = 'never';
 $ENV{PATH} = "$binroot/src:$binroot/scripts:$binroot/utils:$ENV{PATH}";
 
+my %options;
+# XXX: We need force the file formatter to workaround verbose + parallel
+# not working correctly, as the console formatter eats the test output,
+# see <https://github.com/Perl-Toolchain-Gang/Test-Harness/issues/105>.
+if ($ENV{TEST_VERBOSE} && $ENV{TEST_PARALLEL} > 1) {
+    $options{formatter_class} = 'TAP::Formatter::File';
+}
+
 my $harness = TAP::Harness->new({
     exec => sub {
         my (undef, $test) = @_;
@@ -27,6 +35,7 @@ my $harness = TAP::Harness->new({
     verbosity => $ENV{TEST_VERBOSE},
     jobs => $ENV{TEST_PARALLEL},
     failures => 1,
+    %options,
 });
 
 my $aggregate = $harness->runtests(@ARGV);

-- 
Dpkg.Org's dpkg

Reply via email to