~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/test-run.pl

  • Committer: Brian Aker
  • Date: 2008-08-19 17:29:21 UTC
  • Revision ID: brian@tangent.org-20080819172921-bc3kpgsrzsdv338l
Moved Field iterator out to its own definition.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
#
9
9
#  Tool used for executing a suite of .test file
10
10
#
11
 
#  For now, see the "MySQL Test framework manual" for more information
12
 
#  http://dev.mysql.com/doc/mysqltest/en/index.html
13
 
#  (as the Drizzle test environment is currently still fairly similar)
 
11
#  See the "MySQL Test framework manual" for more information
 
12
#  http://dev.mysql.com/doc/drizzletest/en/index.html
14
13
#
15
14
#  Please keep the test framework tools identical in all versions!
16
15
#
104
103
 
105
104
our $glob_basedir;
106
105
 
 
106
our $path_charsetsdir;
107
107
our $path_client_bindir;
 
108
our $path_share;
108
109
our $path_timefile;
109
110
our $path_snapshot;
110
111
our $path_drizzletest_log;
133
134
our $exe_drizzled;
134
135
our $exe_drizzlecheck;
135
136
our $exe_drizzledump;
136
 
our $exe_drizzleslap;
 
137
our $exe_mysqlslap;
137
138
our $exe_drizzleimport;
138
139
our $exe_drizzle_fix_system_tables;
139
140
our $exe_drizzletest;
634
635
  $path_client_bindir= mtr_path_exists("$glob_basedir/client",
635
636
                                       "$glob_basedir/bin");
636
637
 
 
638
  # Look for charsetsdir, use same share
 
639
  $path_share=      mtr_path_exists("$glob_basedir/share/mysql",
 
640
                                    "$glob_basedir/drizzled/share",
 
641
                                    "$glob_basedir/share");
 
642
 
 
643
  $path_charsetsdir=   mtr_path_exists("$path_share/charsets");
 
644
 
 
645
 
 
646
 
637
647
  if (!$opt_extern)
