Commit 2b8f2b3e authored by Sergei Golubchik's avatar Sergei Golubchik

Fix unit suite on Windows and in out-of-source builds

parent 0a9d78f5
...@@ -28,10 +28,11 @@ sub start_test { ...@@ -28,10 +28,11 @@ sub start_test {
} }
{ {
my $bin=$ENV{MTR_BINDIR} || '..';
return "Not run for embedded server" if $::opt_embedded_server; return "Not run for embedded server" if $::opt_embedded_server;
return "Not configured to run ctest" unless -f "../CTestTestfile.cmake"; return "Not configured to run ctest" unless -f "$bin/CTestTestfile.cmake";
my ($ctest_vs)= $opt_vs_config ? "--build-config $opt_vs_config" : ""; my ($ctest_vs)= $::opt_vs_config ? "-C ".substr($::opt_vs_config,1) : "";
my (@ctest_list)= `cd .. && ctest $opt_vs_config --show-only --verbose`; my (@ctest_list)= `cd $bin && ctest $ctest_vs --show-only --verbose`;
return "No ctest" if $?; return "No ctest" if $?;
my ($command, %tests); my ($command, %tests);
......
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