Bug 19532: (follow-up) aria-hidden attr on OPAC, and more
[koha.git] / t / db_dependent / 00-strict.t
1 #!/usr/bin/perl
2 # This script is called by the pre-commit git hook to test modules compile
3
4 use strict;
5 use warnings;
6
7 use threads;    # used for parallel
8 use Test::More;
9 use Test::Strict;
10 use Parallel::ForkManager;
11 use Sys::CPU;
12
13 use lib("misc/translator");
14 use lib("installer");
15
16 my @dirs = (
17     'acqui',             'admin',
18     'authorities',       'basket',
19     'catalogue',         'cataloguing',
20     'changelanguage.pl', 'circ',
21     'debian',            'docs',
22     'errors',            'fix-perl-path.PL', 'help.pl',
23     'installer',         'koha_perl_deps.pl',
24     'kohaversion.pl',    'labels',
25     'mainpage.pl',       'Makefile.PL',
26     'members',           'misc',
27     'offline_circ',      'opac',
28     'patroncards',       'reports',
29     'reserve',           'reviews',
30     'rewrite-config.PL', 'rotating_collections',
31     'serials',           'services',
32     'skel',              'suggestion',
33     'svc',               'tags',
34     'tools',             'virtualshelves'
35 );
36
37 $Test::Strict::TEST_STRICT = 0;
38
39 my $ncpu;
40 if ( $ENV{KOHA_PROVE_CPUS} ) {
41     $ncpu = $ENV{KOHA_PROVE_CPUS} ; # set number of cpus to use
42 } else {
43     $ncpu = Sys::CPU::cpu_count();
44 }
45
46 my $pm   = Parallel::ForkManager->new($ncpu);
47
48 foreach my $d (@dirs) {
49     $pm->start and next;    # do the fork
50
51     all_perl_files_ok($d);
52
53     $pm->finish;            # do the exit in the child process
54 }
55
56 $pm->wait_all_children;
57
58 done_testing();