[test] add executable suffix for TestConnect

This commit is contained in:
akallabeth 2023-07-04 16:17:47 +02:00 committed by Martin Fleisz
parent bd7f0ecd24
commit d9b03b45ed
2 changed files with 3 additions and 2 deletions

View File

@ -13,6 +13,7 @@ set(${MODULE_PREFIX}_FUZZERS
TestFuzzCryptoCertificateDataSetPEM.c)
if(WITH_SAMPLE AND WITH_SERVER)
add_definitions(-DCMAKE_EXECUTABLE_SUFFIX="${CMAKE_EXECUTABLE_SUFFIX}")
set(${MODULE_PREFIX}_TESTS
${${MODULE_PREFIX}_TESTS}
TestConnect.c)

View File

@ -211,7 +211,7 @@ static BOOL prepare_certificates(const char* path)
return FALSE;
exe = concatenate(5, TESTING_OUTPUT_DIRECTORY, "winpr", "tools", "makecert-cli",
"winpr-makecert");
"winpr-makecert" CMAKE_EXECUTABLE_SUFFIX);
if (!exe)
return FALSE;
_snprintf(commandLine, sizeof(commandLine), "%s -format crt -path . -n server", exe);
@ -261,7 +261,7 @@ static int testSuccess(int port)
if (!path || !wpath)
goto fail;
exe = GetCombinedPath(path, "sfreerdp-server");
exe = GetCombinedPath(path, "sfreerdp-server" CMAKE_EXECUTABLE_SUFFIX);
if (!exe)
goto fail;