Summary: | xt/find-license-problems.t is failing | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Test Suite | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | Pushed to stable --- | QA Contact: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Severity: | normal | ||
Priority: | P5 - low | CC: | lisette, lucas, tomascohen |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | Trivial patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: |
25.11.00,25.05.02
|
Circulation function: | |
Bug Depends on: | |||
Bug Blocks: | 40419 | ||
Attachments: |
Bug 40402: Make xt/find-license-problems.t process files that are in the git index
Bug 40402: Make xt/find-license-problems.t process files that are in the git index Bug 40402: Make xt/find-license-problems.t process files that are in the git index Bug 40402: Make xt/find-license-problems.t process files that are in the git index |
Description
Jonathan Druart
2025-07-16 08:31:00 UTC
Created attachment 184124 [details] [review] Bug 40402: Make xt/find-license-problems.t process files that are in the git index And only those files. Currently the test is failing with 02:52:31 koha_1 | # Failed test at xt/find-license-problems.t line 65. 02:52:31 koha_1 | # got: '0' 02:52:31 koha_1 | # expected: '1' 02:52:33 koha_1 | # File ./misc/translator/po/LICENSE has wrong copyright: hasgpl=1, hasv3=1, hasorlater=1, haslinktolicense=0, hasfranklinst=0 02:52:33 koha_1 | # Looks like you failed 1 test of 1381. 02:52:33 koha_1 | [00:51:24] xt/find-license-problems.t Because a LICENSE file has been added to koha-l10n, and now this test fails on it. https://gitlab.com/koha-community/koha-l10n/-/commit/27ab9ff4d2462c3f95cd54ae4a2e53ce7d2f6a65 But we should not test files that are not part of the git index. Test plan: 0. Do not apply this patch 1. Edit xt/find-license-problems.t, add warn scalar(@files); 2. Run `prove xt/find-license-problems.t` => Notice that 4056 files are processed Note that you need to have a clean git repo. You can run the following git command BUT BEWARE /*\ it will remove all changes not committed `git clean -d -f` 3. Apply this patch, prove again => Tests are passing, with the same number of tests xt/find-license-problems.t .. ok All tests successful. Files=1, Tests=4056 Note that I think we lost one file, as Test::NoWarnings is adding a test. But I don't think it is worth the trouble to find out which one is missing. *** Bug 40419 has been marked as a duplicate of this bug. *** Created attachment 184172 [details] [review] Bug 40402: Make xt/find-license-problems.t process files that are in the git index And only those files. Currently the test is failing with 02:52:31 koha_1 | # Failed test at xt/find-license-problems.t line 65. 02:52:31 koha_1 | # got: '0' 02:52:31 koha_1 | # expected: '1' 02:52:33 koha_1 | # File ./misc/translator/po/LICENSE has wrong copyright: hasgpl=1, hasv3=1, hasorlater=1, haslinktolicense=0, hasfranklinst=0 02:52:33 koha_1 | # Looks like you failed 1 test of 1381. 02:52:33 koha_1 | [00:51:24] xt/find-license-problems.t Because a LICENSE file has been added to koha-l10n, and now this test fails on it. https://gitlab.com/koha-community/koha-l10n/-/commit/27ab9ff4d2462c3f95cd54ae4a2e53ce7d2f6a65 But we should not test files that are not part of the git index. Test plan: 0. Do not apply this patch 1. Edit xt/find-license-problems.t, add warn scalar(@files); 2. Run `prove xt/find-license-problems.t` => Notice that 4056 files are processed Note that you need to have a clean git repo. You can run the following git command BUT BEWARE /*\ it will remove all changes not committed `git clean -d -f` 3. Apply this patch, prove again => Tests are passing, with the same number of tests xt/find-license-problems.t .. ok All tests successful. Files=1, Tests=4056 Note that I think we lost one file, as Test::NoWarnings is adding a test. But I don't think it is worth the trouble to find out which one is missing. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Created attachment 184173 [details] [review] Bug 40402: Make xt/find-license-problems.t process files that are in the git index And only those files. Currently the test is failing with 02:52:31 koha_1 | # Failed test at xt/find-license-problems.t line 65. 02:52:31 koha_1 | # got: '0' 02:52:31 koha_1 | # expected: '1' 02:52:33 koha_1 | # File ./misc/translator/po/LICENSE has wrong copyright: hasgpl=1, hasv3=1, hasorlater=1, haslinktolicense=0, hasfranklinst=0 02:52:33 koha_1 | # Looks like you failed 1 test of 1381. 02:52:33 koha_1 | [00:51:24] xt/find-license-problems.t Because a LICENSE file has been added to koha-l10n, and now this test fails on it. https://gitlab.com/koha-community/koha-l10n/-/commit/27ab9ff4d2462c3f95cd54ae4a2e53ce7d2f6a65 But we should not test files that are not part of the git index. Test plan: 0. Do not apply this patch 1. Edit xt/find-license-problems.t, add warn scalar(@files); 2. Run `prove xt/find-license-problems.t` => Notice that 4056 files are processed Note that you need to have a clean git repo. You can run the following git command BUT BEWARE /*\ it will remove all changes not committed `git clean -d -f` 3. Apply this patch, prove again => Tests are passing, with the same number of tests xt/find-license-problems.t .. ok All tests successful. Files=1, Tests=4056 Note that I think we lost one file, as Test::NoWarnings is adding a test. But I don't think it is worth the trouble to find out which one is missing. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Created attachment 184174 [details] [review] Bug 40402: Make xt/find-license-problems.t process files that are in the git index And only those files. Currently the test is failing with 02:52:31 koha_1 | # Failed test at xt/find-license-problems.t line 65. 02:52:31 koha_1 | # got: '0' 02:52:31 koha_1 | # expected: '1' 02:52:33 koha_1 | # File ./misc/translator/po/LICENSE has wrong copyright: hasgpl=1, hasv3=1, hasorlater=1, haslinktolicense=0, hasfranklinst=0 02:52:33 koha_1 | # Looks like you failed 1 test of 1381. 02:52:33 koha_1 | [00:51:24] xt/find-license-problems.t Because a LICENSE file has been added to koha-l10n, and now this test fails on it. https://gitlab.com/koha-community/koha-l10n/-/commit/27ab9ff4d2462c3f95cd54ae4a2e53ce7d2f6a65 But we should not test files that are not part of the git index. Test plan: 0. Do not apply this patch 1. Edit xt/find-license-problems.t, add warn scalar(@files); 2. Run `prove xt/find-license-problems.t` => Notice that 4056 files are processed Note that you need to have a clean git repo. You can run the following git command BUT BEWARE /*\ it will remove all changes not committed `git clean -d -f` 3. Apply this patch, prove again => Tests are passing, with the same number of tests xt/find-license-problems.t .. ok All tests successful. Files=1, Tests=4056 Note that I think we lost one file, as Test::NoWarnings is adding a test. But I don't think it is worth the trouble to find out which one is missing. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Nice work everyone! Pushed to main for 25.11 Nice work everyone! Pushed to 25.05.x |