diff --git a/everything.stor b/everything.stor index 683eef4..7108ea4 100644 Binary files a/everything.stor and b/everything.stor differ diff --git a/lib/TestCpanInc.pm b/lib/TestCpanInc.pm index 4a16010..d454d02 100644 --- a/lib/TestCpanInc.pm +++ b/lib/TestCpanInc.pm @@ -55,9 +55,10 @@ sub run_cpanm { my @cmd = (qw/perlbrew exec --with/, $perlbrew_env, qw|cpanm --reinstall --verbose |, $module); my $out; + eval { run \@cmd, '>&', \$out, timeout(10*60); # timeout after 10 minutes - - my $exitcode = $?; + }; + my $exitcode = $@ || $?; return ($exitcode, $out); } diff --git a/modcache.stor b/modcache.stor index 2125ed7..985f14b 100644 Binary files a/modcache.stor and b/modcache.stor differ diff --git a/progress2.pl b/progress2.pl new file mode 100755 index 0000000..040fbaa --- /dev/null +++ b/progress2.pl @@ -0,0 +1,29 @@ +#!/usr/bin/env perl + +use lib './lib'; +use strict; + +use Dist; +use Storable; +use Time::HiRes qw/time/; +use DateTime; + + +my $start_time = time(); +my $start_dt = DateTime->now(); +my $cache = retrieve $ARGV[0]; +my $first_count = 0+$cache->{jobstatus}->%*; +my $dists = 0+$cache->{modules}->@*; + +while (1) { + sleep(2); + my $cache = eval {retrieve $ARGV[0]}; + next unless $cache; + my $count = 0+$cache->{jobstatus}->%*; + + my $rate = ($count-$first_count)/(time()-$start_time); + my $tocomplete = ($rate == 0? sub{-1} : sub{($dists-$count)/$rate})->(); + my $final_dt = $start_dt->clone()->add(seconds => $tocomplete); + printf "%d/%d [%02.2f%%] %0.2f/s %s %0.2f\n", $count, $dists, 100*$count/$dists, $rate, $final_dt->iso8601, $tocomplete; + +}; diff --git a/setfailed.pl b/setfailed.pl new file mode 100755 index 0000000..79aad39 --- /dev/null +++ b/setfailed.pl @@ -0,0 +1,13 @@ +#!/usr/bin/env perl + +use 5.24.0; + +use Data::Dumper; +use Storable; + +my $data = retrieve $ARGV[0]; +my $module = $ARGV[1]; + +$data->{jobstatus}{$module}={tested => 2, status => "manual failure"}; + +store $data, $ARGV[0].'.new';