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
6a65f08c
Commit
6a65f08c
authored
Mar 23, 2006
by
msvensson@shellback.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support fo --manual-debug, --manual-gdb and -manual-ddd
Touchups
parent
5ebda1d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
22 deletions
+56
-22
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+56
-22
No files found.
mysql-test/mysql-test-run.pl
View file @
6a65f08c
...
@@ -774,8 +774,8 @@ sub command_line_setup () {
...
@@ -774,8 +774,8 @@ sub command_line_setup () {
}
}
# Check debug related options
# Check debug related options
if
(
$opt_gdb
||
$opt_client_gdb
||
$opt_ddd
||
opt_client_ddd
||
if
(
$opt_gdb
||
$opt_client_gdb
||
$opt_ddd
||
$
opt_client_ddd
||
$opt_manual_gdb
||
$opt_manual_ddd
||
opt_manual_debug
)
$opt_manual_gdb
||
$opt_manual_ddd
||
$
opt_manual_debug
)
{
{
# Indicate that we are using debugger
# Indicate that we are using debugger
$glob_debugger
=
1
;
$glob_debugger
=
1
;
...
@@ -1557,7 +1557,7 @@ sub run_suite () {
...
@@ -1557,7 +1557,7 @@ sub run_suite () {
mtr_print_line
();
mtr_print_line
();
if
(
!
$
opt
_debugger
and
if
(
!
$
glob
_debugger
and
!
$glob_use_running_server
and
!
$glob_use_running_server
and
!
$glob_use_embedded_server
)
!
$glob_use_embedded_server
)
{
{
...
@@ -2494,7 +2494,7 @@ sub mysqld_start ($$$$$) {
...
@@ -2494,7 +2494,7 @@ sub mysqld_start ($$$$$) {
my
$args
;
# Arg vector
my
$args
;
# Arg vector
my
$exe
;
my
$exe
;
my
$pid
;
my
$pid
=
-
1
;
if
(
$type
eq
'
master
'
)
if
(
$type
eq
'
master
'
)
{
{
...
@@ -2527,30 +2527,45 @@ sub mysqld_start ($$$$$) {
...
@@ -2527,30 +2527,45 @@ sub mysqld_start ($$$$$) {
{
{
ddd_arguments
(
\
$args
,
\
$exe
,
$type
);
ddd_arguments
(
\
$args
,
\
$exe
,
$type
);
}
}
elsif
(
$opt_manual_debug
)
{
print
"
\n
Start
$type
in your debugger
\n
"
.
"
dir:
$glob_mysql_test_dir
\n
"
.
"
exe:
$exe
\n
"
.
"
args:
"
.
join
("
",
@$args
)
.
"
\n\n
"
.
"
Waiting ....
\n
";
# Indicate the exe should not be started
$exe
=
undef
;
}
if
(
$type
eq
'
master
'
)
if
(
$type
eq
'
master
'
)
{
{
if
(
$pid
=
mtr_spawn
(
$exe
,
$args
,
"",
if
(
!
defined
$exe
or
$master
->
[
$idx
]
->
{'
path_myerr
'},
$pid
=
mtr_spawn
(
$exe
,
$args
,
"",
$master
->
[
$idx
]
->
{'
path_myerr
'},
$master
->
[
$idx
]
->
{'
path_myerr
'},
"",
$master
->
[
$idx
]
->
{'
path_myerr
'},
{
append_log_file
=>
1
})
)
"",
{
append_log_file
=>
1
})
)
{
{
return
sleep_until_file_created
(
$master
->
[
$idx
]
->
{'
path_mypid
'},
return
sleep_until_file_created
(
$master
->
[
$idx
]
->
{'
path_mypid
'},
$master
->
[
$idx
]
->
{'
start_timeout
'},
$pid
);
$master
->
[
$idx
]
->
{'
start_timeout
'},
$pid
);
}
}
}
}
if
(
$type
eq
'
slave
'
)
if
(
$type
eq
'
slave
'
)
{
{
if
(
$pid
=
mtr_spawn
(
$exe
,
$args
,
"",
if
(
!
defined
$exe
or
$pid
=
mtr_spawn
(
$exe
,
$args
,
"",
$slave
->
[
$idx
]
->
{'
path_myerr
'},
$slave
->
[
$idx
]
->
{'
path_myerr
'},
$slave
->
[
$idx
]
->
{'
path_myerr
'},
$slave
->
[
$idx
]
->
{'
path_myerr
'},
"",
"",
{
append_log_file
=>
1
})
)
{
append_log_file
=>
1
})
)
{
{
return
sleep_until_file_created
(
$slave
->
[
$idx
]
->
{'
path_mypid
'},
return
sleep_until_file_created
(
$slave
->
[
$idx
]
->
{'
path_mypid
'},
$master
->
[
$idx
]
->
{'
start_timeout
'},
$pid
);
$master
->
[
$idx
]
->
{'
start_timeout
'},
$pid
);
}
}
}
}
...
@@ -3012,7 +3027,7 @@ sub run_mysqltest ($) {
...
@@ -3012,7 +3027,7 @@ sub run_mysqltest ($) {
if
(
$glob_use_libtool
)
if
(
$glob_use_libtool
)
{
{
# Add "libtool --mode-execute" before the test to execute
# Add "libtool --mode-execute" before the test to execute
unshift
(
@$args
,
"
--mode=execute
",
$
path
);
unshift
(
@$args
,
"
--mode=execute
",
$
exe
);
$exe
=
"
libtool
";
$exe
=
"
libtool
";
}
}
...
@@ -3049,27 +3064,37 @@ sub gdb_arguments {
...
@@ -3049,27 +3064,37 @@ sub gdb_arguments {
{
{
# write init file for client
# write init file for client
mtr_tofile
(
$gdb_init_file
,
mtr_tofile
(
$gdb_init_file
,
"
set args
$str
\n
"
"
set args
$str
\n
"
.
);
"
break main
\n
"
);
}
}
else
else
{
{
# write init file for mysqld
# write init file for mysqld
mtr_tofile
(
$gdb_init_file
,
mtr_tofile
(
$gdb_init_file
,
"
file $
$exe
\n
"
.
"
set args
$str
\n
"
.
"
set args
$str
\n
"
.
"
break mysql_parse
\n
"
.
"
break mysql_parse
\n
"
.
"
commands 1
\n
"
.
"
commands 1
\n
"
.
"
disable 1
\n
"
.
"
disable 1
\n
"
.
"
end
\n
"
.
"
end
\n
"
.
"
run
"
"
run
");
);
}
if
(
$opt_manual_gdb
)
{
print
"
\n
To start gdb for
$type
, type in another window:
\n
";
print
"
cd
$glob_mysql_test_dir
;
\n
";
print
"
gdb -x
$gdb_init_file
$
$exe
\n
";
# Indicate the exe should not be started
$$exe
=
undef
;
return
;
}
}
$$args
=
[]
;
$$args
=
[]
;
mtr_add_arg
(
$$args
,
"
-title
");
mtr_add_arg
(
$$args
,
"
-title
");
mtr_add_arg
(
$$args
,
"
$type
");
mtr_add_arg
(
$$args
,
"
$type
");
mtr_add_arg
(
$$args
,
"
-e
");
mtr_add_arg
(
$$args
,
"
-e
");
if
(
$glob_use_libtool
)
if
(
$glob_use_libtool
)
{
{
mtr_add_arg
(
$$args
,
"
libtool
");
mtr_add_arg
(
$$args
,
"
libtool
");
...
@@ -3101,8 +3126,7 @@ sub ddd_arguments {
...
@@ -3101,8 +3126,7 @@ sub ddd_arguments {
# write init file for client
# write init file for client
mtr_tofile
(
$gdb_init_file
,
mtr_tofile
(
$gdb_init_file
,
"
set args
$str
\n
"
.
"
set args
$str
\n
"
.
"
break main
\n
"
"
break main
\n
");
);
}
}
else
else
{
{
...
@@ -3114,8 +3138,18 @@ sub ddd_arguments {
...
@@ -3114,8 +3138,18 @@ sub ddd_arguments {
"
commands 1
\n
"
.
"
commands 1
\n
"
.
"
disable 1
\n
"
.
"
disable 1
\n
"
.
"
end
\n
"
.
"
end
\n
"
.
"
run
"
"
run
");
);
}
if
(
$opt_manual_ddd
)
{
print
"
\n
To start ddd for
$type
, type in another window:
\n
";
print
"
cd
$glob_mysql_test_dir
;
\n
";
print
"
ddd -x
$gdb_init_file
$
$exe
\n
";
# Indicate the exe should not be started
$$exe
=
undef
;
return
;
}
}
my
$save_exe
=
$$exe
;
my
$save_exe
=
$$exe
;
...
...
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