Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
d0f27fd0
Commit
d0f27fd0
authored
Jun 14, 2006
by
msvensson@neptunus.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update function 'mtr_options_from_file' after review (and some help)
parent
ec079876
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
mysql-test/lib/mtr_cases.pl
mysql-test/lib/mtr_cases.pl
+7
-9
No files found.
mysql-test/lib/mtr_cases.pl
View file @
d0f27fd0
...
...
@@ -5,6 +5,7 @@
# same name.
use
File::
Basename
;
use
IO::
File
();
use
strict
;
sub
collect_test_cases
($);
...
...
@@ -505,8 +506,6 @@ sub collect_one_test_case($$$$$$$) {
}
use
IO::
File
;
# List of tags in the .test files that if found should set
# the specified value in "tinfo"
our
@tags
=
...
...
@@ -526,17 +525,16 @@ sub mtr_options_from_test_file($$) {
#mtr_verbose("$file");
my
$F
=
IO::
File
->
new
(
$file
)
or
mtr_error
("
can't open file
\"
$file
\"
: $!
");
while
(
<
$F
>
)
while
(
my
$line
=
<
$F
>
)
{
chomp
;
# Skip all lines not starting with "--"
next
if
(
!
/^--/
);
next
if
(
$line
!~
/^--/
);
# Match this line against tag in "tags" array
foreach
my
$tag
(
@tags
)
{
if
(
$_
=~
/(.*)\Q$tag->[0]\E(.*)$/
)
if
(
index
(
$line
,
$tag
->
[
0
])
>=
0
)
{
# Tag matched, assign value to "tinfo"
$tinfo
->
{"
$tag
->[1]
"}
=
$tag
->
[
2
];
...
...
@@ -544,11 +542,11 @@ sub mtr_options_from_test_file($$) {
}
# If test sources another file, open it as well
if
(
/^--([[:space:]]*)source
/
)
if
(
$line
=~
/^\-\-([[:space:]]*)source(.*)$
/
)
{
my
$value
=
$
'
;
my
$value
=
$
2
;
$value
=~
s/^\s+//
;
# Remove leading space
$value
=~
s/
\s
+$//
;
# Remove ending space
$value
=~
s/
[[:space:]]
+$//
;
# Remove ending space
my
$sourced_file
=
"
$::glob_mysql_test_dir/
$value
";
mtr_options_from_test_file
(
$tinfo
,
$sourced_file
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment