[MDEV-11800] [Draft] SEARCH_ABORT in mysql-test/include/search_pattern_in_file.inc needs improvement Created: 2017-01-15  Updated: 2021-01-25  Resolved: 2021-01-25

Status: Closed
Project: MariaDB Server
Component/s: Tests
Affects Version/s: 10.1
Fix Version/s: N/A

Type: Bug Priority: Trivial
Reporter: Elena Stepanova Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None


 Description   

Recent change:

diff --git a/mysql-test/include/search_pattern_in_file.inc b/mysql-test/include/search_pattern_in_file.inc
index 3280dbf..f77a7c6 100644
--- a/mysql-test/include/search_pattern_in_file.inc
+++ b/mysql-test/include/search_pattern_in_file.inc
@@ -82,8 +82,14 @@ perl;
     }
     $ENV{'SEARCH_FILE'} =~ s{^.*?([^/\\]+)$}{$1};
     if ($content =~ m{$search_pattern}) {
+      die "FOUND /$search_pattern/ in $ENV{'SEARCH_FILE'}\n"
+      if $ENV{SEARCH_ABORT} eq 'FOUND';
       print "FOUND /$search_pattern/ in $ENV{'SEARCH_FILE'}\n"
+      unless defined $ENV{SEARCH_ABORT};
     } else {
+      die "NOT FOUND /$search_pattern/ in $ENV{'SEARCH_FILE'}\n"
+      if $ENV{SEARCH_ABORT} eq 'NOT FOUND';
       print "NOT FOUND /$search_pattern/ in $ENV{'SEARCH_FILE'}\n"
+      unless defined $ENV{SEARCH_ABORT};
     }



 Comments   
Comment by Elena Stepanova [ 2021-01-25 ]

The logic was modified significantly since then.

Generated at Thu Feb 08 07:52:45 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.