On 10/27/2011 11:51 AM, Dan Collins wrote:
Hey...that looks familiar...
All I can tell you is that when I was translating from File to Email,
that worked just fine. Here's the same script the way I
modified it for Metabase, but note that I have not been running the
CPAN Testers (as every time I try to update my minicpan, IT boots me
off the network...considering using a sneakernet minicpan but there's
a willpower factor involved...) and so it is not tested with versions
of Test::Reporter more recent than 1.57. At that time, though,
everything pretty much worked.

Yes, I started with your original email transport
script and was trying to get it working with
metabase transport instead.  The good news is that
although the tail log file seemed to be a bit
confused between the perl that was doing the
sending and the perl that had run the test,
it did seem to be sorted out in the results
list when it made it to www.cpantesters.org.

Sorry about not referencing starting from your
original email script from an earlier response
to my previous and apparently ongoing struggle
to get cpan testing working robustly for me.  :-)

Thanks much,
Chris

#!/usr/bin/perl -w
use Test::Reporter;

opendir(DIR, '/usr/share/reports');
@reports = grep { /^[^.]/&&  -f "/usr/share/reports/$_" } readdir(DIR);
closedir DIR;

foreach $file (@reports) {
         unless (-e "/usr/share/reports/$file") {next}
         $reporter=Test::Reporter->new();
         $reporter->transport('Metabase');
         $reporter->transport_args(uri =>
"https://metabase.cpantesters.org/api/v1/";, id_file =>
"/home/dcollins/dcollins.json");
         print "$file\n";
         eval('$report=$reporter->read("/usr/share/reports/perl5122/$file")');
         $error=$reporter->errstr();
         $error ? print $error."\n"&&  next : undef;
         `rm -f /usr/share/reports/$file`;
         eval('$retval=$report->send()');
         $error=$reporter->errstr();
         $error ? (print $error."\n") || last : undef;
}

On Thu, Oct 27, 2011 at 11:37 AM, Chris Marshall<devel.chm...@gmail.com>  wrote:
I'm trying to implement a way to submit CPAN Testers
reports generated offline from the report files.  Here
is the script I came up with and just tried.  The problem
is it appears from the tail/log.txt from the metabase site
that some of the information of the sending perl
instance (cygwin perl) may have gotten mixed in
with the information of the test report (asperl).  Is this
a bug in the metabase transport or is there something
else I need to add to make this work?

Thanks in advance,
Chris


-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1411 / Virus Database: 2092/3978 - Release Date: 10/27/11




Reply via email to