Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Test-Reporter CPAN distribution.

Report information
The Basics
Id: 89404
Status: resolved
Priority: 0/
Queue: Test-Reporter

People
Owner: Nobody in particular
Requestors: ANDK [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.59
Fixed in: (no value)



Subject: read() does not overwrite local archname
The following program prints the architecture on which Test::Reporter is running, not the one of the report (freebsd). This information is later used and passed on to metabase and e.g. log.txt reproduces it. This came to light today because I sent my first freebsd report from a linux box. So far the only effect I saw is in log.txt. Here is the short demo program: use File::Temp; use Test::Reporter; my($ft) = File::Temp->new(TEMPLATE => "bugdemo-XXXX", SUFFIX=>".rpt"); print $ft <<EOF; From: andreas.koenig.gmwojprw@franz.ak.mind.de X-Test-Reporter-Distfile: DLAND/BSD-Process-0.07.tar.gz X-Test-Reporter-Perl: v5.18.0 Subject: FAIL BSD-Process-0.07 amd64-freebsd 9.2-release Report: This distribution has been tested as part of the CPAN Testers project, supporting the Perl programming language. See http://wiki.cpantesters.org/ for more information or email questions to cpan-testers-discuss@perl.org -- Dear David Landgren, [...] Summary of my perl5 (revision 5 version 18 subversion 0) configuration: Commit id: a9acda3b5f74585852a57b51b724804ac586cb0b Platform: osname=freebsd, osvers=9.2-release, archname=amd64-freebsd EOF $ft->flush; my $file = $ft->filename; my $r = Test::Reporter->new( transport => 'Metabase', )->read($file); warn "archname: $r->{_perl_version}{_archname}\n";
I think the read() method needs to be improved, but I'm not sure where to regenerate the information. write() puts stuff in the filename, but I don't think read() is using it. I think bingos is using Test::Reporter::Transport::Socket to get reports from one machine to send on another. There probably needs to be a smarter transport than File -- possibly generating the Metabase fact locally and serializing *that* rather than a text report.
This looks like a fix. If you like it, I'll turn it into a pull request. --- lib/Test/Reporter.pm~ 2013-10-12 09:16:05.843564055 +0200 +++ lib/Test/Reporter.pm 2013-10-12 09:19:34.777442405 +0200 @@ -367,9 +367,10 @@ $self->{_from} = $content; } elsif ($header eq "Subject") { $self->{_subject} = $content; - my ($grade, $distribution) = (split /\s/, $content)[0,1]; + my ($grade, $distribution, $archname) = (split /\s/, $content)[0..2]; $self->{_grade} = lc $grade; $self->{_distribution} = $distribution; + $self->{_perl_version}{_archname} = $archname; $self->{_subject_lock} = 1; } elsif ($header eq "X-Test-Reporter-Distfile") { $self->{_distfile} = $content; Let me know...
Speaking of pull requests, I do not understand the github magicians, but others do not either. When I visit https://metacpan.org/release/Test-Reporter and hover over the Repository, then a lot of "undefined" pop up. Don't know whose bug it is and am now unsure against which repo I would produce the pull request. Please let me know. Thanks,
Subject: Re: [rt.cpan.org #89404] read() does not overwrite local archname
Date: Wed, 16 Oct 2013 10:38:18 -0400
To: bug-Test-Reporter [...] rt.cpan.org
From: David Golden <dagolden [...] cpan.org>
On Sat, Oct 12, 2013 at 3:40 AM, Andreas Koenig via RT <bug-Test-Reporter@rt.cpan.org> wrote: Show quoted text
> and hover over the Repository, then a lot of "undefined" pop up. Don't know whose bug it is and am now unsure against which repo I would produce the pull request. Please let me know.
The repo moved to the new CPAN Testers organization on github: https://github.com/cpan-testers/Test-Reporter After you send the PR, I'll merge and ship and the metadata will be caught up. Thank you! -- David Golden <dagolden@cpan.org> Take back your inbox! → http://www.bunchmail.com/ Twitter/IRC: @xdg
Fixed in the repo and will be shipped to CPAN.