[Bug 42126] New: t/db_dependent/00-strict.t not testing all perl files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42126 Bug ID: 42126 Summary: t/db_dependent/00-strict.t not testing all perl files Initiative type: --- Sponsorship --- status: Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Test Suite Assignee: chris@bigballofwax.co.nz Reporter: jonathan.druart@gmail.com QA Contact: testopia@bugs.koha-community.org First it lists explicitly the directories to process. Obviously it hasn't been kept up-to-date and some are missing (eg.booking). Also Koha is missing (!). Then we should process the files that are in the git repository, and use Koha::Devel::Files to list them. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42126 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42126 --- Comment #1 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 195617 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195617&action=edit Bug 42126: Make 00-strict.t run strict on all Perl files The current implementation is wrong: * we list explicitly the directories to process and it's not kept up-to-date (eg. booking and Koha are missing). * we should process the files that are in the git repository, and use Koha::Devel::Files to list them. This patch suggests to use git ls-files (through Koha::Devel::Files) and process them one by one. Also only call strict_ok instead of all_perl_files_ok. all_perl_files_ok was doing strict_ok and syntax_ok, but syntax_ok is doing a `perl -c` that is done in xt/pl_valid.t already We can ignore xt and t: the tests are... run by the test suite. On main: Files=1, Tests=1360, 287 wallclock secs ( 0.05 usr 0.02 sys + 1677.26 cusr 268.46 csys = 1945.79 CPU) real 4m46.741 all_perl_files_ok with t and xt: Files=1, Tests=3488, 884 wallclock secs ( 0.10 usr 0.01 sys + 3820.09 cusr 720.63 csys = 4540.83 CPU) real 14m44.086s all_perl_files_ok without t and xt: Files=1, Tests=2666, 586 wallclock secs ( 0.08 usr 0.03 sys + 2261.22 cusr 447.02 csys = 2708.35 CPU) 9m46.519s With this patch (syntax_ok without t and xt): Files=1, Tests=2663, 337 wallclock secs ( 0.09 usr 0.01 sys + 76.18 cusr 70.32 csys = 146.60 CPU) real 5m36.870s Note that Koha/Account/Credit.pm, Koha/Account/Debit.pm and Koha/Old/Hold.pm are failing strict_ok, we ignore them for now: Inconsistent hierarchy during C3 merge of class 'Koha::Account::Credit': current merge results [ Koha::Account::Credit, ] merging failed on 'Koha::Account::Line' at /usr/lib/x86_64-linux-gnu/perl-base/base.pm line 186. BEGIN failed--compilation aborted at Koha/Account/Credit.pm line 22. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42126 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maurice@biblibre.com --- Comment #2 from Jonathan Druart <jonathan.druart@gmail.com> --- *** Bug 37245 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42126 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #195617|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42126 --- Comment #3 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 195619 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195619&action=edit Bug 42126: Make 00-strict.t run strict on all Perl files The current implementation is wrong: * we list explicitly the directories to process and it's not kept up-to-date (eg. booking and Koha are missing). * we should process the files that are in the git repository, and use Koha::Devel::Files to list them. This patch suggests to use git ls-files (through Koha::Devel::Files) and process them one by one. Also only call strict_ok instead of all_perl_files_ok. all_perl_files_ok was doing strict_ok and syntax_ok, but syntax_ok is doing a `perl -c` that is done in xt/pl_valid.t already We can ignore xt and t: the tests are... run by the test suite. On main: Files=1, Tests=1360, 287 wallclock secs ( 0.05 usr 0.02 sys + 1677.26 cusr 268.46 csys = 1945.79 CPU) real 4m46.741 all_perl_files_ok with t and xt: Files=1, Tests=3488, 884 wallclock secs ( 0.10 usr 0.01 sys + 3820.09 cusr 720.63 csys = 4540.83 CPU) real 14m44.086s all_perl_files_ok without t and xt: Files=1, Tests=2666, 586 wallclock secs ( 0.08 usr 0.03 sys + 2261.22 cusr 447.02 csys = 2708.35 CPU) 9m46.519s With this patch (syntax_ok without t and xt): Files=1, Tests=2663, 337 wallclock secs ( 0.09 usr 0.01 sys + 76.18 cusr 70.32 csys = 146.60 CPU) real 5m36.870s Note that Koha/Account/Credit.pm, Koha/Account/Debit.pm and Koha/Old/Hold.pm are failing strict_ok, we ignore them for now: Inconsistent hierarchy during C3 merge of class 'Koha::Account::Credit': current merge results [ Koha::Account::Credit, ] merging failed on 'Koha::Account::Line' at /usr/lib/x86_64-linux-gnu/perl-base/base.pm line 186. BEGIN failed--compilation aborted at Koha/Account/Credit.pm line 22. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42126 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42126 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #195619|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42126 --- Comment #4 from David Nind <david@davidnind.com> --- Created attachment 195684 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195684&action=edit Bug 42126: Make 00-strict.t run strict on all Perl files The current implementation is wrong: * we list explicitly the directories to process and it's not kept up-to-date (eg. booking and Koha are missing). * we should process the files that are in the git repository, and use Koha::Devel::Files to list them. This patch suggests to use git ls-files (through Koha::Devel::Files) and process them one by one. Also only call strict_ok instead of all_perl_files_ok. all_perl_files_ok was doing strict_ok and syntax_ok, but syntax_ok is doing a `perl -c` that is done in xt/pl_valid.t already We can ignore xt and t: the tests are... run by the test suite. On main: Files=1, Tests=1360, 287 wallclock secs ( 0.05 usr 0.02 sys + 1677.26 cusr 268.46 csys = 1945.79 CPU) real 4m46.741 all_perl_files_ok with t and xt: Files=1, Tests=3488, 884 wallclock secs ( 0.10 usr 0.01 sys + 3820.09 cusr 720.63 csys = 4540.83 CPU) real 14m44.086s all_perl_files_ok without t and xt: Files=1, Tests=2666, 586 wallclock secs ( 0.08 usr 0.03 sys + 2261.22 cusr 447.02 csys = 2708.35 CPU) 9m46.519s With this patch (syntax_ok without t and xt): Files=1, Tests=2663, 337 wallclock secs ( 0.09 usr 0.01 sys + 76.18 cusr 70.32 csys = 146.60 CPU) real 5m36.870s Note that Koha/Account/Credit.pm, Koha/Account/Debit.pm and Koha/Old/Hold.pm are failing strict_ok, we ignore them for now: Inconsistent hierarchy during C3 merge of class 'Koha::Account::Credit': current merge results [ Koha::Account::Credit, ] merging failed on 'Koha::Account::Line' at /usr/lib/x86_64-linux-gnu/perl-base/base.pm line 186. BEGIN failed--compilation aborted at Koha/Account/Credit.pm line 22. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42126 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #5 from David Nind <david@davidnind.com> --- Testing notes (using KTD): 1. Test results before the patch: prove t/db_dependent/00-strict.t t/db_dependent/00-strict.t .. ok All tests successful. Files=1, Tests=1357, 188 wallclock secs ( 0.04 usr 0.01 sys + 1200.46 cusr 171.85 csys = 1372.36 CPU) Result: PASS 2. Test results after the patch: prove t/db_dependent/00-strict.t t/db_dependent/00-strict.t .. ok All tests successful. Files=1, Tests=2663, 171 wallclock secs ( 0.04 usr 0.01 sys + 137.29 cusr 91.32 csys = 228.66 CPU) Result: PASS Not getting any test failures. Feel free to change back to needs sign off if it isn't sufficient (or details on what to do to reproduce the error/results in the test plan). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42126 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |baptiste.wojtkowski@biblibr |y.org |e.com Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42126 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #195684|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42126 --- Comment #6 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- Created attachment 197008 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197008&action=edit Bug 42126: Make 00-strict.t run strict on all Perl files The current implementation is wrong: * we list explicitly the directories to process and it's not kept up-to-date (eg. booking and Koha are missing). * we should process the files that are in the git repository, and use Koha::Devel::Files to list them. This patch suggests to use git ls-files (through Koha::Devel::Files) and process them one by one. Also only call strict_ok instead of all_perl_files_ok. all_perl_files_ok was doing strict_ok and syntax_ok, but syntax_ok is doing a `perl -c` that is done in xt/pl_valid.t already We can ignore xt and t: the tests are... run by the test suite. On main: Files=1, Tests=1360, 287 wallclock secs ( 0.05 usr 0.02 sys + 1677.26 cusr 268.46 csys = 1945.79 CPU) real 4m46.741 all_perl_files_ok with t and xt: Files=1, Tests=3488, 884 wallclock secs ( 0.10 usr 0.01 sys + 3820.09 cusr 720.63 csys = 4540.83 CPU) real 14m44.086s all_perl_files_ok without t and xt: Files=1, Tests=2666, 586 wallclock secs ( 0.08 usr 0.03 sys + 2261.22 cusr 447.02 csys = 2708.35 CPU) 9m46.519s With this patch (syntax_ok without t and xt): Files=1, Tests=2663, 337 wallclock secs ( 0.09 usr 0.01 sys + 76.18 cusr 70.32 csys = 146.60 CPU) real 5m36.870s Note that Koha/Account/Credit.pm, Koha/Account/Debit.pm and Koha/Old/Hold.pm are failing strict_ok, we ignore them for now: Inconsistent hierarchy during C3 merge of class 'Koha::Account::Credit': current merge results [ Koha::Account::Credit, ] merging failed on 'Koha::Account::Line' at /usr/lib/x86_64-linux-gnu/perl-base/base.pm line 186. BEGIN failed--compilation aborted at Koha/Account/Credit.pm line 22. Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42126 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|chris@bigballofwax.co.nz |jonathan.druart@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42126 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |26.05.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42126 --- Comment #7 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 26.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42126 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Pushed to stable Version(s)|26.05.00 |26.05.00,25.11.05 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42126 --- Comment #8 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Thanks all, pushed to 25.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42126 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |42937 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42937 [Bug 42937] `$Test::Strict::TEST_STRICT = 0;` no longer needed in t/db_dependent/00-strict.t -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org