Bugzilla – Attachment 66673 Details for
Bug 19227
00-merge-conflict-markers.t launches too many tests
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19227: Reduce the number of tests run by 00-merge-conflict-markers.t
Bug-19227-Reduce-the-number-of-tests-run-by-00-mer.patch (text/plain), 1.97 KB, created by
Jonathan Druart
on 2017-08-31 14:48:46 UTC
(
hide
)
Description:
Bug 19227: Reduce the number of tests run by 00-merge-conflict-markers.t
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-08-31 14:48:46 UTC
Size:
1.97 KB
patch
obsolete
>From 13b158574b820d839a5c7d84473b80fe2e241de8 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 31 Aug 2017 11:47:11 -0300 >Subject: [PATCH] Bug 19227: Reduce the number of tests run by > 00-merge-conflict-markers.t > >The number of tests on jenkins is sometimes confusing: > >https://jenkins.koha-community.org/job/Koha_Master_D8/lastCompletedBuild/testReport/(root)/t_00_merge_conflict_markers_t/ > >shows that 00-merge-conflict-markers.t ran 10,751 tests, 124 less than >the previous run. However 124 files have not been removed from the >codebase! > >I suggest to count only 1 test for all files. > >Moreover files from blib and cover_db are counted, they should be >excluded. > >Test plan: > prove t/00-merge-conflict-markers.t >must return green > >echo ">>>>>>>" >> mainpage.pl >and run the test again >It should now fail >--- > t/00-merge-conflict-markers.t | 17 +++++++---------- > 1 file changed, 7 insertions(+), 10 deletions(-) > >diff --git a/t/00-merge-conflict-markers.t b/t/00-merge-conflict-markers.t >index 0269328d81..2cbe8cf344 100644 >--- a/t/00-merge-conflict-markers.t >+++ b/t/00-merge-conflict-markers.t >@@ -15,14 +15,14 @@ > # You should have received a copy of the GNU General Public License > # along with Koha; if not, see <http://www.gnu.org/licenses>. > >-use strict; >-use warnings; >+use Modern::Perl; > >-use Test::More; >+use Test::More tests => 1; > use File::Spec; > use File::Find; > use IO::File; > >+my @failures; > find({ > bydepth => 1, > no_chdir => 1, >@@ -48,11 +48,8 @@ find({ > } > } > close $fh; >- if ($marker_found) { >- fail("$file contains merge conflict markers in line $line"); >- } else { >- pass("$file has no merge conflict markers"); >- } >- }, >+ push @failures, $file if $marker_found; >+}, > }, File::Spec->curdir()); >-done_testing(); >+ >+is( @failures, 0, 'Files should not contain merge markers' . ( @failures ? ( ' (' . join( ', ', @failures ) . ' )' ) : '' ) ); >-- >2.11.0
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 19227
:
66673
|
66834
|
67045