Bugzilla – Attachment 48862 Details for
Bug 16008
noisy "fatal" warning when new file is moved in another patch
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16008: noisy "fatal" warning when new file is moved in another patch
Bug-16008-noisy-fatal-warning-when-new-file-is-mov.patch (text/plain), 1.50 KB, created by
Mark Tompsett
on 2016-03-09 14:11:34 UTC
(
hide
)
Description:
Bug 16008: noisy "fatal" warning when new file is moved in another patch
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2016-03-09 14:11:34 UTC
Size:
1.50 KB
patch
obsolete
>From eddba8351ca38be24f8ab1eeefb41ae805373a2c Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Tue, 8 Mar 2016 16:24:43 -0500 >Subject: [PATCH] Bug 16008: noisy "fatal" warning when new file is moved in > another patch > >The failure was tracked down to check_forbidden_patterns in >QohA/File.pm's check_forbidden_patterns function. > >As there can't be any forbidden patterns on a non-existent file, >this patch returns the default 1 when the file being checked >does not exist. It maintains a warning message as suggested in >comment #2. > >It is better to create another check as stated in comment #2, >but I figure I'll share my less than perfect work anyways. > >TEST PLAN >--------- >apply bug 15870 to your koha >run qa test tools >-- see the warning >apply this patch to your qa test tools >run qa test tools >-- no more warning >--- > QohA/File.pm | 7 +++++++ > 1 file changed, 7 insertions(+) > >diff --git a/QohA/File.pm b/QohA/File.pm >index 420dfbd..2a3985d 100644 >--- a/QohA/File.pm >+++ b/QohA/File.pm >@@ -46,6 +46,13 @@ sub check_forbidden_patterns { > # For the first pass, I don't want to launch any test. > return 1 if $self->pass == 0; > >+ # Patches may create and move files. >+ unless (-e $self->path) { >+ # \n on a warn or die eliminates the at line # mess. >+ warn $self->path . " was created and removed in patchset!\n"; >+ return 1; >+ } >+ > my $git = QohA::Git->new(); > my $diff_log = $git->diff_log($cnt, $self->path); > my @forbidden_patterns = @$patterns; >-- >2.1.4
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 16008
:
48830
|
48862
|
49318
|
50136