Skip to content

Commit 8599f16

Browse files
committed
fix mysql-test unit suite to work for out-of-source builds
1 parent 3c422e6 commit 8599f16

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

mysql-test/suite/unit/suite.pm

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,11 @@ sub start_test {
3737
}
3838

3939
{
40+
my $bin=$ENV{MTR_BINDIR} || '..';
4041
return "Not run for embedded server" if $::opt_embedded_server;
41-
return "Not configured to run ctest" unless -f "../CTestTestfile.cmake";
42+
return "Not configured to run ctest" unless -f "$bin/CTestTestfile.cmake";
4243
my ($ctest_vs)= $opt_vs_config ? "--build-config $opt_vs_config" : "";
43-
my (@ctest_list)= `cd .. && ctest $opt_vs_config --show-only --verbose`;
44+
my (@ctest_list)= `cd "$bin" && ctest $opt_vs_config --show-only --verbose`;
4445
return "No ctest" if $?;
4546

4647
my ($command, %tests, $prefix);

0 commit comments

Comments
 (0)