Bugzilla – Attachment 184614 Details for
Bug 40315
xt/tt_tidy.t generates warnings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40315: Remove warnings from xt/tt_tidy.t
Bug-40315-Remove-warnings-from-xttttidyt.patch (text/plain), 2.14 KB, created by
Marcel de Rooy
on 2025-07-25 07:31:10 UTC
(
hide
)
Description:
Bug 40315: Remove warnings from xt/tt_tidy.t
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2025-07-25 07:31:10 UTC
Size:
2.14 KB
patch
obsolete
>From a09a044d23e1cb95f2b19d9c5951b5a1bb7f4c7d Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 18 Jul 2025 14:43:00 +0200 >Subject: [PATCH] Bug 40315: Remove warnings from xt/tt_tidy.t >Content-Type: text/plain; charset=utf-8 > >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> >--- > xt/tt_tidy.t | 17 ++++++++++++----- > xt/use-test-no-warnings.t | 3 --- > 2 files changed, 12 insertions(+), 8 deletions(-) > >diff --git a/xt/tt_tidy.t b/xt/tt_tidy.t >index 895c26be7d..c5e3ecbae1 100755 >--- a/xt/tt_tidy.t >+++ b/xt/tt_tidy.t >@@ -19,6 +19,7 @@ use Modern::Perl; > use threads; # used for parallel > use File::Slurp qw( read_file ); > use Test::More; >+use Test::NoWarnings; > use Test::Strict; > use Parallel::ForkManager; > use Sys::CPU; >@@ -39,16 +40,22 @@ if ( $ENV{KOHA_PROVE_CPUS} ) { > > my $pm = Parallel::ForkManager->new($ncpu); > >+plan tests => scalar(@tt_files) + 1; >+ > foreach my $filepath (@tt_files) { > $pm->start and next; > >- my $tidy = qx{perl misc/devel/tidy.pl --silent --no-write $filepath}; >- my $content = read_file $filepath; >- ok( $content eq $tidy, "$filepath should be kept tidy" ); >+ if ( !-s $filepath ) { >+ >+ # Do not tidy empty files >+ ok(1); >+ } else { >+ my $tidy = qx{perl misc/devel/tidy.pl --silent --no-write $filepath}; >+ my $content = read_file $filepath; >+ ok( $content eq $tidy, "$filepath should be kept tidy" ); >+ } > > $pm->finish; > } > > $pm->wait_all_children; >- >-done_testing; >diff --git a/xt/use-test-no-warnings.t b/xt/use-test-no-warnings.t >index 621dac817f..dc1c306b68 100755 >--- a/xt/use-test-no-warnings.t >+++ b/xt/use-test-no-warnings.t >@@ -46,9 +46,6 @@ my @exceptions = ( > > # bug 40449 > "xt/author/valid-templates.t", >- >- # bug 40315 >- "xt/tt_tidy.t", > ); > > @t_files = array_minus( @t_files, @exceptions ); >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 40315
:
184375
|
184426
| 184614 |
184615