[Bug 13899] New: Adding misc/devel/coverage.pl, a script making a cover on all modules to see which ones are not tested yet.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13899 Bug ID: 13899 Summary: Adding misc/devel/coverage.pl, a script making a cover on all modules to see which ones are not tested yet. Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: enhancement Priority: P5 - low Component: Test Suite Assignee: julian.fiol@biblibre.com Reporter: julian.fiol@biblibre.com QA Contact: gmcharlt@gmail.com Adding misc/devel/coverage.pl, a script making a cover on all modules to see which ones are not tested yet. It uses Devel::Cover -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13899 --- Comment #1 from Julian FIOL <julian.fiol@biblibre.com> --- Created attachment 37176 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=37176&action=edit Bug 13899 : Adding misc/devel/coverage.pl, a script making a cover on all modules to see which ones are not tested yet. It uses Devel::Cover -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13899 Julian FIOL <julian.fiol@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #37176|0 |1 is obsolete| | --- Comment #2 from Julian FIOL <julian.fiol@biblibre.com> --- Created attachment 37178 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=37178&action=edit Bug 13899 : Adding misc/devel/coverage.pl It's a script making a cover on all modules to see which ones are not tested yet. It uses Devel::Cover -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13899 Julian FIOL <julian.fiol@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13899 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maurice@biblibre.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13899 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@biblibre.co | |m Status|Needs Signoff |Failed QA --- Comment #3 from Jonathan Druart <jonathan.druart@biblibre.com> --- Julian, 1/ I would suggest you to replace $sth = $dbh->prepare($query); $sth->execute($biblionumber1, $status); $count = $sth->fetchrow_array; with a call to $dbh->selectrow_array 2/ use perltidy on new file. 3/ use the qa script to catch the trailing spaces -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13899 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #4 from Jonathan Druart <jonathan.druart@biblibre.com> --- Sorry, wrong bug report :-/ -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13899 --- Comment #5 from Jonathan Druart <jonathan.druart@biblibre.com> --- Comment on attachment 37178 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=37178 Bug 13899 : Adding misc/devel/coverage.pl Review of attachment 37178: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=13899&attachment=37178) ----------------------------------------------------------------- And please run perltidy on new files. ::: misc/devel/coverage.pl @@ +34,5 @@
+use C4::Context; + +my $KOHA_PATH = C4::Context->config("intranetdir"); + +chdir $KOHA_PATH;
I would not do that, I'd prefer compare getcwd and intranetdir. If they differ, raise an error. @@ +37,5 @@
+ +chdir $KOHA_PATH; + +eval{ + require Devel::Cover;
Add it to the list of deps (see C4/Installer/PerlDependencies.pm). @@ +41,5 @@
+ require Devel::Cover; +}; + +if ($@) { + say "Devel::Cover needs to be installed";
And don't catch the deps error. @@ +49,5 @@
+#Delete old coverage +system("cover -delete"); + +#Start the cover +system("PERL5OPT=-MDevel::Cover /usr/bin/prove -r t/");
What about existing PERL5OPT? Have a look at prove -M -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13899 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13899 Julian FIOL <julian.fiol@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13899 Julian FIOL <julian.fiol@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13899 --- Comment #6 from Julian FIOL <julian.fiol@biblibre.com> --- Created attachment 37905 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=37905&action=edit Bug 13899 : Add changes as asked in Comment 5 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13899 Julian FIOL <julian.fiol@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13899 --- Comment #7 from Marc Véron <veron@veron.ch> --- Created attachment 38181 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38181&action=edit Bug 13889 - Add information about cron jobs to system log This patch adds information about cron jobs performed and make it viewable under Home > Tools > Logs ("Browse system logs") To test: Apply patch - Got to system preferences and set 'CronjobLog' to: [Log] information from cron jobs. - Run some cron jobs - Go to Home > Tools > Logs - Verify that you have a selection 'Cron jobs' in drop-down 'Module'. Select it with Action "All" and Submit. - Output should show Date/time and info about Cron jobs Rebased to work on top of Bug 6911 (conflict in viewlog.tt) /MV Rebased after applying patch for Bug 6911 /MV Conflicts resolved: misc/cronjobs/overdue_notices.pl misc/cronjobs/cleanup_database.pl Signed-off-by: Frederic Demians <f.demians@tamil.fr> - Merge both patches, and fix updatedatabase.pl - Works as described. Provide intersting feedback from cronjob scripts. -- Modified version taking in account syspref CronJobLog. Handling simplified by introducing a convenience sub cronlogaction in C4/Log.pm /MV Amended to take in account comments #11, #12, #13 /MV -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13899 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |veron@veron.ch Attachment #38181|0 |1 is obsolete| | --- Comment #8 from Marc Véron <veron@veron.ch> --- Comment on attachment 38181 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38181 Bug 13889 - Add information about cron jobs to system log Sorryfor the noize, I mistaked with the bug number. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13899 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |bgkriegel@gmail.com --- Comment #9 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- As Jonathan said, run koha-qa FAIL misc/devel/coverage.pl OK critic FAIL forbidden patterns forbidden pattern: Koha is now under the GPLv3 license (line 8) OK pod OK valid -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13899 Julian FIOL <julian.fiol@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13899 --- Comment #10 from Julian FIOL <julian.fiol@biblibre.com> --- Created attachment 38529 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38529&action=edit Bug 13899 : Changing license to GPLv3 koha-qa should be good : OK misc/devel/coverage.pl OK critic OK forbidden patterns OK pod OK valid OK C4/Installer/PerlDependencies.pm OK critic OK forbidden patterns OK pod OK valid -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13899 Julian FIOL <julian.fiol@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #38529|0 |1 is obsolete| | --- Comment #11 from Julian FIOL <julian.fiol@biblibre.com> --- Created attachment 38530 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38530&action=edit Bug 13899 : Changing license to GPLv3 koha-qa should be good : OK misc/devel/coverage.pl OK critic OK forbidden patterns OK pod OK valid OK C4/Installer/PerlDependencies.pm OK critic OK forbidden patterns OK pod OK valid -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13899 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #37178|0 |1 is obsolete| | --- Comment #12 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 38888 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38888&action=edit [SIGNED-OFF] Bug 13899: Adding misc/devel/coverage.pl It's a script making a cover on all modules to see which ones are not tested yet. It uses Devel::Cover Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13899 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #37905|0 |1 is obsolete| | --- Comment #13 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 38889 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38889&action=edit [SIGNED-OFF] Bug 13899: Add changes as asked in Comment 5 Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Fixed a small conflict on PerlDependencies.pm -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13899 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #38530|0 |1 is obsolete| | --- Comment #14 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 38890 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38890&action=edit [SIGNED-OFF] Bug 13899: Changing license to GPLv3 koha-qa should be good : OK misc/devel/coverage.pl OK critic OK forbidden patterns OK pod OK valid OK C4/Installer/PerlDependencies.pm OK critic OK forbidden patterns OK pod OK valid Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> No koha-qa errors. Test plan not explicitly stated, script run and generates a lot of data :) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13899 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13899 --- Comment #15 from Julian FIOL <julian.fiol@biblibre.com> --- Test Plan --------- 1. Go to your koha/src directory 2. Launch misc/devel/coverage.pl script 3. After a pretty long time it will generate an html file (path given at the end of execution). It something like [...]/koha/src/cover_db/coverage.html 4. This html file give you a lot of information about coverage of koha modules I use it to see which module are not coverage by unit tests and improve it -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13899 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13899 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #38888|0 |1 is obsolete| | Attachment #38889|0 |1 is obsolete| | Attachment #38890|0 |1 is obsolete| | --- Comment #16 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 38977 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38977&action=edit [PASSED QA] Bug 13899: Adding misc/devel/coverage.pl It's a script making a cover on all modules to see which ones are not tested yet. It uses Devel::Cover Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13899 --- Comment #17 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 38978 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38978&action=edit [PASSED QA] Bug 13899: Add changes as asked in Comment 5 Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Fixed a small conflict on PerlDependencies.pm Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13899 --- Comment #18 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 38979 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38979&action=edit [PASSED QA] Bug 13899: Changing license to GPLv3 koha-qa should be good : OK misc/devel/coverage.pl OK critic OK forbidden patterns OK pod OK valid OK C4/Installer/PerlDependencies.pm OK critic OK forbidden patterns OK pod OK valid Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> No koha-qa errors. Test plan not explicitly stated, script run and generates a lot of data :) Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13899 --- Comment #19 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 39531 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39531&action=edit Bug 13899: (QA followup) POD and usage message fixes Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> asd -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13899 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |tomascohen@gmail.com --- Comment #20 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Tool pushed to master. Thanks Julian! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13899 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |14283 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org