Bugzilla – Attachment 37905 Details for
Bug 13899
Adding misc/devel/coverage.pl, a script making a cover on all modules to see which ones are not tested yet.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13899 : Add changes as asked in Comment 5
Bug-13899--Add-changes-as-asked-in-Comment-5.patch (text/plain), 1.93 KB, created by
Julian FIOL
on 2015-04-15 12:19:13 UTC
(
hide
)
Description:
Bug 13899 : Add changes as asked in Comment 5
Filename:
MIME Type:
Creator:
Julian FIOL
Created:
2015-04-15 12:19:13 UTC
Size:
1.93 KB
patch
obsolete
>From a9acc29eaa1af123b2e1ecd6c3fa859dbcd1710b Mon Sep 17 00:00:00 2001 >From: Julian FIOL <julian.fiol@biblibre.com> >Date: Wed, 15 Apr 2015 10:51:16 +0200 >Subject: [PATCH] Bug 13899 : Add changes as asked in Comment 5 > >--- > C4/Installer/PerlDependencies.pm | 6 ++++++ > misc/devel/coverage.pl | 22 ++++++++-------------- > 2 files changed, 14 insertions(+), 14 deletions(-) > >diff --git a/C4/Installer/PerlDependencies.pm b/C4/Installer/PerlDependencies.pm >index 34cd8b5..ce44027 100644 >--- a/C4/Installer/PerlDependencies.pm >+++ b/C4/Installer/PerlDependencies.pm >@@ -742,6 +742,12 @@ our $PERL_DEPS = { > 'required' => '0', > 'min_ver' => '5.61', > }, >+ 'Devel::Cover' => { >+ 'usage' => 'Test code coverage', >+ 'required' => '0', >+ 'min_ver' => '1.17', >+ }, >+ > }; > > 1; >diff --git a/misc/devel/coverage.pl b/misc/devel/coverage.pl >index 804fc8d..f41c921 100755 >--- a/misc/devel/coverage.pl >+++ b/misc/devel/coverage.pl >@@ -22,6 +22,7 @@ coverage.pl > > =head1 SYNOPSIS > >+You have to be in yout Koha/src directory > ./misc/devel/coverage.pl > > =head1 DESCRIPTION >@@ -32,21 +33,14 @@ This script make a cover on all files to see which modules are not tested yet > > use Modern::Perl; > use C4::Context; >+use Cwd; > >+#Die if you are not in your Koha src directory > my $KOHA_PATH = C4::Context->config("intranetdir"); >+die "ERROR : You are not in Koha src/ directory" >+ unless $KOHA_PATH eq getcwd; > >-chdir $KOHA_PATH; >- >-eval{ >- require Devel::Cover; >-}; >- >-if ($@) { >- say "Devel::Cover needs to be installed"; >- exit 1; >-} >- >-#Delete old coverage >+# Delete old coverage > system("cover -delete"); > > #Start the cover >@@ -54,5 +48,5 @@ system("PERL5OPT=-MDevel::Cover /usr/bin/prove -r t/"); > > #Create the HTML output > system("cover"); >- >-say("file://$KOHA_PATH/cover_db/coverage.html"); >\ No newline at end of file >+say("file://$KOHA_PATH/cover_db/coverage.html") >+ unless !-e "$KOHA_PATH/cover_db/coverage.html"; >-- >2.3.3
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 13899
:
37176
|
37178
|
37905
|
38181
|
38529
|
38530
|
38888
|
38889
|
38890
|
38977
|
38978
|
38979
|
39531