Bugzilla – Attachment 182310 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.62 KB, created by
Jonathan Druart
on 2025-05-12 20:35:58 UTC
(
hide
)
Description:
Bug 39877: Merge vue and js tidy tests
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-05-12 20:35:58 UTC
Size:
2.62 KB
patch
obsolete
>From 1b0862581cfaa3a36ef83f4a19ac2cde2ecc7bba 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 > >--- > xt/js_tidy.t | 18 +++++++++++++----- > xt/vue_tidy.t | 31 ------------------------------- > 2 files changed, 13 insertions(+), 36 deletions(-) > delete mode 100755 xt/vue_tidy.t > >diff --git a/xt/js_tidy.t b/xt/js_tidy.t >index 940f2b622c5..fbb460cee61 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. > # >@@ -17,15 +17,23 @@ > > use Modern::Perl; > use File::Slurp qw( read_file ); >+use Test::NoWarnings; > use Test::More; > >-my @js_files = qx{git ls-files '*.js' '*.ts'}; >+use Koha::Devel::CI::IncrementalRuns; > >-plan tests => scalar @js_files; >+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 03ab5033088..00000000000 >--- a/xt/vue_tidy.t >+++ /dev/null >@@ -1,31 +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; >- >-my @vue_files = `git ls-files 'koha-tmpl/intranet-tmpl/prog/js/vue/*.vue'`; >- >-plan tests => scalar @vue_files; >- >-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.34.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