summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <msvensson@shellback.(none)>2006-03-07 20:45:44 +0100
committerunknown <msvensson@shellback.(none)>2006-03-07 20:45:44 +0100
commitf11bb1de2af64a4cdafffd0389ef303ffe7fe8df (patch)
tree533c05ad1b440c95dc2ceb61a1b0dab06ab446b2
parentc0711619ad7eceaeacc4b5044db980f3475a6530 (diff)
parentf0f8f114f54cc542b51bfd8ac6368e835117ea54 (diff)
downloadmariadb-git-f11bb1de2af64a4cdafffd0389ef303ffe7fe8df.tar.gz
Merge bk-internal:/home/bk/mysql-5.1-new
into shellback.(none):/home/msvensson/mysql/bug17574/my51-bug17574 mysql-test/mysql-test-run.pl: Auto merged
-rw-r--r--mysql-test/lib/mtr_cases.pl16
-rw-r--r--mysql-test/lib/mtr_report.pl5
-rwxr-xr-xmysql-test/mysql-test-run.pl42
3 files changed, 51 insertions, 12 deletions
diff --git a/mysql-test/lib/mtr_cases.pl b/mysql-test/lib/mtr_cases.pl
index d6068c9691a..3978700c3e8 100644
--- a/mysql-test/lib/mtr_cases.pl
+++ b/mysql-test/lib/mtr_cases.pl
@@ -252,19 +252,27 @@ sub collect_one_test_case($$$$$$$) {
$tinfo->{'slave_restart'}= 1;
}
- if ( ( $::opt_with_ndbcluster or $::glob_use_running_ndbcluster ) and
- ( $::opt_with_ndbcluster_all or defined mtr_match_substring($tname,"ndb") ))
+ if ( $::opt_with_ndbcluster_all or defined mtr_match_substring($tname,"ndb") )
{
+ # This is an ndb test or all tests should be run with ndb cluster started
$tinfo->{'ndb_test'}= 1;
+ if ( $::opt_skip_ndbcluster )
+ {
+ # All ndb test's should be skipped
+ $tinfo->{'skip'}= 1;
+ return;
+ }
}
else
{
+ # This is not a ndb test
+ $tinfo->{'ndb_test'}= 0;
if ( $::opt_with_ndbcluster_only )
- {
+ {
+ # Only the ndb test should be run, all other should be skipped
$tinfo->{'skip'}= 1;
return;
}
- $tinfo->{'ndb_test'}= 0;
}
# FIXME what about embedded_server + ndbcluster, skip ?!
diff --git a/mysql-test/lib/mtr_report.pl b/mysql-test/lib/mtr_report.pl
index 88ddbf63d0f..92ce7437365 100644
--- a/mysql-test/lib/mtr_report.pl
+++ b/mysql-test/lib/mtr_report.pl
@@ -114,6 +114,11 @@ sub mtr_report_test_failed ($) {
{
print "[ fail ] timeout\n";
}
+ elsif ( $tinfo->{'ndb_test'} and !$::flag_ndb_status_ok)
+ {
+ print "[ fail ] ndbcluster start failure\n";
+ return;
+ }
else
{
print "[ fail ]\n";
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 9054b5877ea..5d1b8ac9771 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -1471,7 +1471,6 @@ sub ndbcluster_install () {
"--core"],
"", "", "", "") )
{
- mtr_error("Error ndbcluster_install");
return 1;
}
@@ -1567,7 +1566,6 @@ sub ndbcluster_install_slave () {
"--core"],
"", "", "", "") )
{
- mtr_error("Error ndbcluster_install_slave");
return 1;
}
@@ -1780,16 +1778,37 @@ sub mysql_install_db () {
if ( ndbcluster_install() )
{
- # failed to install, disable usage but flag that its no ok
- $opt_with_ndbcluster= 0;
- $flag_ndb_status_ok= 0;
+ if ( $opt_force)
+ {
+ # failed to install, disable usage and flag that its no ok
+ mtr_report("ndbcluster_install failed, continuing without cluster");
+ $opt_with_ndbcluster= 0;
+ $flag_ndb_status_ok= 0;
+ }
+ else
+ {
+ print "Aborting: Failed to install ndb cluster\n";
+ print "To continue, re-run with '--force'.\n";
+ mtr_exit(1);
+ }
}
if ( ndbcluster_install_slave() )
{
- # failed to install, disable usage but flag that its no ok
- $opt_with_ndbcluster_slave= 0;
- $flag_ndb_slave_status_ok= 0;
+ if ( $opt_force)
+ {
+ # failed to install, disable usage and flag that its no ok
+ mtr_report("ndbcluster_install_slave failed, " .
+ "continuing without slave cluster");
+ $opt_with_ndbcluster_slave= 0;
+ $flag_ndb_slave_status_ok= 0;
+ }
+ else
+ {
+ print "Aborting: Failed to install ndb cluster\n";
+ print "To continue, re-run with '--force'.\n";
+ mtr_exit(1);
+ }
}
return 0;
@@ -1992,6 +2011,13 @@ sub run_testcase ($) {
return;
}
+ if ( $tinfo->{'ndb_test'} and ! $flag_ndb_status_ok )
+ {
+ mtr_report_test_name($tinfo);
+ mtr_report_test_failed($tinfo);
+ return;
+ }
+
# ----------------------------------------------------------------------
# If not using a running servers we may need to stop and restart.
# We restart in the case we have initiation scripts, server options