Index: ndb-work/mysql-test/mysql-test-run.pl =================================================================== --- ndb-work.orig/mysql-test/mysql-test-run.pl 2007-05-16 07:34:00.341678750 +0200 +++ ndb-work/mysql-test/mysql-test-run.pl 2007-05-16 07:34:00.665699000 +0200 @@ -930,8 +930,8 @@ sub command_line_setup () { $glob_use_running_ndbcluster= 1; mtr_error("Can't specify --ndb-connectstring and --skip-ndbcluster") if $opt_skip_ndbcluster; - mtr_error("Can't specify --ndb-connectstring and --ndbcluster-port") - if $opt_ndbcluster_port; +# mtr_error("Can't specify --ndb-connectstring and --ndbcluster-port") +# if $opt_ndbcluster_port; } else { @@ -3205,7 +3205,7 @@ sub run_testcase_check_skip_test($) } # If test needs this cluster, check it was installed ok - if ( !$cluster->{'installed_ok'} ) + if ( !$opt_ndbconnectstring && !$cluster->{'installed_ok'} ) { mtr_report_test_name($tinfo); $tinfo->{comment}= @@ -3801,8 +3801,8 @@ sub mysqld_arguments ($$$$) { } my $cluster= $clusters->[$mysqld->{'cluster'}]; - if ( $opt_skip_ndbcluster || - !$cluster->{'pid'}) + if ( !$opt_ndbconnectstring && ($opt_skip_ndbcluster || + !$cluster->{'pid'})) { mtr_add_arg($args, "%s--skip-ndbcluster", $prefix); } @@ -4103,8 +4103,11 @@ sub stop_all_servers () { # Start shutdown of clusters foreach my $cluster (@{$clusters}) { + # in future, should be per-cluster check + next if $glob_use_running_ndbcluster; if ( $cluster->{'pid'} ) { + print "ARRRGGHH 2 \n\n"; $pid= mtr_ndbmgm_start($cluster, "shutdown"); $admin_pids{$pid}= 1; @@ -4164,7 +4167,7 @@ sub run_testcase_need_master_restart($) $do_restart= 1; # Always restart if --force-restart in -opt file mtr_verbose("Restart master: Restart forced with --force-restart"); } - elsif ( ! $opt_skip_ndbcluster and + elsif ( !$opt_ndbconnectstring and ! $opt_skip_ndbcluster and !$tinfo->{'ndb_test'} and $clusters->[0]->{'pid'} != 0 ) { @@ -4308,8 +4311,9 @@ sub run_testcase_stop_servers($$$) { # Start shutdown of master cluster my $cluster= $clusters->[0]; - if ( $cluster->{'pid'} ) + if ( $cluster->{'pid'} && !$glob_use_running_ndbcluster) { + print "ARRRGGGGGHHHH 3\n\n"; $pid= mtr_ndbmgm_start($cluster, "shutdown"); $admin_pids{$pid}= 1; @@ -4359,8 +4363,9 @@ sub run_testcase_stop_servers($$$) { # Start shutdown of slave cluster my $cluster= $clusters->[1]; - if ( $cluster->{'pid'} ) + if ( $cluster->{'pid'} && !$glob_use_running_ndbcluster) { + print "ARRGHH\n\n"; $pid= mtr_ndbmgm_start($cluster, "shutdown"); $admin_pids{$pid}= 1; Index: ndb-work/mysql-test/lib/mtr_process.pl =================================================================== --- ndb-work.orig/mysql-test/lib/mtr_process.pl 2007-05-16 07:19:03.285616250 +0200 +++ ndb-work/mysql-test/lib/mtr_process.pl 2007-05-16 07:34:00.665699000 +0200 @@ -390,6 +390,9 @@ sub mtr_kill_leftovers () { foreach my $cluster (@{$::clusters}) { + # in future, should be per-cluster check + next if $::glob_use_running_ndbcluster; + mtr_debug(" - cluster " . "(pid: $cluster->{pid}; " . "pid file: '$cluster->{path_pid})");