1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

address review comments

This commit is contained in:
Daniel Fischer
2009-02-25 15:00:17 +01:00
parent 82b0741dbb
commit 0d097d80e2
3 changed files with 34 additions and 22 deletions

View File

@ -170,6 +170,7 @@ my $config; # The currently running config
my $current_config_name; # The currently running config file template
our $opt_experimental;
our $experimental_test_cases;
my $baseport;
my $opt_build_thread= $ENV{'MTR_BUILD_THREAD'} || "auto";
@ -963,24 +964,29 @@ sub command_line_setup {
if ( $opt_experimental )
{
if ( open(FILE, "<", $opt_experimental) ) {
mtr_report("Using experimental file: $opt_experimental");
$opt_experimental = [];
while(<FILE>) {
chomp;
s/( +|^)#.*$//;
s/^ +//;
s/ +$//;
if ( $_ eq "" ) {
next;
}
print " - $_\n";
push @$opt_experimental, $_;
# read the list of experimental test cases from the file specified on
# the command line
open(FILE, "<", $opt_experimental) or mtr_error("Can't read experimental file: $opt_experimental");
mtr_report("Using experimental file: $opt_experimental");
$experimental_test_cases = [];
while(<FILE>) {
chomp;
# remove comments (# foo) at the beginning of the line, or after a
# blank at the end of the line
s/( +|^)#.*$//;
# remove whitespace
s/^ +//;
s/ +$//;
# if nothing left, don't need to remember this line
if ( $_ eq "" ) {
next;
}
close FILE;
} else {
mtr_error("Can't read experimental file: $opt_experimental");
# remember what is left as the name of another test case that should be
# treated as experimental
print " - $_\n";
push @$experimental_test_cases, $_;
}
close FILE;
}
foreach my $arg ( @ARGV )