summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <msvensson@neptunus.(none)>2006-11-28 23:12:22 +0100
committerunknown <msvensson@neptunus.(none)>2006-11-28 23:12:22 +0100
commita5aa9f64fe99aab251c5cbcdc8ca3d1e2c5ff40e (patch)
treef4beb0ce1e89e897cb7797cd54e17072ec32bbdb
parent38da90cc2da1f17a77e7874af2bcdabe7ebd9896 (diff)
parent3cd30397a1392a29aa910431f0c26e351de1fde3 (diff)
downloadmariadb-git-a5aa9f64fe99aab251c5cbcdc8ca3d1e2c5ff40e.tar.gz
Merge neptunus.(none):/home/msvensson/mysql/work/my50-work
into neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint mysql-test/mysql-test-run.pl: Auto merged
-rwxr-xr-xmysql-test/mysql-test-run.pl40
1 files changed, 20 insertions, 20 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 1ffa2bbc68c..0d2cd29f014 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -1275,26 +1275,15 @@ sub datadir_list_setup () {
sub collect_mysqld_features () {
- #
- # Execute "mysqld --no-defaults --help --verbose", that will
- # print out version and a list of all features and settings
- #
my $found_variable_list_start= 0;
- my $spec_file= "$glob_mysql_test_dir/mysqld.spec.$$";
- if ( mtr_run($exe_mysqld,
- ["--no-defaults",
- "--verbose",
- "--help"],
- "", "$spec_file", "$spec_file", "") != 0 )
- {
- mtr_error("Failed to get version and list of features from %s",
- $exe_mysqld);
- }
- my $F= IO::File->new($spec_file) or
- mtr_error("can't open file \"$spec_file\": $!");
+ #
+ # Execute "mysqld --no-defaults --help --verbose" to get a
+ # of all features and settings
+ #
+ my $list= `$exe_mysqld --no-defaults --verbose --help`;
- while ( my $line= <$F> )
+ foreach my $line (split('\n', $list))
{
# First look for version
if ( !$mysql_version_id )
@@ -1347,7 +1336,7 @@ sub collect_mysqld_features () {
}
}
}
- unlink($spec_file);
+
mtr_error("Could not find version of MySQL") unless $mysql_version_id;
mtr_error("Could not find variabes list") unless $found_variable_list_start;
@@ -2010,7 +1999,6 @@ sub kill_running_servers () {
}
}
-
#
# Remove var and any directories in var/ created by previous
# tests
@@ -2062,7 +2050,6 @@ sub remove_stale_vardir () {
mtr_error("The destination for symlink $opt_vardir does not exist")
if ! -d readlink($opt_vardir);
- my $dir= shift;
foreach my $bin ( glob("$opt_vardir/*") )
{
mtr_verbose("Removing bin $bin");
@@ -2124,6 +2111,19 @@ sub setup_vardir() {
}
}
+ if ( ! -d $opt_vardir )
+ {
+ mtr_verbose("Creating $opt_vardir");
+ mkpath($opt_vardir);
+ }
+
+ # Ensure a proper error message if vardir couldn't be created
+ unless ( -d $opt_vardir and -w $opt_vardir )
+ {
+ mtr_error("Writable 'var' directory is needed, use the " .
+ "'--vardir=<path>' option");
+ }
+
mkpath("$opt_vardir/log");
mkpath("$opt_vardir/run");
mkpath("$opt_vardir/tmp");