X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FBackgroundJob%2FSelfTest.pm;h=b715f9e07d11605b554888dde60a0cd2d17caf66;hb=e0fb092b1a1ac0429036b41abc0a85a011e0d9a8;hp=d341e64dfa8383c161c39bc5597f26f72b7370ae;hpb=5142828d6dea553b3e54e936a2f1af368170f660;p=kivitendo-erp.git diff --git a/SL/BackgroundJob/SelfTest.pm b/SL/BackgroundJob/SelfTest.pm index d341e64df..b715f9e07 100644 --- a/SL/BackgroundJob/SelfTest.pm +++ b/SL/BackgroundJob/SelfTest.pm @@ -26,7 +26,7 @@ use Rose::Object::MakeMethods::Generic ( 'add_full_diag' => { interface => 'add', hash_key => 'full_diag' }, ], scalar => [ - qw(diag tester config aggreg), + qw(diag tester config aggreg module_nr), ], ); @@ -88,6 +88,9 @@ sub run_module { $module =~ s/[^\w:]//g; $module = "SL::BackgroundJob::SelfTest::$module"; + # increase module nr + $self->module_nr(($self->module_nr || 0) + 1); + # try to load module; (my $file = $module) =~ s|::|/|g; eval { @@ -103,7 +106,7 @@ sub run_module { } or $self->add_errors($::locale->text('Could not load class #1, #2', $module, $@)) && return; $self->add_full_diag($output); - $self->{diag_per_module}{$module} = $output; + $self->{diag_per_module}{$self->module_nr . ': ' . $module} = $output; my $parser = TAP::Parser->new({ tap => $output}); $parser->run; @@ -188,14 +191,4 @@ SL::BackgroundJob::SelfTest - pluggable self testing use SL::BackgroundJob::SelfTest; SL::BackgroundJob::SelfTest->new->run;; -=head1 DESCRIPTION - - - -=head1 FUNCTIONS - -=head1 BUGS - -=head1 AUTHOR - =cut