MPMinus causes infinite loop
This commit is contained in:
parent
c55e88a37f
commit
821fe48a0f
5 changed files with 45 additions and 2 deletions
BIN
everything.stor
BIN
everything.stor
Binary file not shown.
|
@ -55,9 +55,10 @@ sub run_cpanm {
|
||||||
my @cmd = (qw/perlbrew exec --with/, $perlbrew_env, qw|cpanm --reinstall --verbose |, $module);
|
my @cmd = (qw/perlbrew exec --with/, $perlbrew_env, qw|cpanm --reinstall --verbose |, $module);
|
||||||
|
|
||||||
my $out;
|
my $out;
|
||||||
|
eval {
|
||||||
run \@cmd, '>&', \$out, timeout(10*60); # timeout after 10 minutes
|
run \@cmd, '>&', \$out, timeout(10*60); # timeout after 10 minutes
|
||||||
|
};
|
||||||
my $exitcode = $?;
|
my $exitcode = $@ || $?;
|
||||||
|
|
||||||
return ($exitcode, $out);
|
return ($exitcode, $out);
|
||||||
}
|
}
|
||||||
|
|
BIN
modcache.stor
BIN
modcache.stor
Binary file not shown.
29
progress2.pl
Executable file
29
progress2.pl
Executable file
|
@ -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;
|
||||||
|
|
||||||
|
};
|
13
setfailed.pl
Executable file
13
setfailed.pl
Executable file
|
@ -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';
|
Loading…
Add table
Reference in a new issue