Bug 34911

Summary: Test suite no longer run test critic
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Test SuiteAssignee: Jonathan Druart <jonathan.druart>
Status: Pushed to oldstable --- QA Contact: Marcel de Rooy <m.de.rooy>
Severity: major    
Priority: P5 - low CC: fridolin.somers, m.de.rooy
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00,23.05.05,22.11.11
Bug Depends on: 32352, 34303    
Bug Blocks:    
Attachments: Bug 34911: Test files from HEAD instead of 'master'
Bug 34911: Test files from HEAD instead of 'master'

Description Jonathan Druart 2023-09-26 08:27:24 UTC
Since bug 34303 the test suite (when ran on jenkins) is no longer testing Perl::Critic

koha_1       | fatal: Not a valid object name master
koha_1       | [14:58:14] t/00-testcritic.t

check_makefile.t is also failing:
koha_1       | fatal: Not a valid object name master
koha_1       | [15:00:01] xt/check_makefile.t

We are not cloning the whole repo and "master" is not available. Additionally we do not want to test master's files on stable branches anyway...
Comment 1 Jonathan Druart 2023-09-26 08:28:56 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2023-09-26 08:33:21 UTC
Note that this may not be enough, we have other warnings/errors:

koha_1       | error: object directory /srv/jenkins/workspace/Koha_Source/.git/objects does not exist; check .git/objects/info/alternates
koha_1       | [15:00:20] t/Makefile.t

Which is using HEAD. But in my test it was working. On Docker_8:
/srv/jenkins/workspace/Koha_Master# perl t/Makefile.t 
1..1
ok 1 - All directories should be mapped
Comment 3 Marcel de Rooy 2023-09-26 11:13:07 UTC
Created attachment 156213 [details] [review]
Bug 34911: Test files from HEAD instead of 'master'

Since bug 34303 the test suite (when ran on jenkins) is no longer testing Perl::Critic

koha_1       | fatal: Not a valid object name master
koha_1       | [14:58:14] t/00-testcritic.t

We are not cloning the whole repo and "master" is not available. Additionally we do not want to test master's files on stable branches anyway...

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 4 Marcel de Rooy 2023-09-26 11:13:28 UTC
Trivial: SO + QA
Comment 5 Tomás Cohen Arazi 2023-10-04 13:15:05 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 6 Fridolin Somers 2023-10-05 19:42:14 UTC
Pushed to 23.05.x for 23.05.05

Good catch ;)
Comment 7 Matt Blenkinsop 2023-10-17 16:57:03 UTC
Nice work everyone!

Pushed to oldstable for 22.11.x