small patch to add missing shebang line to ./t/00-check-atomic-updates.pl to test... 1/ run prove, test is not run :( prove ./t | grep 00-check-atomic-updates.pl | wc -l 0 2/ apply patch 3/ run prove, test is run :) prove ./t | grep 00-check-atomic-updates.pl | wc -l 2
Created attachment 137198 [details] [review] Bug 31108: add missing shebang line to ./t/00-check-atomic-updates.pl small patch to add missing shebang line to ./t/00-check-atomic-updates.pl to test... 1/ run prove, test is not run :( prove ./t | grep 00-check-atomic-updates.pl | wc -l 0 2/ apply patch 3/ run prove, test is run :) prove ./t | grep 00-check-atomic-updates.pl | wc -l 2
Why do we need it? It's missing in some other files. Why this path? % git grep '/usr/bin/perl' t|wc -l 486 % git grep '/usr/bin/env perl' t|wc -l 43
Created attachment 137203 [details] [review] Bug 31108: rename ./t/00-check-atomic-updates.pl extention to *.t to test... 1/ run prove, test is not run :( prove ./t | grep 00-check-atomic-updates.pl | wc -l 0 2/ apply patch 3/ run prove, test is run :) prove ./t | grep 00-check-atomic-updates.pl | wc -l 2
(In reply to Jonathan Druart from comment #2) > Why do we need it? ah, my mistake - the solution was to rename the file :)
Created attachment 137204 [details] [review] Bug 31108: rename ./t/00-check-atomic-updates.pl extension to *.t to test... 1/ run prove, test is not run :( prove ./t | grep 00-check-atomic-updates.pl | wc -l 0 2/ apply patch 3/ run prove, test is run :) prove ./t | grep 00-check-atomic-updates.t | wc -l 2
Created attachment 137206 [details] [review] Bug 31108: rename ./t/00-check-atomic-updates.pl extension to *.t to test... 1/ run prove, test is not run :( prove ./t | grep 00-check-atomic-updates.pl | wc -l 0 2/ apply patch 3/ run prove, test is run :) prove ./t | grep 00-check-atomic-updates.t | wc -l 2 Signed-off-by: David Nind <david@davidnind.com>
This is what I get after running step 1: prove ./t | grep 00-check-atomic-updates.pl | wc -l Use of uninitialized value $_ in pattern match (m//) at /usr/share/perl5/PPIx/Regexp/Structure/Quantifier.pm line 117. skipping ingest of QUOTES_413514.CEQ : filename exists at t/EdiTransport.t line 53. Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/MARC/File/XML.pm line 399, <__ANONIO__> chunk 1. Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/MARC/File/XML.pm line 399, <__ANONIO__> chunk 1. Use of uninitialized value $DisplayLibraryFacets in string eq at /kohadevbox/koha/C4/Koha.pm line 442. Use of uninitialized value $DisplayLibraryFacets in string eq at /kohadevbox/koha/C4/Koha.pm line 442. Use of uninitialized value $DisplayLibraryFacets in string eq at /kohadevbox/koha/C4/Koha.pm line 455. Use of uninitialized value $DisplayLibraryFacets in string eq at /kohadevbox/koha/C4/Koha.pm line 455. Use of uninitialized value $cn_item in sprintf at /kohadevbox/koha/C4/ClassSplitRoutine/LCC.pm line 48. # Failed test 'Logger did not init correctly without permission' # at t/Logger.t line 52. # Looks like you failed 1 test of 10. # Failed test 'Test01 -- Simple tests for Koha::Logger' # at t/Logger.t line 74. # Looks like you failed 1 test of 1. 0 This is what I get after running step 3: prove ./t | grep 00-check-atomic-updates.pl | wc -l Use of uninitialized value $_ in pattern match (m//) at /usr/share/perl5/PPIx/Regexp/Structure/Quantifier.pm line 117. skipping ingest of QUOTES_413514.CEQ : filename exists at t/EdiTransport.t line 53. Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/MARC/File/XML.pm line 399, <__ANONIO__> chunk 1. Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/MARC/File/XML.pm line 399, <__ANONIO__> chunk 1. Use of uninitialized value in string eq at /kohadevbox/koha/C4/Koha.pm line 315. Use of uninitialized value in string eq at /kohadevbox/koha/C4/Koha.pm line 315. Use of uninitialized value $DisplayLibraryFacets in string eq at /kohadevbox/koha/C4/Koha.pm line 442. Use of uninitialized value $DisplayLibraryFacets in string eq at /kohadevbox/koha/C4/Koha.pm line 442. Use of uninitialized value $DisplayLibraryFacets in string eq at /kohadevbox/koha/C4/Koha.pm line 455. Use of uninitialized value $DisplayLibraryFacets in string eq at /kohadevbox/koha/C4/Koha.pm line 455. Use of uninitialized value $cn_item in sprintf at /kohadevbox/koha/C4/ClassSplitRoutine/LCC.pm line 48. # Failed test 'Logger did not init correctly without permission' # at t/Logger.t line 52. # Looks like you failed 1 test of 10. # Failed test 'Test01 -- Simple tests for Koha::Logger' # at t/Logger.t line 74. # Looks like you failed 1 test of 1. 0 Signing off as file is renamed and tests pass for prove t/00-check-atomic-updates.pl
Created attachment 137213 [details] [review] Bug 31108: rename ./t/00-check-atomic-updates.pl extension to *.t to test... 1/ run prove, test is not run :( prove ./t | grep 00-check-atomic-updates.pl | wc -l 0 2/ apply patch 3/ run prove, test is run :) prove ./t | grep 00-check-atomic-updates.t | wc -l 2 Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pushed to master for 22.11. Nice work everyone, thanks!
(In reply to Tomás Cohen Arazi from comment #9) > Pushed to master for 22.11. > > Nice work everyone, thanks! thanks, can we push thru to o-o-stable
bumping to blocker for 22.05.03 release
pushed to 21.11.x for 21.11.11
Backported: Pushed to 21.05.x branch for 21.05.18 Nothing to document, marking resolved.
Was this tested with an actual atomic update in the directory? I had an atomic update in there named bug_X_-_add_syspref.pl and it caused the test to fail $ prove t/00-check-atomic-updates.t t/00-check-atomic-updates.t .. 1/? # Failed test 'check for unhandled atomic updates: bug_30880_-_add_option_OPACResultsUnavailableGroupingBy_syspref.pl' # at t/00-check-atomic-updates.t line 34. # 'bug_30880_-_add_option_OPACResultsUnavailableGroupingBy_syspref.pl' # matches '(?^u:.*pl$)' # Looks like you failed 1 test of 7. t/00-check-atomic-updates.t .. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/7 subtests Test Summary Report ------------------- t/00-check-atomic-updates.t (Wstat: 256 Tests: 7 Failed: 1) Failed test: 5 Non-zero exit status: 1 Files=1, Tests=7, 0 wallclock secs ( 0.01 usr 0.01 sys + 0.06 cusr 0.00 csys = 0.08 CPU) Result: FAIL Can anyone advise?
I've opened Bug 31466 to handle this.
Never mind it has been explained to me that the test is correct and those of us doing custom packages will need to change how we handle atomic updates.