Bugzilla – Attachment 184781 Details for
Bug 39877
CI - Incremental runs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39877: Merge vue and js tidy tests
Bug-39877-Merge-vue-and-js-tidy-tests.patch (text/plain), 2.69 KB, created by
Victor Grousset/tuxayo
on 2025-07-29 05:08:07 UTC
(
hide
)
Description:
Bug 39877: Merge vue and js tidy tests
Filename:
MIME Type:
Creator:
Victor Grousset/tuxayo
Created:
2025-07-29 05:08:07 UTC
Size:
2.69 KB
patch
obsolete
>From 5f902111146dedb486ddd2562cd039b80bd7ffc9 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 12 May 2025 16:06:23 +0200 >Subject: [PATCH] Bug 39877: Merge vue and js tidy tests > >Rebased-by: Victor Grousset/tuxayo <victor@tuxayo.net> >--- > xt/js_tidy.t | 17 ++++++++++++----- > xt/vue_tidy.t | 32 -------------------------------- > 2 files changed, 12 insertions(+), 37 deletions(-) > delete mode 100755 xt/vue_tidy.t > >diff --git a/xt/js_tidy.t b/xt/js_tidy.t >index 2e1cb330aa..87055d1d9d 100755 >--- a/xt/js_tidy.t >+++ b/xt/js_tidy.t >@@ -1,4 +1,4 @@ >-#/usr/bin/perl >+#!/usr/bin/perl > > # This file is part of Koha. > # >@@ -20,13 +20,20 @@ use File::Slurp qw( read_file ); > use Test::More; > use Test::NoWarnings; > >-my @js_files = qx{git ls-files '*.js' '*.ts'}; >+use Koha::Devel::CI::IncrementalRuns; > >-plan tests => scalar(@js_files) + 1; >+my $ci = Koha::Devel::CI::IncrementalRuns->new( { context => 'tidy' } ); > >-foreach my $filepath (@js_files) { >+my @files = $ci->get_files_to_test('js'); >+ >+plan tests => scalar @files + 1; >+ >+my %results; >+foreach my $filepath (@files) { > chomp $filepath; > 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" ); >+ ok( $content eq $tidy, "$filepath should be kept tidy" ) or $results{$filepath} = 1; > } >+ >+$ci->report_results( \%results ); >diff --git a/xt/vue_tidy.t b/xt/vue_tidy.t >deleted file mode 100755 >index 8b8685bb69..0000000000 >--- a/xt/vue_tidy.t >+++ /dev/null >@@ -1,32 +0,0 @@ >-#!/usr/bin/perl >- >-# This file is part of Koha. >-# >-# Koha is free software; you can redistribute it and/or modify it >-# under the terms of the GNU General Public License as published by >-# the Free Software Foundation; either version 3 of the License, or >-# (at your option) any later version. >-# >-# Koha is distributed in the hope that it will be useful, but >-# WITHOUT ANY WARRANTY; without even the implied warranty of >-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >-# GNU General Public License for more details. >-# >-# You should have received a copy of the GNU General Public License >-# along with Koha; if not, see <http://www.gnu.org/licenses>. >- >-use Modern::Perl; >-use File::Slurp qw( read_file ); >-use Test::More; >-use Test::NoWarnings; >- >-my @vue_files = `git ls-files 'koha-tmpl/intranet-tmpl/prog/js/vue/*.vue'`; >- >-plan tests => scalar(@vue_files) + 1; >- >-foreach my $filepath (@vue_files) { >- chomp $filepath; >- 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" ); >-} >-- >2.50.1
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 39877
:
182308
|
182309
|
182310
|
182311
|
182347
|
182348
|
182349
|
182350
|
182355
|
182356
|
182357
|
182358
|
183795
|
183796
|
183797
|
183798
|
184462
|
184463
|
184464
|
184465
|
184466
|
184779
|
184780
|
184781
|
184782
|
184783
|
184785
|
184875
|
184876
|
184877
|
184878
|
184879
|
184880