3 # Copyright 2015 BibLibre
5 # This file is part of Koha.
7 # Koha is free software; you can redistribute it and/or modify it under the
8 # terms of the GNU General Public License as published by the Free Software
9 # Foundation; either version 3 of the License, or (at your option) any later
12 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
13 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
14 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License along
17 # with Koha; if not, see <http://www.gnu.org/licenses>.
25 misc/devel/coverage.pl [-h|--help]
27 This script must be run from your Koha source tree.
31 This script runs all Koha tests and generates a coverage report on the
61 pod2usage
(1) if defined $help;
63 #Die if you are not in your Koha src directory
64 my $KOHA_PATH = C4
::Context
->config("intranetdir");
65 die "ERROR : You are not in Koha src/ directory"
66 unless $KOHA_PATH eq getcwd
;
69 system("cover -delete");
72 system("PERL5OPT=-MDevel::Cover /usr/bin/prove -r t/");
74 #Create the HTML output
76 say("file://$KOHA_PATH/cover_db/coverage.html")
77 unless !-e
"$KOHA_PATH/cover_db/coverage.html";