Koha-clms/xt
Jonathan Druart a8795dd604
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.

27ab9ff4d2

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>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 491ffdc7f1)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 779c9cb17d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-08-01 11:33:18 +02:00
..
author Bug 31590: Remove Text::CSV::Unicode 2022-09-21 16:07:21 -03:00
api.t Bug 38929: Add 2 exceptions 2025-04-22 23:02:24 +02:00
check_makefile.t Bug 39304: Make sure git commands return something 2025-06-19 12:27:18 +02:00
find-license-problems.t Bug 40402: Make xt/find-license-problems.t process files that are in the git index 2025-08-01 11:33:18 +02:00
find-misplaced-executables.t Bug 26384: Add .t extension to make the script executed by CI 2020-09-28 11:08:03 +02:00
find-missing-auth_checks.t Bug 24879: Exclude koha_perl_deps.pl 2024-04-03 17:05:51 +02:00
find-missing-csrf.t Bug 39304: Make sure git commands return something 2025-06-19 12:27:18 +02:00
find-missing-filters.t Bug 39304: Make sure git commands return something 2025-06-19 12:27:18 +02:00
find-missing-op-in-forms.t Bug 39304: Make sure git commands return something 2025-06-19 12:27:18 +02:00
js_tidy.t Bug 36374: flag JS files to keep tidy 2024-04-29 15:19:33 +02:00
single_quotes.t Bug 39304: Make sure git commands return something 2025-06-19 12:27:18 +02:00
tt_valid.t
…
verify-debian-docbook.t
…
verify-yarnlock.t Bug 37490: Add a test to detect when yarn.lock is not updated 2024-09-02 12:13:47 +02:00
verify_bib1.att.t Bug 32741: Regression tests 2023-02-02 11:59:26 -03:00
vue_tidy.t Bug 33625: Adjust test to deal with cypress tests 2023-05-17 10:24:59 -03:00
yaml_valid.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
yaml_valid.t Bug 28617: (QA follow-up) Restore FindBin in two places 2021-12-07 12:16:28 -10:00