https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40402

--- Comment #1 from Jonathan Druart <[email protected]> ---
Created attachment 184124
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184124&action=edit
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.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to