./mtr --skip-not-found
New mtr option --skip-not-found makes it to show not found tests as skipped main.a [ skipped ] not found (but only if the test was specified with the suite name) and not error out early with mysql-test-run: *** ERROR: Could not find 'a' in 'main' suite This is useful in buildbot, on builders that generate the list of tests dynamically.
This commit is contained in:
parent
b00fd50fd8
commit
78cd45b29a
@ -154,7 +154,17 @@ sub collect_test_cases ($$$$) {
|
|||||||
{
|
{
|
||||||
push (@$cases, @this_case);
|
push (@$cases, @this_case);
|
||||||
}
|
}
|
||||||
else
|
elsif ($::opt_skip_not_found)
|
||||||
|
{
|
||||||
|
push @$cases, My::Test->new
|
||||||
|
(
|
||||||
|
name => "$sname.$tname",
|
||||||
|
shortname => $tname,
|
||||||
|
skip => 1,
|
||||||
|
comment => 'not found',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
mtr_error("Could not find '$tname' in '$sname' suite");
|
mtr_error("Could not find '$tname' in '$sname' suite");
|
||||||
}
|
}
|
||||||
|
@ -259,6 +259,7 @@ sub using_extern { return (keys %opts_extern > 0);};
|
|||||||
|
|
||||||
our $opt_fast= 0;
|
our $opt_fast= 0;
|
||||||
our $opt_force= 0;
|
our $opt_force= 0;
|
||||||
|
our $opt_skip_not_found= 0;
|
||||||
our $opt_mem= $ENV{'MTR_MEM'};
|
our $opt_mem= $ENV{'MTR_MEM'};
|
||||||
our $opt_clean_vardir= $ENV{'MTR_CLEAN_VARDIR'};
|
our $opt_clean_vardir= $ENV{'MTR_CLEAN_VARDIR'};
|
||||||
|
|
||||||
@ -1158,6 +1159,7 @@ sub command_line_setup {
|
|||||||
|
|
||||||
# Control what test suites or cases to run
|
# Control what test suites or cases to run
|
||||||
'force+' => \$opt_force,
|
'force+' => \$opt_force,
|
||||||
|
'skip-not-found' => \$opt_skip_not_found,
|
||||||
'suite|suites=s' => \$opt_suites,
|
'suite|suites=s' => \$opt_suites,
|
||||||
'skip-rpl' => \&collect_option,
|
'skip-rpl' => \&collect_option,
|
||||||
'skip-test=s' => \&collect_option,
|
'skip-test=s' => \&collect_option,
|
||||||
@ -5802,6 +5804,8 @@ Options to control what test suites or cases to run
|
|||||||
the execution will continue from the next test file.
|
the execution will continue from the next test file.
|
||||||
When specified twice, execution will continue executing
|
When specified twice, execution will continue executing
|
||||||
the failed test file from the next command.
|
the failed test file from the next command.
|
||||||
|
skip-not-found It is not an error if a test was not found in a
|
||||||
|
specified test suite. Test will be marked as skipped.
|
||||||
do-test=PREFIX or REGEX
|
do-test=PREFIX or REGEX
|
||||||
Run test cases which name are prefixed with PREFIX
|
Run test cases which name are prefixed with PREFIX
|
||||||
or fulfills REGEX
|
or fulfills REGEX
|
||||||
|
Loading…
x
Reference in New Issue
Block a user