move to dev ops OSX (#640)
* move to dev ops OSX * include #include <stdio.h> * update to VS2022 * added #include <string.h> * update includes * disable constbuffer_ut * disable lock_ut * disable refcount_ut * try macOS-12 * try macOS-13 * exclude MAC * conversion * handle main() int return * compile issues * no-strict-prototypes * strict-prototypes * add_definitions(-DOPENSSL_NO_DEPRECATED) * compile flags * c99
This commit is contained in:
Родитель
1aa49d3c1c
Коммит
9e8599f960
|
@ -54,7 +54,7 @@ if(WIN32)
|
|||
|
||||
else()
|
||||
option(use_schannel "set use_schannel to ON if schannel is to be used, set to OFF to not use schannel" OFF)
|
||||
if(MACOSX)
|
||||
if(DEFINED MACOSX)
|
||||
option(use_openssl "set use_openssl to ON if openssl is to be used, set to OFF to not use openssl" OFF)
|
||||
option(use_socketio "set use_socketio to ON if socketio is to be included in the library, set to OFF if a different implementation will be provided" OFF)
|
||||
else()
|
||||
|
@ -71,7 +71,7 @@ option(no_logging "disable logging (default is OFF)" OFF)
|
|||
|
||||
# The options setting for use_socketio is not reliable. If openssl is used, make sure it's on,
|
||||
# and if apple tls is used then use_socketio must be off.
|
||||
if (MACOSX)
|
||||
if (DEFINED MACOSX)
|
||||
if (${use_openssl})
|
||||
set(use_socketio ON)
|
||||
else()
|
||||
|
@ -472,7 +472,7 @@ SOURCE_GROUP(devdoc FILES ${aziotsharedutil_md_files})
|
|||
|
||||
# Add ignore deprecated functions so we may use 1.1.1 APIs
|
||||
# in OpenSSL 3
|
||||
if(LINUX OR MACOSX)
|
||||
if(DEFINED LINUX OR DEFINED MACOSX)
|
||||
set_property(
|
||||
SOURCE
|
||||
${CMAKE_CURRENT_LIST_DIR}/adapters/tlsio_openssl.c
|
||||
|
|
|
@ -51,11 +51,10 @@ jobs:
|
|||
- job: windowsx86
|
||||
displayName: Windows x86
|
||||
pool:
|
||||
name: 'sdk-c--win-vs2017'
|
||||
name: 'sdk-c--win-vs2022'
|
||||
steps:
|
||||
- script: |
|
||||
if exist jenkins\windows_c.cmd (
|
||||
call "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat"
|
||||
call jenkins\windows_c.cmd)
|
||||
displayName: 'Build'
|
||||
- script: |
|
||||
|
@ -83,12 +82,11 @@ jobs:
|
|||
CodeQL.Enabled: true
|
||||
CodeQL.Language: cpp
|
||||
pool:
|
||||
name: 'sdk-c--win-vs2017'
|
||||
name: 'sdk-c--win-vs2022'
|
||||
displayName: 'Windows x64'
|
||||
steps:
|
||||
- script: |
|
||||
if exist jenkins\windows_c.cmd (
|
||||
call "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat"
|
||||
call jenkins\windows_c.cmd --platform x64)
|
||||
displayName: 'Build'
|
||||
- script: |
|
||||
|
@ -117,11 +115,10 @@ jobs:
|
|||
- job: windowsdynamic
|
||||
displayName: Windows Dynamic
|
||||
pool:
|
||||
name: 'sdk-c--win-vs2017'
|
||||
name: 'sdk-c--win-vs2022'
|
||||
steps:
|
||||
- script: |
|
||||
if exist jenkins\windows_c_build_as_dynamic.cmd (
|
||||
call "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat"
|
||||
call jenkins\windows_c_build_as_dynamic.cmd)
|
||||
displayName: 'Build'
|
||||
env:
|
||||
|
@ -480,7 +477,7 @@ jobs:
|
|||
- job: OSX
|
||||
displayName: OSX
|
||||
pool:
|
||||
name: OSX
|
||||
vmImage: 'macOS-13'
|
||||
steps:
|
||||
- script: |
|
||||
if [ -f "jenkins/osx_gcc_openssl.sh" ]
|
||||
|
@ -515,7 +512,7 @@ jobs:
|
|||
- job: xcodenative
|
||||
displayName: XCode Native
|
||||
pool:
|
||||
name: OSX
|
||||
vmImage: 'macOS-13'
|
||||
steps:
|
||||
- script: |
|
||||
if [ -f "jenkins/osx_xcode_native.sh" ]
|
||||
|
|
|
@ -30,7 +30,7 @@ if(${run_unittests})
|
|||
add_subdirectory(httpapicompact_ut)
|
||||
endif()
|
||||
add_subdirectory(singlylinkedlist_ut)
|
||||
add_subdirectory(lock_ut)
|
||||
add_subdirectory(lock_ut)
|
||||
add_subdirectory(map_ut)
|
||||
add_subdirectory(refcount_ut)
|
||||
add_subdirectory(sastoken_ut)
|
||||
|
@ -47,7 +47,7 @@ if(${run_unittests})
|
|||
endif()
|
||||
|
||||
#normally, with proper include paths, the below tests can be run under windows too.
|
||||
if(${use_openssl})
|
||||
if(${use_openssl} AND NOT DEFINED MACOSX)
|
||||
add_subdirectory(x509_openssl_ut/engine)
|
||||
add_subdirectory(x509_openssl_ut/no_engine)
|
||||
endif()
|
||||
|
@ -93,9 +93,9 @@ if(${run_unittests})
|
|||
|
||||
add_subdirectory(utf8_checker_ut)
|
||||
add_subdirectory(http_proxy_io_ut)
|
||||
if(NOT DEFINED MACOSX)
|
||||
#add_subdirectory(socket_async_ut)
|
||||
#add_subdirectory(dns_resolver_ut)
|
||||
if(DEFINED LINUX)
|
||||
add_subdirectory(dns_resolver_ut)
|
||||
add_subdirectory(socket_async_ut)
|
||||
endif()
|
||||
|
||||
#Add template as reference for new tests
|
||||
|
|
|
@ -8,5 +8,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(agenttime_unittests, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(azure_base32_ut, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(base64_unittests, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(Condition_UnitTests, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(connectionstringparser_ut, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -7,5 +7,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(constbuffer_array_batcher_unittests, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -7,5 +7,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(constbuffer_array_unittests, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -16,3 +16,4 @@ set(${theseTestsName}_h_files
|
|||
|
||||
build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests")
|
||||
|
||||
compile_c_test_artifacts_as(${theseTestsName} C99)
|
||||
|
|
|
@ -8,5 +8,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(constmap_unittests, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(CRTAbstractions_UnitTests, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -39,6 +39,11 @@ void* my_gballoc_malloc(size_t size)
|
|||
return malloc(size);
|
||||
}
|
||||
|
||||
void* my_gballoc_calloc(size_t nmemb, size_t size)
|
||||
{
|
||||
return calloc(nmemb, size);
|
||||
}
|
||||
|
||||
void* my_gballoc_realloc(void* ptr, size_t size)
|
||||
{
|
||||
return realloc(ptr, size);
|
||||
|
@ -140,6 +145,7 @@ BEGIN_TEST_SUITE(dns_resolver_ut)
|
|||
ASSERT_ARE_EQUAL(int, 0, result);
|
||||
|
||||
REGISTER_GLOBAL_MOCK_HOOK(gballoc_malloc, my_gballoc_malloc);
|
||||
REGISTER_GLOBAL_MOCK_HOOK(gballoc_calloc, my_gballoc_calloc);
|
||||
REGISTER_GLOBAL_MOCK_FAIL_RETURN(gballoc_malloc, NULL);
|
||||
REGISTER_GLOBAL_MOCK_HOOK(gballoc_free, my_gballoc_free);
|
||||
|
||||
|
@ -187,7 +193,7 @@ BEGIN_TEST_SUITE(dns_resolver_ut)
|
|||
TEST_FUNCTION(dns_resolver__is_complete_repeated_call__succeeds)
|
||||
{
|
||||
///arrange
|
||||
DNSRESOLVER_HANDLE dns = dns_resolver_create("fake.com", NULL);
|
||||
DNSRESOLVER_HANDLE dns = dns_resolver_create("fake.com", 53, NULL);
|
||||
// We're calling this twice
|
||||
bool result = dns_resolver_is_lookup_complete(dns);
|
||||
uint32_t ipv4 = dns_resolver_get_ipv4(dns);
|
||||
|
@ -220,7 +226,7 @@ BEGIN_TEST_SUITE(dns_resolver_ut)
|
|||
{
|
||||
///arrange
|
||||
bool result;
|
||||
DNSRESOLVER_HANDLE dns = dns_resolver_create("fake.com", NULL);
|
||||
DNSRESOLVER_HANDLE dns = dns_resolver_create("fake.com", 53, NULL);
|
||||
umock_c_reset_all_calls();
|
||||
STRICT_EXPECTED_CALL(getaddrinfo(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG));
|
||||
|
||||
|
@ -240,7 +246,7 @@ BEGIN_TEST_SUITE(dns_resolver_ut)
|
|||
///arrange
|
||||
bool result;
|
||||
uint32_t ipv4;
|
||||
DNSRESOLVER_HANDLE dns = dns_resolver_create("fake.com", NULL);
|
||||
DNSRESOLVER_HANDLE dns = dns_resolver_create("fake.com", 53, NULL);
|
||||
umock_c_reset_all_calls();
|
||||
STRICT_EXPECTED_CALL(getaddrinfo(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG));
|
||||
result = dns_resolver_is_lookup_complete(dns);
|
||||
|
@ -261,7 +267,7 @@ BEGIN_TEST_SUITE(dns_resolver_ut)
|
|||
{
|
||||
///arrange
|
||||
bool result;
|
||||
DNSRESOLVER_HANDLE dns = dns_resolver_create("fake.com", NULL);
|
||||
DNSRESOLVER_HANDLE dns = dns_resolver_create("fake.com", 53, NULL);
|
||||
umock_c_reset_all_calls();
|
||||
STRICT_EXPECTED_CALL(getaddrinfo(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)).SetReturn(GETADDRINFO_FAIL);
|
||||
|
||||
|
@ -281,7 +287,7 @@ BEGIN_TEST_SUITE(dns_resolver_ut)
|
|||
///arrange
|
||||
bool result;
|
||||
uint32_t ipv4;
|
||||
DNSRESOLVER_HANDLE dns = dns_resolver_create("fake.com", NULL);
|
||||
DNSRESOLVER_HANDLE dns = dns_resolver_create("fake.com", 53, NULL);
|
||||
umock_c_reset_all_calls();
|
||||
STRICT_EXPECTED_CALL(getaddrinfo(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)).SetReturn(GETADDRINFO_FAIL);
|
||||
result = dns_resolver_is_lookup_complete(dns);
|
||||
|
@ -314,7 +320,7 @@ BEGIN_TEST_SUITE(dns_resolver_ut)
|
|||
TEST_FUNCTION(dns_resolver__get_ipv4_too_early__fails)
|
||||
{
|
||||
///arrange
|
||||
DNSRESOLVER_HANDLE dns = dns_resolver_create("fake.com", NULL);
|
||||
DNSRESOLVER_HANDLE dns = dns_resolver_create("fake.com", 53, NULL);
|
||||
|
||||
///act
|
||||
uint32_t result = dns_resolver_get_ipv4(dns);
|
||||
|
@ -355,7 +361,7 @@ BEGIN_TEST_SUITE(dns_resolver_ut)
|
|||
TEST_FUNCTION(dns_resolver__destroy__success)
|
||||
{
|
||||
///arrange
|
||||
DNSRESOLVER_HANDLE result = dns_resolver_create("fake.com", NULL);
|
||||
DNSRESOLVER_HANDLE result = dns_resolver_create("fake.com", 53, NULL);
|
||||
umock_c_reset_all_calls();
|
||||
|
||||
STRICT_EXPECTED_CALL(gballoc_free(IGNORED_NUM_ARG)); // copy hostname
|
||||
|
@ -373,11 +379,11 @@ BEGIN_TEST_SUITE(dns_resolver_ut)
|
|||
{
|
||||
///arrange
|
||||
DNSRESOLVER_HANDLE result;
|
||||
STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); // copy hostname
|
||||
STRICT_EXPECTED_CALL(gballoc_calloc(IGNORED_NUM_ARG, IGNORED_NUM_ARG)); // copy hostname
|
||||
STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); // instance
|
||||
|
||||
///act
|
||||
result = dns_resolver_create("fake.com", NULL);
|
||||
result = dns_resolver_create("fake.com", 53, NULL);
|
||||
|
||||
///assert
|
||||
ASSERT_IS_NOT_NULL(result);
|
||||
|
@ -395,7 +401,7 @@ BEGIN_TEST_SUITE(dns_resolver_ut)
|
|||
int negativeTestsInitResult = umock_c_negative_tests_init();
|
||||
ASSERT_ARE_EQUAL(int, 0, negativeTestsInitResult);
|
||||
|
||||
STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); // copy hostname
|
||||
STRICT_EXPECTED_CALL(gballoc_calloc(IGNORED_NUM_ARG, IGNORED_NUM_ARG)); // copy hostname
|
||||
STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); // instance
|
||||
umock_c_negative_tests_snapshot();
|
||||
|
||||
|
@ -407,7 +413,7 @@ BEGIN_TEST_SUITE(dns_resolver_ut)
|
|||
umock_c_negative_tests_fail_call(i);
|
||||
|
||||
///act
|
||||
result = dns_resolver_create("fake.com", NULL);
|
||||
result = dns_resolver_create("fake.com", 53, NULL);
|
||||
|
||||
///assert
|
||||
ASSERT_IS_NULL(result);
|
||||
|
@ -423,7 +429,7 @@ BEGIN_TEST_SUITE(dns_resolver_ut)
|
|||
///arrange
|
||||
|
||||
///act
|
||||
DNSRESOLVER_HANDLE result = dns_resolver_create(NULL, NULL);
|
||||
DNSRESOLVER_HANDLE result = dns_resolver_create(NULL, 53, NULL);
|
||||
|
||||
///assert
|
||||
ASSERT_IS_NULL(result, "Unexpected success with NULL hostname");
|
||||
|
|
|
@ -12,5 +12,5 @@ int main(void)
|
|||
*/
|
||||
RUN_TEST_SUITE(dns_resolver_ut, failedTestCount);
|
||||
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(doublylinkedlist_unittests, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(GBAlloc_UnitTests, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(GBAlloc_For_Init_UnitTests, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(HMACSHA256_UnitTests, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -1582,7 +1582,6 @@ TEST_FUNCTION(http_proxy_io_clone_option_succeeds)
|
|||
{
|
||||
// arrange
|
||||
CONCRETE_IO_HANDLE http_io;
|
||||
OPTIONHANDLER_HANDLE options;
|
||||
|
||||
http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&default_http_proxy_io_config);
|
||||
|
||||
|
@ -1590,7 +1589,7 @@ TEST_FUNCTION(http_proxy_io_clone_option_succeeds)
|
|||
STRICT_EXPECTED_CALL(OptionHandler_Create(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG));
|
||||
STRICT_EXPECTED_CALL(xio_retrieveoptions(TEST_IO_HANDLE));
|
||||
STRICT_EXPECTED_CALL(OptionHandler_AddOption(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG));
|
||||
options = http_proxy_io_get_interface_description()->concrete_io_retrieveoptions(http_io);
|
||||
http_proxy_io_get_interface_description()->concrete_io_retrieveoptions(http_io);
|
||||
|
||||
ASSERT_IS_NOT_NULL(tlsio_clone_option);
|
||||
|
||||
|
@ -1614,7 +1613,6 @@ TEST_FUNCTION(http_proxy_io_destroy_option_succeeds)
|
|||
{
|
||||
// arrange
|
||||
CONCRETE_IO_HANDLE http_io;
|
||||
OPTIONHANDLER_HANDLE options;
|
||||
|
||||
http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&default_http_proxy_io_config);
|
||||
|
||||
|
@ -1622,7 +1620,7 @@ TEST_FUNCTION(http_proxy_io_destroy_option_succeeds)
|
|||
STRICT_EXPECTED_CALL(OptionHandler_Create(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG));
|
||||
STRICT_EXPECTED_CALL(xio_retrieveoptions(TEST_IO_HANDLE));
|
||||
STRICT_EXPECTED_CALL(OptionHandler_AddOption(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG));
|
||||
options = http_proxy_io_get_interface_description()->concrete_io_retrieveoptions(http_io);
|
||||
http_proxy_io_get_interface_description()->concrete_io_retrieveoptions(http_io);
|
||||
|
||||
ASSERT_IS_NOT_NULL(tlsio_destroy_option);
|
||||
|
||||
|
|
|
@ -8,5 +8,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(http_proxy_io_unittests, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(httpapicompact_ut, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(httpapiex_unittests, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(httpapiexsas_unittests, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(HTTPHeaders_UnitTests, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -16,3 +16,4 @@ set(${theseTestsName}_h_files
|
|||
|
||||
build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests")
|
||||
|
||||
compile_c_test_artifacts_as(${theseTestsName} C99)
|
||||
|
|
|
@ -8,5 +8,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(LOCK_UnitTests, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(map_unittests, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(memory_data_ut, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(optionhandler_unittests, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(platform_win32_ut, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -16,3 +16,5 @@ set(${theseTestsName}_h_files
|
|||
)
|
||||
|
||||
build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests")
|
||||
|
||||
compile_c_test_artifacts_as(${theseTestsName} C99)
|
||||
|
|
|
@ -8,5 +8,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(refcount_unittests, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -184,9 +184,9 @@ BEGIN_TEST_SUITE(refcount_unittests)
|
|||
TEST_FUNCTION(refcount_INC_REF_and_DEC_REF_after_create_says_we_should_not_free)
|
||||
{
|
||||
///arrange
|
||||
POS_HANDLE p, clone_of_p;
|
||||
POS_HANDLE p;
|
||||
p = Pos_Create(2);
|
||||
clone_of_p = Pos_Clone(p);
|
||||
Pos_Clone(p);
|
||||
umock_c_reset_all_calls();
|
||||
|
||||
///act
|
||||
|
|
|
@ -8,5 +8,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(sastoken_unittests, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -7,5 +7,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(sha_ut, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(singlylinkedlist_unittests, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -32,4 +32,4 @@ keep_alive.h
|
|||
|
||||
build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests")
|
||||
|
||||
compile_c_test_artifacts_as(${theseTestsName} C11)
|
||||
compile_c_test_artifacts_as(${theseTestsName} C99)
|
|
@ -8,5 +8,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(socket_async_ut, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -7,5 +7,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(socketio_berkeley_unittests, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(socketio_win32_unittests, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(srw_lock_unittests, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
|
@ -7,5 +7,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(string_utils_int_tests, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(template_ut, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(tickcounter_freertos_unittests, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(tickcounter_unittests, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -7,5 +7,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(tlsio_bearssl_ut, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -7,5 +7,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(tlsio_cyclonessl_socket_bsd_unittests, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -7,5 +7,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(tlsio_cyclonessl_unittests, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -7,5 +7,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(tlsio_mbedtls_ut, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -21,3 +21,4 @@ set(${theseTestsName}_h_files
|
|||
|
||||
build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests")
|
||||
|
||||
compile_c_test_artifacts_as(${theseTestsName} C99)
|
||||
|
|
|
@ -8,5 +8,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(tlsio_options_unittests, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -444,12 +444,11 @@ TEST_FUNCTION(tlsio_options__set_malloc_fail__fails)
|
|||
TEST_FUNCTION(tlsio_options__release_resources__succeeds)
|
||||
{
|
||||
///arrange
|
||||
TLSIO_OPTIONS_RESULT result;
|
||||
TLSIO_OPTIONS options;
|
||||
tlsio_options_initialize(&options, TLSIO_OPTION_BIT_TRUSTED_CERTS | TLSIO_OPTION_BIT_x509_RSA_CERT);
|
||||
result = tlsio_options_set(&options, OPTION_TRUSTED_CERT, fake_trusted_cert);
|
||||
result = tlsio_options_set(&options, SU_OPTION_X509_CERT, fake_x509_cert);
|
||||
result = tlsio_options_set(&options, SU_OPTION_X509_PRIVATE_KEY, fake_x509_key);
|
||||
tlsio_options_set(&options, OPTION_TRUSTED_CERT, fake_trusted_cert);
|
||||
tlsio_options_set(&options, SU_OPTION_X509_CERT, fake_x509_cert);
|
||||
tlsio_options_set(&options, SU_OPTION_X509_PRIVATE_KEY, fake_x509_key);
|
||||
|
||||
///act
|
||||
tlsio_options_release_resources(&options);
|
||||
|
|
|
@ -7,5 +7,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(tlsio_wolfssl_ut, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -35,3 +35,5 @@ elseif(UNIX)
|
|||
build_c_test_artifacts(${uniqueid_ut_test_file} ON "tests/azure_c_shared_utility_tests" ADDITIONAL_LIBS uuid)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
compile_c_test_artifacts_as(${uniqueid_ut_test_file} C99)
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#include "azure_macro_utils/macro_utils.h"
|
||||
#include "testrunnerswitcher.h"
|
||||
#include "azure_c_shared_utility/uniqueid.h"
|
||||
|
||||
|
|
|
@ -8,5 +8,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(URLEncode_UnitTests, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(utf8_checker_ut, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(uws_client_ut, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -6704,7 +6704,6 @@ TEST_FUNCTION(when_xio_close_fails_in_on_underlying_io_close_sent_and_CLOSE_init
|
|||
UWS_CLIENT_HANDLE uws_client;
|
||||
const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n";
|
||||
const unsigned char close_frame[] = { 0x88, 0x00 };
|
||||
int result;
|
||||
|
||||
tlsio_config.hostname = "test_host";
|
||||
tlsio_config.port = 444;
|
||||
|
@ -6732,7 +6731,7 @@ TEST_FUNCTION(when_xio_close_fails_in_on_underlying_io_close_sent_and_CLOSE_init
|
|||
.IgnoreArgument_on_io_error_context();
|
||||
|
||||
// act
|
||||
result = uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244);
|
||||
uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244);
|
||||
|
||||
// assert
|
||||
ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls());
|
||||
|
|
|
@ -8,5 +8,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(uws_frame_encoder_ut, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(Vector_UnitTests, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(wsio_ut, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -7,5 +7,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(x509_openssl_unittests, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -7,5 +7,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(x509_openssl_unittests, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(x509_schannel_int, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(x509_schannel_unittests, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@ int main(void)
|
|||
{
|
||||
size_t failedTestCount = 0;
|
||||
RUN_TEST_SUITE(xio_unittests, failedTestCount);
|
||||
return failedTestCount;
|
||||
return (int)failedTestCount;
|
||||
}
|
||||
|
|
|
@ -8,6 +8,10 @@ include("../configs/azure_c_shared_utilityFunctions.cmake")
|
|||
usePermissiveRulesForSamplesAndTests()
|
||||
|
||||
if(NOT ${use_installed_dependencies})
|
||||
if(MACOSX)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-strict-prototypes")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-strict-prototypes")
|
||||
endif()
|
||||
if ((NOT TARGET ctest) AND (EXISTS ${CMAKE_CURRENT_LIST_DIR}/ctest/CMakeLists.txt))
|
||||
add_subdirectory(ctest)
|
||||
endif()
|
||||
|
|
Загрузка…
Ссылка в новой задаче