mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Look for sourced file relative to test first
This commit is contained in:
@ -1004,13 +1004,19 @@ sub tags_from_test_file {
|
|||||||
$value =~ s/^\s+//; # Remove leading space
|
$value =~ s/^\s+//; # Remove leading space
|
||||||
$value =~ s/[[:space:]]+$//; # Remove ending space
|
$value =~ s/[[:space:]]+$//; # Remove ending space
|
||||||
|
|
||||||
my $sourced_file= "$::glob_mysql_test_dir/$value";
|
# Sourced file may exist relative to test or
|
||||||
if ( -f $sourced_file )
|
# in global location
|
||||||
|
foreach my $sourced_file (dirname($file). "/$value",
|
||||||
|
"$::glob_mysql_test_dir/$value")
|
||||||
{
|
{
|
||||||
# Only source the file if it exists, we may get
|
if ( -f $sourced_file )
|
||||||
# false positives in the regexes above if someone
|
{
|
||||||
# writes "source nnnn;" in a test case(such as mysqltest.test)
|
# Only source the file if it exists, we may get
|
||||||
tags_from_test_file($tinfo, $sourced_file);
|
# false positives in the regexes above if someone
|
||||||
|
# writes "source nnnn;" in a test case(such as mysqltest.test)
|
||||||
|
tags_from_test_file($tinfo, $sourced_file);
|
||||||
|
last;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user