diff --git a/everything.stor b/everything.stor index ca5560d..a604943 100644 Binary files a/everything.stor and b/everything.stor differ diff --git a/fixfailed.pl b/fixfailed.pl new file mode 100755 index 0000000..32f8260 --- /dev/null +++ b/fixfailed.pl @@ -0,0 +1,18 @@ +#!/usr/bin/env perl + +use 5.24.0; + +use Data::Dumper; +use Storable; + +my $data = retrieve 'everything.stor'; +my $module = $ARGV[0]; + +for my $mod (keys $data->{jobstatus}->%*) { + $data->{jobstatus}{$module}{tested} = 1; # set pass to 1 +} + +# Remove invalid names from the list +$data->{modules} = [grep {m|[/ ]|} $data->{modules}-@*]; + +store $data, 'everything.stor'; diff --git a/run.pl b/run.pl index 7ac10b2..a8d1687 100755 --- a/run.pl +++ b/run.pl @@ -20,16 +20,20 @@ my $opt_cpanfile; my $opt_module; my $opt_help; my $opt_jobstor=''; +my $opt_pass=1; GetOptions ("module=s" => \$opt_module, "cpanfile=s" => \$opt_cpanfile, # string "perlbrew_env=s" => \$TestCpanInc::perlbrew_env, "jobstor=s" => \$opt_jobstor, + "pass=n" => \$opt_pass, "help" => \$opt_help); # flagV if ((!$opt_module && !$opt_cpanfile) || ($opt_module && $opt_cpanfile) || $opt_help) { print "Call with either --cpanfile xor --module to specify what to test.\n", - "Use --perlbrew_env to specify which perl install to use, defaults to blead\n"; + "Use --perlbrew_env to specify which perl install to use, defaults to blead\n", + "Add --jobstor to save progress for resuming, and examining later\n"; + "Use --pass to do another pass on the modules, defaults to 1, only reruns failures\n"; exit(1); } @@ -70,7 +74,8 @@ END {__save_cache}; for my $mod (@modules) { print "Testing $mod\n"; - unless ($jobstatus{$mod}{tested}) { + my $status = $jobstatus{$mod}{status} // ""; + unless ($jobstatus{$mod}{tested} == $opt_pass && ($status ne "success" || $status ne 'manual failure') ) { my $status = TestCpanInc::test_module($mod); $jobstatus{$mod}{tested} = 1; $jobstatus{$mod}{status} = $status;