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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
447d2fef
Commit
447d2fef
authored
Aug 21, 2006
by
msvensson@shellback.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Break out and create new function 'run_testcase_check_skip_test'
parent
0f54eccb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
29 deletions
+40
-29
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+40
-29
No files found.
mysql-test/mysql-test-run.pl
View file @
447d2fef
...
@@ -360,6 +360,7 @@ sub install_db ($$);
...
@@ -360,6 +360,7 @@ sub install_db ($$);
sub
run_testcase
($);
sub
run_testcase
($);
sub
run_testcase_stop_servers
($$$);
sub
run_testcase_stop_servers
($$$);
sub
run_testcase_start_servers
($);
sub
run_testcase_start_servers
($);
sub
run_testcase_check_skip_test
($);
sub
report_failure_and_restart
($);
sub
report_failure_and_restart
($);
sub
do_before_start_master
($$);
sub
do_before_start_master
($$);
sub
do_before_start_slave
($$);
sub
do_before_start_slave
($$);
...
@@ -2156,6 +2157,8 @@ sub run_suite () {
...
@@ -2156,6 +2157,8 @@ sub run_suite () {
foreach
my
$tinfo
(
@$tests
)
foreach
my
$tinfo
(
@$tests
)
{
{
next
if
run_testcase_check_skip_test
(
$tinfo
);
mtr_timer_start
(
$glob_timers
,"
testcase
",
60
*
$opt_testcase_timeout
);
mtr_timer_start
(
$glob_timers
,"
testcase
",
60
*
$opt_testcase_timeout
);
run_testcase
(
$tinfo
);
run_testcase
(
$tinfo
);
mtr_timer_stop
(
$glob_timers
,"
testcase
");
mtr_timer_stop
(
$glob_timers
,"
testcase
");
...
@@ -2440,32 +2443,9 @@ sub im_prepare_data_dir($) {
...
@@ -2440,32 +2443,9 @@ sub im_prepare_data_dir($) {
}
}
}
}
sub
run_testcase_check_skip_test
($)
##############################################################################
{
#
my
(
$tinfo
)
=
@_
;
# Run a single test case
#
##############################################################################
# When we get here, we have already filtered out test cases that doesn't
# apply to the current setup, for example if we use a running server, test
# cases that restart the server are dropped. So this function should mostly
# be about doing things, not a lot of logic.
# We don't start and kill the servers for each testcase. But some
# testcases needs a restart, because they specify options to start
# mysqld with. After that testcase, we need to restart again, to set
# back the normal options.
sub
run_testcase
($)
{
my
$tinfo
=
shift
;
my
$tname
=
$tinfo
->
{'
name
'};
mtr_tonewfile
(
$path_current_test_log
,"
$tname
\n
");
# Always tell where we are
# output current test to ndbcluster log file to enable diagnostics
mtr_tofile
(
$file_ndb_testrun_log
,"
CURRENT TEST
$tname
\n
");
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
# If marked to skip, just print out and return.
# If marked to skip, just print out and return.
...
@@ -2478,7 +2458,7 @@ sub run_testcase ($) {
...
@@ -2478,7 +2458,7 @@ sub run_testcase ($) {
{
{
mtr_report_test_name
(
$tinfo
);
mtr_report_test_name
(
$tinfo
);
mtr_report_test_skipped
(
$tinfo
);
mtr_report_test_skipped
(
$tinfo
);
return
;
return
1
;
}
}
# If test needs cluster, check that master installed ok
# If test needs cluster, check that master installed ok
...
@@ -2486,7 +2466,7 @@ sub run_testcase ($) {
...
@@ -2486,7 +2466,7 @@ sub run_testcase ($) {
{
{
mtr_report_test_name
(
$tinfo
);
mtr_report_test_name
(
$tinfo
);
mtr_report_test_failed
(
$tinfo
);
mtr_report_test_failed
(
$tinfo
);
return
;
return
1
;
}
}
# If test needs slave cluster, check that it installed ok
# If test needs slave cluster, check that it installed ok
...
@@ -2495,9 +2475,40 @@ sub run_testcase ($) {
...
@@ -2495,9 +2475,40 @@ sub run_testcase ($) {
{
{
mtr_report_test_name
(
$tinfo
);
mtr_report_test_name
(
$tinfo
);
mtr_report_test_failed
(
$tinfo
);
mtr_report_test_failed
(
$tinfo
);
return
;
return
1
;
}
}
return
0
;
}
##############################################################################
#
# Run a single test case
#
##############################################################################
# When we get here, we have already filtered out test cases that doesn't
# apply to the current setup, for example if we use a running server, test
# cases that restart the server are dropped. So this function should mostly
# be about doing things, not a lot of logic.
# We don't start and kill the servers for each testcase. But some
# testcases needs a restart, because they specify options to start
# mysqld with. After that testcase, we need to restart again, to set
# back the normal options.
sub
run_testcase
($)
{
my
$tinfo
=
shift
;
my
$tname
=
$tinfo
->
{'
name
'};
mtr_tonewfile
(
$path_current_test_log
,"
$tname
\n
");
# Always tell where we are
# output current test to ndbcluster log file to enable diagnostics
mtr_tofile
(
$file_ndb_testrun_log
,"
CURRENT TEST
$tname
\n
");
my
$master_restart
=
run_testcase_need_master_restart
(
$tinfo
);
my
$master_restart
=
run_testcase_need_master_restart
(
$tinfo
);
my
$slave_restart
=
run_testcase_need_slave_restart
(
$tinfo
);
my
$slave_restart
=
run_testcase_need_slave_restart
(
$tinfo
);
...
...
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