Bug 40315 - xt/tt_tidy.t generates warnings
Summary: xt/tt_tidy.t generates warnings
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low minor
Assignee: Jonathan Druart
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on: 40444 38340
Blocks: 25515
  Show dependency treegraph
 
Reported: 2025-07-07 11:22 UTC by Jonathan Druart
Modified: 2025-07-31 18:46 UTC (History)
4 users (show)

See Also:
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
Circulation function:


Attachments
Bug 40315: Remove warnings from xt/tt_tidy.t (2.00 KB, patch)
2025-07-18 12:44 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 40315: Remove warnings from xt/tt_tidy.t (2.05 KB, patch)
2025-07-21 08:44 UTC, David Nind
Details | Diff | Splinter Review
Bug 40315: Remove warnings from xt/tt_tidy.t (2.14 KB, patch)
2025-07-25 07:31 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 40315: (QA follow-up) Fix shebang for both tests (955 bytes, patch)
2025-07-25 07:31 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2025-07-07 11:22:10 UTC
18:22:50 koha_1       | Something went wrong, Prettier generated an empty file. The original file was kept at misc/devel/tidy.pl line 112.
18:22:50 koha_1       | Something went wrong, Prettier generated an empty file. The original file was kept at misc/devel/tidy.pl line 112.
18:22:50 koha_1       | Something went wrong, Prettier generated an empty file. The original file was kept at misc/devel/tidy.pl line 112.

This is because those 3 files are empty:
koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/illview.inc
koha-tmpl/intranet-tmpl/prog/en/includes/ill/backends/Standard/shared/forms/other.inc
koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/shared/forms/other.inc

Is that expected?
Comment 1 Jonathan Druart 2025-07-18 12:44:28 UTC
Created attachment 184375 [details] [review]
Bug 40315: Remove warnings from xt/tt_tidy.t

Maybe we could remove the warnings from misc/devel/tidy.pl if the file
was originally empty but for now it feels safer to skip the tidy of
empty files

Test plan:
  prove xt/tt_tidy.t xt/use-test-no-warnings.t
should return green
Comment 2 David Nind 2025-07-18 21:47:33 UTC
The tests failed for me:

prove xt/tt_tidy.t xt/use-test-no-warnings.t
xt/tt_tidy.t ............... ok       
xt/use-test-no-warnings.t .. 1/2 
#   Failed test 'All Perl test files should contain Test::NoWarnings'
#   at xt/use-test-no-warnings.t line 58.
#          got: '8'
#     expected: '0'
# The following test files should use Test::NoWarnings:
# 	t/ImportBatch.t
# 	t/db_dependent/Auth.t
# 	t/db_dependent/Budgets.t
# 	t/db_dependent/Koha/Patron.t
# 	t/db_dependent/www/auth_values_input_www.t
# 	t/db_dependent/www/batch.t
# 	t/db_dependent/www/history.t
# 	t/db_dependent/www/search_utf8.t
# Looks like you failed 1 test of 2.
xt/use-test-no-warnings.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/2 subtests 

Test Summary Report
-------------------
xt/use-test-no-warnings.t (Wstat: 256 (exited 1) Tests: 2 Failed: 1)
  Failed test:  1
  Non-zero exit status: 1
Files=2, Tests=862, 172 wallclock secs ( 0.03 usr  0.00 sys + 1335.50 cusr 411.00 csys = 1746.53 CPU)
Result: FAIL
Comment 3 Jonathan Druart 2025-07-21 07:29:03 UTC
Yes, this one needs the patches under bug 25515.

So you will need to apply the patches from bug 40371, bug 40379, bug 40401 and 18772 first.

They do not apply using git-bz because 25515 is an omnibus and does not have patches.
Comment 4 David Nind 2025-07-21 08:44:52 UTC
Created attachment 184426 [details] [review]
Bug 40315: Remove warnings from xt/tt_tidy.t

Maybe we could remove the warnings from misc/devel/tidy.pl if the file
was originally empty but for now it feels safer to skip the tidy of
empty files

Test plan:
  prove xt/tt_tidy.t xt/use-test-no-warnings.t
should return green

Signed-off-by: David Nind <david@davidnind.com>
Comment 5 Marcel de Rooy 2025-07-25 06:17:42 UTC
xt/use-test-no-warnings.t .. 1/2
#   Failed test 'All Perl test files should contain Test::NoWarnings'
#   at xt/use-test-no-warnings.t line 52.
#          got: '1'
#     expected: '0'
# The following test files should use Test::NoWarnings:
#       t/db_dependent/api/v1/cash_registers.t
Comment 6 Jonathan Druart 2025-07-25 07:01:16 UTC
(In reply to Marcel de Rooy from comment #5)
> xt/use-test-no-warnings.t .. 1/2
> #   Failed test 'All Perl test files should contain Test::NoWarnings'
> #   at xt/use-test-no-warnings.t line 52.
> #          got: '1'
> #     expected: '0'
> # The following test files should use Test::NoWarnings:
> #       t/db_dependent/api/v1/cash_registers.t

It's from bug 40444.
Comment 7 Marcel de Rooy 2025-07-25 07:31:10 UTC
Created attachment 184614 [details] [review]
Bug 40315: Remove warnings from xt/tt_tidy.t

Maybe we could remove the warnings from misc/devel/tidy.pl if the file
was originally empty but for now it feels safer to skip the tidy of
empty files

Test plan:
  prove xt/tt_tidy.t xt/use-test-no-warnings.t
should return green

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 8 Marcel de Rooy 2025-07-25 07:31:12 UTC
Created attachment 184615 [details] [review]
Bug 40315: (QA follow-up) Fix shebang for both tests

Including chmod 755 xt/use-test-no-warnings.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 9 Lucas Gass (lukeg) 2025-07-31 18:46:25 UTC
Nice work everyone!

Pushed to main for 25.11