~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/test-run.pl

  • Committer: Brian Aker
  • Date: 2009-04-07 06:38:05 UTC
  • mfrom: (975.1.3 merge)
  • Revision ID: brian@gaz-20090407063805-vd0t7tim8vxkqz4j
Merge of session lock removal

Show diffs side-by-side

added added

removed removed

Lines of Context:
130
130
our $opt_script_debug= 0;  # Script debugging, enable with --script-debug
131
131
our $opt_verbose= 0;  # Verbose output, enable with --verbose
132
132
 
133
 
our $opt_repeat_test= 1;
134
 
 
135
133
our $exe_master_mysqld;
136
134
our $exe_drizzle;
 
135
our $exe_drizzleadmin;
137
136
our $exe_drizzle_client_test;
138
137
our $exe_bug25714;
139
138
our $exe_drizzled;
563
562
             'testcase-timeout=i'       => \$opt_testcase_timeout,
564
563
             'suite-timeout=i'          => \$opt_suite_timeout,
565
564
             'warnings|log-warnings'    => \$opt_warnings,
566
 
             'repeat-test=i'            => \$opt_repeat_test,
567
565
 
568
566
             # Options which are no longer used
569
567
             (map { $_ => \&warn_about_removed_option } @removed_options),
1214
1212
  $exe_drizzlecheck= mtr_exe_exists("$path_client_bindir/drizzlecheck");
1215
1213
  $exe_drizzledump= mtr_exe_exists("$path_client_bindir/drizzledump");
1216
1214
  $exe_drizzleimport= mtr_exe_exists("$path_client_bindir/drizzleimport");
 
1215
  $exe_drizzleadmin= mtr_exe_exists("$path_client_bindir/drizzleadmin");
1217
1216
  $exe_drizzle=          mtr_exe_exists("$path_client_bindir/drizzle");
1218
1217
 
1219
1218
  if (!$opt_extern)
1509
1508
  $ENV{'DRIZZLE_MY_PRINT_DEFAULTS'}= mtr_native_path($exe_my_print_defaults);
1510
1509
 
1511
1510
  # ----------------------------------------------------
1512
 
  # Setup env so childs can shutdown the server
 
1511
  # Setup env so childs can execute mysqladmin
1513
1512
  # ----------------------------------------------------
1514
 
  $ENV{'DRIZZLED_SHUTDOWN'}= mtr_native_path($exe_drizzle);
 
1513
  $ENV{'MYSQLADMIN'}= mtr_native_path($exe_drizzleadmin);
1515
1514
 
1516
1515
  # ----------------------------------------------------
1517
1516
  # Setup env so childs can execute perror  
1882
1881
 
1883
1882
  foreach my $tinfo ( @$tests )
1884
1883
  {
1885
 
    foreach(1..$opt_repeat_test)
 
1884
    if (run_testcase_check_skip_test($tinfo))
1886
1885
    {
1887
 
      if (run_testcase_check_skip_test($tinfo))
1888
 
        {
1889
 
          next;
1890
 
        }
1891
 
 
1892
 
      mtr_timer_start($glob_timers,"testcase", 60 * $opt_testcase_timeout);
1893
 
      run_testcase($tinfo);
1894
 
      mtr_timer_stop($glob_timers,"testcase");
 
1886
      next;
1895
1887
    }
 
1888
 
 
1889
    mtr_timer_start($glob_timers,"testcase", 60 * $opt_testcase_timeout);
 
1890
    run_testcase($tinfo);
 
1891
    mtr_timer_stop($glob_timers,"testcase");
1896
1892
  }
1897
1893
 
1898
1894
  mtr_print_line();
2664
2660
  {
2665
2661
    if ( $mysqld->{'pid'} )
2666
2662
    {
2667
 
      $pid= mtr_server_shutdown($mysqld);
 
2663
      $pid= mtr_mysqladmin_start($mysqld, "shutdown", 70);
2668
2664
      $admin_pids{$pid}= 1;
2669
2665
 
2670
2666
      push(@kill_pids,{
2822
2818
    {
2823
2819
      if ( $mysqld->{'pid'} )
2824
2820
      {
2825
 
        $pid= mtr_server_shutdown($mysqld);
2826
 
 
2827
 
        $admin_pids{$pid}= 1;
2828
 
 
2829
 
        push(@kill_pids,{
2830
 
              pid      => $mysqld->{'pid'},
2831
 
              real_pid => $mysqld->{'real_pid'},
2832
 
              pidfile  => $mysqld->{'path_pid'},
2833
 
              sockfile => $mysqld->{'path_sock'},
2834
 
              port     => $mysqld->{'port'},
2835
 
              errfile   => $mysqld->{'path_myerr'},
2836
 
        });
2837
 
 
2838
 
        $mysqld->{'pid'}= 0; # Assume we are done with it
 
2821
        $pid= mtr_mysqladmin_start($mysqld, "shutdown", 20);
 
2822
 
 
2823
        $admin_pids{$pid}= 1;
 
2824
 
 
2825
        push(@kill_pids,{
 
2826
                         pid      => $mysqld->{'pid'},
 
2827
                         real_pid => $mysqld->{'real_pid'},
 
2828
                         pidfile  => $mysqld->{'path_pid'},
 
2829
                         sockfile => $mysqld->{'path_sock'},
 
2830
                         port     => $mysqld->{'port'},
 
2831
                         errfile   => $mysqld->{'path_myerr'},
 
2832
                        });
 
2833
 
 
2834
        $mysqld->{'pid'}= 0; # Assume we are done with it
2839
2835
      }
2840
2836
    }
2841
2837
  }
2850
2846
    {
2851
2847
      if ( $mysqld->{'pid'} )
2852
2848
      {
2853
 
        $pid= mtr_server_shutdown($mysqld);
2854
 
 
2855
 
        $admin_pids{$pid}= 1;
2856
 
 
2857
 
        push(@kill_pids,{
2858
 
              pid      => $mysqld->{'pid'},
2859
 
              real_pid => $mysqld->{'real_pid'},
2860
 
              pidfile  => $mysqld->{'path_pid'},
2861
 
              sockfile => $mysqld->{'path_sock'},
2862
 
              port     => $mysqld->{'port'},
2863
 
              errfile  => $mysqld->{'path_myerr'},
2864
 
        });
2865
 
 
2866
 
        $mysqld->{'pid'}= 0; # Assume we are done with it
 
2849
        $pid= mtr_mysqladmin_start($mysqld, "shutdown", 20);
 
2850
 
 
2851
        $admin_pids{$pid}= 1;
 
2852
 
 
2853
        push(@kill_pids,{
 
2854
                         pid      => $mysqld->{'pid'},
 
2855
                         real_pid => $mysqld->{'real_pid'},
 
2856
                         pidfile  => $mysqld->{'path_pid'},
 
2857
                         sockfile => $mysqld->{'path_sock'},
 
2858
                         port     => $mysqld->{'port'},
 
2859
                         errfile   => $mysqld->{'path_myerr'},
 
2860
                        });
 
2861
 
 
2862
 
 
2863
        $mysqld->{'pid'}= 0; # Assume we are done with it
2867
2864
      }
2868
2865
    }
2869
2866
  }
3492
3489
  combination="ARG1 .. ARG2" Specify a set of "mysqld" arguments for one
3493
3490
                        combination.
3494
3491
  skip-combination      Skip any combination options and combinations files
3495
 
  repeat-test=n         How many times to repeat each test (default: 1)
3496
3492
 
3497
3493
Options that specify ports
3498
3494