Revision db468075
Von Jan Büren vor etwa 8 Jahren hinzugefügt
SL/BackgroundJob/SelfTest.pm | ||
---|---|---|
|
||
sub run {
|
||
my $self = shift;
|
||
my $db_obj = shift;
|
||
# options
|
||
my $options = $db_obj->data_as_hash;
|
||
$self->setup;
|
||
|
||
return 1 unless $self->modules;
|
||
|
||
|
||
$main::lxdebug->message(0, 'optioni' . Dumper($self->modules));
|
||
foreach my $module ($self->modules) {
|
||
next unless $module eq $options->{module};
|
||
$main::lxdebug->message(0, 'hieur' . $module);
|
||
$self->run_module($module);
|
||
}
|
||
|
||
... | ... | |
} or $self->add_errors($::locale->text('Could not load class #1 (#2): "#3"', $module, $file, $@)) && return;
|
||
|
||
eval {
|
||
my $worker = $module->new;
|
||
$worker->tester($self->tester);
|
||
|
||
$worker->run;
|
||
1;
|
||
$self->tester->subtest($module => sub {
|
||
$module->new->run;
|
||
});
|
||
1
|
||
} or $self->add_errors($::locale->text('Could not load class #1, #2', $module, $@)) && return;
|
||
|
||
$self->add_full_diag($output);
|
Auch abrufbar als: Unified diff
Mehr als eine SelfTest-Modul prüfen
Der Aufruf der SelfTest funktionierte nur für genau eine
Datei - Mit einer leicht anderen Aufruf-Syntax werden auch weitere
Tests durchgeführt.