[Bug 42937] New: Not testing 'strict' for perl?
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42937 Bug ID: 42937 Summary: Not testing 'strict' for perl? Initiative type: --- Sponsorship --- status: Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Test Suite Assignee: jonathan.druart@gmail.com Reporter: jonathan.druart@gmail.com QA Contact: testopia@bugs.koha-community.org Target Milestone: --- t/db_dependent/00-strict.t 22 $Test::Strict::TEST_STRICT = 0; 0? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42937 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Not testing 'strict' for |Not testing 'use strict' |perl? |for perl? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42937 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Not testing 'use strict' |`$Test::Strict::TEST_STRICT |for perl? |= 0;` no longer needed in | |t/db_dependent/00-strict.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42937 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=42937 --- Comment #1 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 201179 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201179&action=edit Bug 42937: Remove unneeded flag in 00-strict.t $Test::Strict::TEST_STRICT = 0 is only set for all_perl_files_ok It's no longer used since bug 42126 Test plan: prove t/db_dependent/00-strict.t should still return green Remove a use Modern::Perl for mainpage.pl => Should still return green -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42937 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |42126 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42126 [Bug 42126] t/db_dependent/00-strict.t not testing all perl files -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42937 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|major |trivial -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42937 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #2 from David Nind <david@davidnind.com> --- The tests fail for me after applying the patch and commenting out or removing the "use Modern::Perl;" in mainpage.pl. Is there something else I need to do after applying the patch and restarting everything? Or is this unrelated? Note that the tests pass before and after the patch if I don't make any changes to mainpage.pl. Before the patch, with "use Modern::Perl;" removed ================================================== prove t/db_dependent/00-strict.t t/db_dependent/00-strict.t .. 1/2745 # Failed test 'use strict mainpage.pl' # at t/db_dependent/00-strict.t line 36. # Looks like you failed 1 test of 2745. t/db_dependent/00-strict.t .. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/2745 subtests Test Summary Report ------------------- t/db_dependent/00-strict.t (Wstat: 256 (exited 1) Tests: 2745 Failed: 1) Failed test: 2261 Non-zero exit status: 1 Files=1, Tests=2745, 175 wallclock secs ( 0.05 usr 0.01 sys + 78.85 cusr 47.96 csys = 126.87 CPU) Result: FAIL After the patch with "use Modern::Perl;" removed ================================================ prove t/db_dependent/00-strict.t t/db_dependent/00-strict.t .. 1754/2745 # Failed test 'use strict mainpage.pl' # at t/db_dependent/00-strict.t line 34. # Looks like you failed 1 test of 2745. t/db_dependent/00-strict.t .. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/2745 subtests Test Summary Report ------------------- t/db_dependent/00-strict.t (Wstat: 256 (exited 1) Tests: 2745 Failed: 1) Failed test: 2261 Non-zero exit status: 1 Files=1, Tests=2745, 175 wallclock secs ( 0.05 usr 0.00 sys + 78.82 cusr 48.58 csys = 127.45 CPU) Result: FAIL -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42937 --- Comment #3 from Jonathan Druart <jonathan.druart@gmail.com> --- (In reply to David Nind from comment #2)
The tests fail for me after applying the patch and commenting out or removing the "use Modern::Perl;" in mainpage.pl.
Is there something else I need to do after applying the patch and restarting everything?
Nothing else, this is a correct test. This line does not do anything: there is no change expected. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42937 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=42937 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #201179|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=42937 --- Comment #4 from David Nind <david@davidnind.com> --- Created attachment 201262 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201262&action=edit Bug 42937: Remove unneeded flag in 00-strict.t $Test::Strict::TEST_STRICT = 0 is only set for all_perl_files_ok It's no longer used since bug 42126 Test plan: prove t/db_dependent/00-strict.t should still return green Remove a use Modern::Perl for mainpage.pl => Should still return green Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42937 --- Comment #5 from David Nind <david@davidnind.com> --- (In reply to Jonathan Druart from comment #3)
(In reply to David Nind from comment #2)
The tests fail for me after applying the patch and commenting out or removing the "use Modern::Perl;" in mainpage.pl.
Is there something else I need to do after applying the patch and restarting everything?
Nothing else, this is a correct test. This line does not do anything: there is no change expected.
I've signed off. What confused me was the test plan which said:
Remove a use Modern::Perl for mainpage.pl => Should still return green
When I did that, the tests fail. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42937 --- Comment #6 from Jonathan Druart <jonathan.druart@gmail.com> --- (In reply to David Nind from comment #5)
(In reply to Jonathan Druart from comment #3) What confused me was the test plan which said:
Remove a use Modern::Perl for mainpage.pl => Should still return green
When I did that, the tests fail.
Oops, sorry! The test plan is indeed wrong, it should have been: prove t/db_dependent/00-strict.t => should be green before and after the patch Remove a use Modern::Perl for mainpage.pl => should fail before and after the patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42937 --- Comment #7 from David Nind <david@davidnind.com> --- (In reply to Jonathan Druart from comment #6)
(In reply to David Nind from comment #5)
(In reply to Jonathan Druart from comment #3) What confused me was the test plan which said:
Remove a use Modern::Perl for mainpage.pl => Should still return green
When I did that, the tests fail.
Oops, sorry!
The test plan is indeed wrong, it should have been:
prove t/db_dependent/00-strict.t => should be green before and after the patch
Remove a use Modern::Perl for mainpage.pl => should fail before and after the patch
Makes sense now 8-) Thanks. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42937 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lisette@bywatersolutions.co | |m QA Contact|testopia@bugs.koha-communit |lisette@bywatersolutions.co |y.org |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42937 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #201262|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=42937 --- Comment #9 from Lisette Scheer <lisette@bywatersolutions.com> --- Created attachment 201835 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201835&action=edit Bug 42937: Remove unneeded flag in 00-strict.t $Test::Strict::TEST_STRICT = 0 is only set for all_perl_files_ok It's no longer used since bug 42126 Test plan: prove t/db_dependent/00-strict.t should still return green Remove a use Modern::Perl for mainpage.pl => Should still return green Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42937 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #8 from Lisette Scheer <lisette@bywatersolutions.com> --- Worked as expected. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org