|
Lines 20-26
Link Here
|
| 20 |
use strict; |
20 |
use strict; |
| 21 |
use warnings; |
21 |
use warnings; |
| 22 |
|
22 |
|
| 23 |
use threads; # used for parallel |
23 |
use Test2::IPC; # load early |
|
|
24 |
use Test2::Tools::Subtest qw/subtest_buffered/; |
| 25 |
|
| 24 |
use Parallel::ForkManager; |
26 |
use Parallel::ForkManager; |
| 25 |
use Sys::CPU; |
27 |
use Sys::CPU; |
| 26 |
|
28 |
|
|
Lines 34-40
This test checks all staff and OPAC templates and includes for syntax errors
Link Here
|
| 34 |
|
36 |
|
| 35 |
=cut |
37 |
=cut |
| 36 |
|
38 |
|
| 37 |
|
|
|
| 38 |
use File::Find; |
39 |
use File::Find; |
| 39 |
use File::Spec; |
40 |
use File::Spec; |
| 40 |
use Template; |
41 |
use Template; |
|
Lines 80-86
my $pm = new Parallel::ForkManager($ncpu);
Link Here
|
| 80 |
# Tests |
81 |
# Tests |
| 81 |
foreach my $theme ( @themes ) { |
82 |
foreach my $theme ( @themes ) { |
| 82 |
$pm->start and next; # do the fork |
83 |
$pm->start and next; # do the fork |
| 83 |
print "Testing $theme->{'type'} $theme->{'theme'} templates\n"; |
84 |
|
|
|
85 |
subtest_buffered "Testing $theme->{'type'} $theme->{'theme'} templates\n" => sub { |
| 84 |
if ( $theme->{'theme'} eq 'bootstrap' ) { |
86 |
if ( $theme->{'theme'} eq 'bootstrap' ) { |
| 85 |
run_template_test( |
87 |
run_template_test( |
| 86 |
$theme->{'modules'}, |
88 |
$theme->{'modules'}, |
|
Lines 97-102
foreach my $theme ( @themes ) {
Link Here
|
| 97 |
$theme->{'includes'}, |
99 |
$theme->{'includes'}, |
| 98 |
); |
100 |
); |
| 99 |
} |
101 |
} |
|
|
102 |
}; # ...end subtest |
| 103 |
|
| 100 |
$pm->finish; |
104 |
$pm->finish; |
| 101 |
} |
105 |
} |
| 102 |
|
106 |
|
| 103 |
- |
|
|