3 # This file is part of Koha.
5 # Koha is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
10 # Koha is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with Koha; if not, see <http://www.gnu.org/licenses>.
28 00-load.t: This script is called by the pre-commit git hook to test modules compile
32 my $context_module = t
::lib
::Mocks
::mock_dbh
;
34 # Loop through the C4:: modules
35 my $lib = File
::Spec
->rel2abs('C4');
41 return unless $m =~ s/[.]pm$//;
43 $m =~ s{^.*/C4/}{C4/};
45 return if $m =~ /Auth_with_ldap/; # Dont test this, it will fail on use
46 return if $m =~ /SIPServer/; # SIP Server module has old package usage
47 use_ok
($m) || BAIL_OUT
("***** PROBLEMS LOADING FILE '$m'");
51 # Loop through the Koha:: modules
52 $lib = File
::Spec
->rel2abs('Koha');
59 return unless $m =~ s/[.]pm$//;
60 $m =~ s{^.*/Koha/}{Koha/};
62 return if $m =~ /Koha::NorwegianPatronDB/; # uses non-mandatory modules
63 use_ok
($m) || BAIL_OUT
("***** PROBLEMS LOADING FILE '$m'");