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

(-)a/C4/Installer/PerlDependencies.pm (+5 lines)
Lines 732-737 our $PERL_DEPS = { Link Here
732
        'required' => '0',
732
        'required' => '0',
733
        'min_ver'  => '0.31',
733
        'min_ver'  => '0.31',
734
    },
734
    },
735
    'Devel::Cover' => {
736
        'usage'    => 'Test code coverage',
737
        'required' => '0',
738
        'min_ver'  => '1.17',
739
    },
735
};
740
};
736
741
737
1;
742
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