View | Details | Raw Unified | Return to bug 13899
Collapse All | Expand All

(-)a/C4/Installer/PerlDependencies.pm (+6 lines)
Lines 742-747 our $PERL_DEPS = { Link Here
742
        'required' => '0',
742
        'required' => '0',
743
        'min_ver'  => '5.61',
743
        'min_ver'  => '5.61',
744
    },
744
    },
745
    'Devel::Cover' => {
746
        'usage'    => 'Test code coverage',
747
        'required' => '0',
748
        'min_ver'  => '1.17',
749
    },
750
745
};
751
};
746
752
747
1;
753
1;
(-)a/misc/devel/coverage.pl (-15 / +8 lines)
Lines 22-27 coverage.pl Link Here
22
22
23
=head1 SYNOPSIS
23
=head1 SYNOPSIS
24
24
25
You have to be in yout Koha/src directory
25
./misc/devel/coverage.pl
26
./misc/devel/coverage.pl
26
27
27
=head1 DESCRIPTION
28
=head1 DESCRIPTION
Lines 32-52 This script make a cover on all files to see which modules are not tested yet Link Here
32
33
33
use Modern::Perl;
34
use Modern::Perl;
34
use C4::Context;
35
use C4::Context;
36
use Cwd;
35
37
38
#Die if you are not in your Koha src directory
36
my $KOHA_PATH = C4::Context->config("intranetdir");
39
my $KOHA_PATH = C4::Context->config("intranetdir");
40
die "ERROR : You are not in Koha src/ directory"
41
  unless $KOHA_PATH eq getcwd;
37
42
38
chdir $KOHA_PATH;
43
# Delete old coverage
39
40
eval{
41
	require Devel::Cover;
42
};
43
44
if ($@) {
45
	say "Devel::Cover needs to be installed";
46
	exit 1;
47
}
48
49
#Delete old coverage
50
system("cover -delete");
44
system("cover -delete");
51
45
52
#Start the cover
46
#Start the cover
Lines 54-58 system("PERL5OPT=-MDevel::Cover /usr/bin/prove -r t/"); Link Here
54
48
55
#Create the HTML output
49
#Create the HTML output
56
system("cover");
50
system("cover");
57
51
say("file://$KOHA_PATH/cover_db/coverage.html")
58
say("file://$KOHA_PATH/cover_db/coverage.html");
52
  unless !-e "$KOHA_PATH/cover_db/coverage.html";
59
- 

Return to bug 13899