638
648
  {
639
649
    $exe_drizzled=       mtr_exe_exists ("$glob_basedir/drizzled/drizzled",
1240
1250
  if (!$opt_extern)
1241
1251
  {
1242
1252
# Look for SQL scripts directory
1243
 
     if ( $mysql_version_id >= 50100 )
1244
 
     {
1245
 
         $exe_drizzleslap= mtr_exe_exists("$path_client_bindir/drizzleslap");
1246
 
     }
 
1253
    if ( $mysql_version_id >= 50100 )
 
1254
    {
 
1255
      $exe_mysqlslap= mtr_exe_exists("$path_client_bindir/mysqlslap");
 
1256
    }
1247
1257
  }
1248
1258
 
1249
1259
# Look for drizzletest executable
1385
1395
  # Also command lines in .opt files may contain env vars
1386
1396
  # --------------------------------------------------------------------------
1387
1397
 
1388
 
  $ENV{'CHARSETSDIR'}=              "";
 
1398
  $ENV{'CHARSETSDIR'}=              $path_charsetsdir;
1389
1399
  $ENV{'UMASK'}=              "0660"; # The octal *string*
1390
1400
  $ENV{'UMASK_DIR'}=          "0770"; # The octal *string*
1391
1401
  
1450
1460
  $ENV{'DRIZZLE_DUMP'}= $cmdline_mysqldump;
1451
1461
  $ENV{'DRIZZLE_DUMP_SLAVE'}= $cmdline_mysqldumpslave;
1452
1462
 
 
1463
 
1453
1464
  # ----------------------------------------------------
1454
1465
  # Setup env so childs can execute mysqlslap
1455
1466
  # ----------------------------------------------------
1456
 
  if ( $exe_drizzleslap )
 
1467
  if ( $exe_mysqlslap )
1457
1468
  {
1458
 
    my $cmdline_drizzleslap=
1459
 
      mtr_native_path($exe_drizzleslap) .
 
1469
    my $cmdline_mysqlslap=
 
1470
      mtr_native_path($exe_mysqlslap) .
1460
1471
      " -uroot " .
1461
1472
      "--port=$master->[0]->{'port'} ";
1462
1473
 
1463
1474
    if ( $opt_debug )
1464
1475
   {
1465
 
      $cmdline_drizzleslap .=
1466
 
        " --debug=d:t:A,$path_vardir_trace/log/drizzleslap.trace";
 
1476
      $cmdline_mysqlslap .=
 
1477
        " --debug=d:t:A,$path_vardir_trace/log/mysqlslap.trace";
1467
1478
    }
1468
 
    $ENV{'DRIZZLE_SLAP'}= $cmdline_drizzleslap;
 
1479
    $ENV{'DRIZZLE_SLAP'}= $cmdline_mysqlslap;
1469
1480
  }
1470
1481
 
1471
 
 
1472
 
 
1473
1482
  # ----------------------------------------------------
1474
1483
  # Setup env so childs can execute mysqlimport
1475
1484
  # ----------------------------------------------------
1492
1501
  my $cmdline_mysqlbinlog=
1493
1502
    mtr_native_path($exe_drizzlebinlog) .
1494
1503
      " --no-defaults --disable-force-if-open --debug-check";
 
1504
  if ( !$opt_extern && $mysql_version_id >= 50000 )
 
1505
  {
 
1506
    $cmdline_mysqlbinlog .=" --character-sets-dir=$path_charsetsdir";
 
1507
  }
1495
1508
 
1496
1509
  if ( $opt_debug )
1497
1510
  {
1506
1519
  my $cmdline_mysql=
1507
1520
    mtr_native_path($exe_drizzle) .
1508
1521
    " --no-defaults --debug-check --host=localhost  --user=root --password= " .
1509
 
    "--port=$master->[0]->{'port'} ";
 
1522
    "--port=$master->[0]->{'port'} " .
 
1523
    "--character-sets-dir=$path_charsetsdir";
1510
1524
 
1511
1525
  $ENV{'MYSQL'}= $cmdline_mysql;
1512
1526
 
2475
2489
  mtr_add_arg($args, "%s--no-defaults", $prefix);
2476
2490
 
2477
2491
  mtr_add_arg($args, "%s--basedir=%s", $prefix, $path_my_basedir);
 
2492
  mtr_add_arg($args, "%s--character-sets-dir=%s", $prefix, $path_charsetsdir);
2478
2493
 
2479
2494
  if ( $mysql_version_id >= 50036)
2480
2495
  {
2487
2502
    mtr_add_arg($args, "%s--log-bin-trust-function-creators", $prefix);
2488
2503
  }
2489
2504
 
2490
 
  mtr_add_arg($args, "%s--default-character-set=utf8", $prefix);
 
2505
  mtr_add_arg($args, "%s--default-character-set=latin1", $prefix);
2491
2506
  mtr_add_arg($args, "%s--tmpdir=$opt_tmpdir", $prefix);
2492
2507
 
2493
2508
  # Increase default connect_timeout to avoid intermittent
3072
3087
  mtr_add_arg($args, "--no-defaults");
3073
3088
  mtr_add_arg($args, "--silent");
3074
3089
  mtr_add_arg($args, "--tmpdir=%s", $opt_tmpdir);
 
3090
  mtr_add_arg($args, "--character-sets-dir=%s", $path_charsetsdir);
3075
3091
 
3076
3092
  mtr_add_arg($args, "--port=%d", $mysqld->{'port'});
3077
3093
  mtr_add_arg($args, "--database=test");
3150
3166
  mtr_add_arg($args, "--no-defaults");
3151
3167
  mtr_add_arg($args, "--silent");
3152
3168
  mtr_add_arg($args, "--tmpdir=%s", $opt_tmpdir);
 
3169
  mtr_add_arg($args, "--character-sets-dir=%s", $path_charsetsdir);
3153
3170
  mtr_add_arg($args, "--logdir=%s/log", $opt_vardir);
3154
3171
 
3155
3172
  # Log line number and time  for each line in .test file