Lines 11-39
use Parallel::ForkManager;
Link Here
|
11 |
use Sys::CPU; |
11 |
use Sys::CPU; |
12 |
|
12 |
|
13 |
use lib("misc/translator"); |
13 |
use lib("misc/translator"); |
14 |
use lib("installer"); |
14 |
|
15 |
|
15 |
my @files = `git ls-files '*.pl' '*.PL' '*.pm' '*.psgi'`; |
16 |
my @dirs = ( |
16 |
chomp(@files); |
17 |
'acqui', 'admin', |
17 |
|
18 |
'authorities', 'basket', |
18 |
plan tests => scalar @files; |
19 |
'catalogue', 'cataloguing', |
|
|
20 |
'changelanguage.pl', 'circ', |
21 |
'debian', 'docs', |
22 |
'errors', 'fix-perl-path.PL', 'help.pl', |
23 |
'installer', 'kohaversion.pl', 'labels', |
24 |
'mainpage.pl', 'Makefile.PL', |
25 |
'members', 'misc', |
26 |
'offline_circ', 'opac', |
27 |
'patroncards', 'reports', |
28 |
'reserve', 'reviews', |
29 |
'rewrite-config.PL', 'rotating_collections', |
30 |
'serials', 'services', |
31 |
'skel', 'suggestion', |
32 |
'svc', 'tags', |
33 |
'tools', 'virtualshelves' |
34 |
); |
35 |
|
36 |
$Test::Strict::TEST_STRICT = 0; |
37 |
|
19 |
|
38 |
my $ncpu; |
20 |
my $ncpu; |
39 |
if ( $ENV{KOHA_PROVE_CPUS} ) { |
21 |
if ( $ENV{KOHA_PROVE_CPUS} ) { |
Lines 44-57
if ( $ENV{KOHA_PROVE_CPUS} ) {
Link Here
|
44 |
|
26 |
|
45 |
my $pm = Parallel::ForkManager->new($ncpu); |
27 |
my $pm = Parallel::ForkManager->new($ncpu); |
46 |
|
28 |
|
47 |
foreach my $d (@dirs) { |
29 |
foreach my $file (@files) { |
48 |
$pm->start and next; # do the fork |
30 |
$pm->start and next; # do the fork |
49 |
|
31 |
|
50 |
all_perl_files_ok($d); |
32 |
syntax_ok($file); |
51 |
|
33 |
|
52 |
$pm->finish; # do the exit in the child process |
34 |
$pm->finish; # do the exit in the child process |
53 |
} |
35 |
} |
54 |
|
36 |
|
55 |
$pm->wait_all_children; |
37 |
$pm->wait_all_children; |
56 |
|
|
|
57 |
done_testing(); |
58 |
- |