Look for sourced file relative to test first

parent c7f2d6ef
......@@ -1004,13 +1004,19 @@ sub tags_from_test_file {
$value =~ s/^\s+//; # Remove leading space
$value =~ s/[[:space:]]+$//; # Remove ending space
my $sourced_file= "$::glob_mysql_test_dir/$value";
# Sourced file may exist relative to test or
# in global location
foreach my $sourced_file (dirname($file). "/$value",
"$::glob_mysql_test_dir/$value")
{
if ( -f $sourced_file )
{
# Only source the file if it exists, we may get
# 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;
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment