зеркало из https://github.com/Azure/azure-utpm-c.git
Update umock repo and files (#27)
This commit is contained in:
Родитель
1eb3435b54
Коммит
c8b1ccf0d1
|
@ -255,6 +255,3 @@ paket-files/
|
|||
|
||||
*.cert
|
||||
/tools/tpm_simulator/NVChip
|
||||
/deps/ctest/
|
||||
/deps/testrunnerswitcher/
|
||||
/deps/umock-c/
|
|
@ -35,6 +35,10 @@ if(NOT ${use_installed_dependencies})
|
|||
add_subdirectory(deps/azure-macro-utils-c)
|
||||
include_directories(${MACRO_UTILS_INC_FOLDER})
|
||||
endif()
|
||||
if (NOT TARGET umock_c)
|
||||
add_subdirectory(deps/umock-c)
|
||||
include_directories(${UMOCK_C_INC_FOLDER})
|
||||
endif()
|
||||
if(${original_run_e2e_tests} OR ${original_run_unittests})
|
||||
if (NOT TARGET testrunnerswitcher)
|
||||
add_subdirectory(deps/azure-c-testrunnerswitcher)
|
||||
|
@ -42,9 +46,6 @@ if(NOT ${use_installed_dependencies})
|
|||
if (NOT TARGET ctest)
|
||||
add_subdirectory(deps/azure-ctest)
|
||||
endif()
|
||||
if (NOT TARGET umock_c)
|
||||
add_subdirectory(deps/umock-c)
|
||||
endif()
|
||||
endif()
|
||||
if (NOT TARGET aziotsharedutil AND EXISTS "${CMAKE_CURRENT_LIST_DIR}/deps/c-utility/CMakeLists.txt")
|
||||
add_subdirectory(deps/c-utility)
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit afdb11395921711664af48174d072be048608183
|
||||
Subproject commit fa20306e554c1764aaa7d04ce09db3d786755d0f
|
|
@ -1 +1 @@
|
|||
Subproject commit 16ac17847814df15894aa4e6e8604989ef5cd360
|
||||
Subproject commit 5e70cc8a17e47de057b164b3a474b760265135ae
|
|
@ -1 +1 @@
|
|||
Subproject commit ba229c48eecb537ba37dea8d67cf6617f9f4edc7
|
||||
Subproject commit 0e3951bd3f93905fea303f18075e9bb1399cd68f
|
|
@ -4,7 +4,7 @@
|
|||
#ifndef _MARSHAL_FP_H
|
||||
#define _MARSHAL_FP_H
|
||||
|
||||
#include "azure_c_shared_utility/umock_c_prod.h"
|
||||
#include "umock_c/umock_c_prod.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#ifndef _MEMORY_FP_H_
|
||||
#define _MEMORY_FP_H_
|
||||
|
||||
#include "azure_c_shared_utility/umock_c_prod.h"
|
||||
#include "umock_c/umock_c_prod.h"
|
||||
#include "azure_utpm_c/BaseTypes.h"
|
||||
#include "azure_utpm_c/TPMB.h"
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#define ssize_t int
|
||||
#endif
|
||||
|
||||
#include "azure_c_shared_utility/umock_c_prod.h"
|
||||
#include "umock_c/umock_c_prod.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
#include <cstddef>
|
||||
|
|
|
@ -13,7 +13,7 @@ extern "C" {
|
|||
|
||||
#include "Tpm.h"
|
||||
#include "tpm_comm.h"
|
||||
#include "azure_c_shared_utility/umock_c_prod.h"
|
||||
#include "umock_c/umock_c_prod.h"
|
||||
|
||||
// TSS status codes
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ extern "C" {
|
|||
#include <stdint.h>
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include "azure_c_shared_utility/umock_c_prod.h"
|
||||
#include "umock_c/umock_c_prod.h"
|
||||
|
||||
#define TPM_COMM_TYPE_VALUES \
|
||||
TPM_COMM_TYPE_EMULATOR, \
|
||||
|
|
|
@ -13,7 +13,7 @@ extern "C" {
|
|||
#include <stdint.h>
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include "azure_c_shared_utility/umock_c_prod.h"
|
||||
#include "umock_c/umock_c_prod.h"
|
||||
|
||||
typedef struct TPM_SOCKET_INFO_TAG* TPM_SOCKET_HANDLE;
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
#include "azure_c_shared_utility/umock_c_prod.h"
|
||||
#include "umock_c/umock_c_prod.h"
|
||||
#include "azure_c_shared_utility/gballoc.h"
|
||||
#include "azure_c_shared_utility/xlogging.h"
|
||||
#include "azure_c_shared_utility/buffer_.h"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "azure_c_shared_utility/umock_c_prod.h"
|
||||
#include "umock_c/umock_c_prod.h"
|
||||
#include "azure_c_shared_utility/gballoc.h"
|
||||
#include "azure_c_shared_utility/xlogging.h"
|
||||
#include "azure_c_shared_utility/socketio.h"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <winsock2.h>
|
||||
#include <windows.h>
|
||||
#include <stdlib.h>
|
||||
#include "azure_c_shared_utility/umock_c_prod.h"
|
||||
#include "umock_c/umock_c_prod.h"
|
||||
#include "azure_c_shared_utility/gballoc.h"
|
||||
#include "azure_c_shared_utility/xlogging.h"
|
||||
#include "azure_c_shared_utility/buffer_.h"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "azure_c_shared_utility/umock_c_prod.h"
|
||||
#include "umock_c/umock_c_prod.h"
|
||||
#include "azure_c_shared_utility/gballoc.h"
|
||||
#include "azure_c_shared_utility/xlogging.h"
|
||||
|
||||
|
|
|
@ -28,15 +28,15 @@ static void* my_gballoc_realloc(void* ptr, size_t size)
|
|||
return realloc(ptr, size);
|
||||
}
|
||||
|
||||
#include "umock_c.h"
|
||||
#include "umocktypes_charptr.h"
|
||||
#include "umocktypes_stdint.h"
|
||||
#include "umock_c_negative_tests.h"
|
||||
#include "umock_c/umock_c.h"
|
||||
#include "umock_c/umocktypes_charptr.h"
|
||||
#include "umock_c/umocktypes_stdint.h"
|
||||
#include "umock_c/umock_c_negative_tests.h"
|
||||
#include "azure_macro_utils/macro_utils.h"
|
||||
|
||||
#define ENABLE_MOCKS
|
||||
#include "azure_c_shared_utility/gballoc.h"
|
||||
#include "azure_c_shared_utility/umock_c_prod.h"
|
||||
#include "umock_c/umock_c_prod.h"
|
||||
#include "azure_c_shared_utility/buffer_.h"
|
||||
#include "azure_utpm_c/tpm_comm.h"
|
||||
#include "azure_utpm_c/TpmTypes.h"
|
||||
|
|
|
@ -38,15 +38,15 @@ static void* my_gballoc_realloc(void* ptr, size_t size)
|
|||
return realloc(ptr, size);
|
||||
}
|
||||
|
||||
#include "umock_c.h"
|
||||
#include "umocktypes_charptr.h"
|
||||
#include "umocktypes_stdint.h"
|
||||
#include "umock_c_negative_tests.h"
|
||||
#include "umock_c/umock_c.h"
|
||||
#include "umock_c/umocktypes_charptr.h"
|
||||
#include "umock_c/umocktypes_stdint.h"
|
||||
#include "umock_c/umock_c_negative_tests.h"
|
||||
#include "azure_macro_utils/macro_utils.h"
|
||||
|
||||
#define ENABLE_MOCKS
|
||||
#include "azure_c_shared_utility/gballoc.h"
|
||||
#include "azure_c_shared_utility/umock_c_prod.h"
|
||||
#include "umock_c/umock_c_prod.h"
|
||||
#include "azure_c_shared_utility/socketio.h"
|
||||
#include "azure_utpm_c/tpm_socket_comm.h"
|
||||
#include "azure_c_shared_utility/crt_abstractions.h"
|
||||
|
|
|
@ -24,8 +24,8 @@ static void my_gballoc_free(void* ptr)
|
|||
#include "testrunnerswitcher.h"
|
||||
#include "umock_c.h"
|
||||
#include "umocktypes_charptr.h"
|
||||
#include "umocktypes_stdint.h"
|
||||
#include "umock_c_negative_tests.h"
|
||||
#include "umock_c/umocktypes_stdint.h"
|
||||
#include "umock_c/umock_c_negative_tests.h"
|
||||
#include "azure_macro_utils/macro_utils.h"
|
||||
|
||||
#define ENABLE_MOCKS
|
||||
|
|
|
@ -22,17 +22,17 @@ static void my_gballoc_free(void* ptr)
|
|||
}
|
||||
|
||||
#include "testrunnerswitcher.h"
|
||||
#include "umock_c.h"
|
||||
#include "umocktypes_charptr.h"
|
||||
#include "umocktypes_stdint.h"
|
||||
#include "umock_c_negative_tests.h"
|
||||
#include "umock_c/umock_c.h"
|
||||
#include "umock_c/umocktypes_charptr.h"
|
||||
#include "umock_c/umocktypes_stdint.h"
|
||||
#include "umock_c/umock_c_negative_tests.h"
|
||||
#include "azure_macro_utils/macro_utils.h"
|
||||
|
||||
#define ENABLE_MOCKS
|
||||
#include "azure_c_shared_utility/gballoc.h"
|
||||
#include <windows.h>
|
||||
#include <tbs.h>
|
||||
#include "azure_c_shared_utility/umock_c_prod.h"
|
||||
#include "umock_c/umock_c_prod.h"
|
||||
|
||||
MOCKABLE_FUNCTION(WINAPI, TBS_RESULT, Tbsi_Context_Create, PCTBS_CONTEXT_PARAMS, pContextParams, PTBS_HCONTEXT, phContext);
|
||||
MOCKABLE_FUNCTION(WINAPI, TBS_RESULT, Tbsi_GetDeviceInfo, uint32_t, size, PVOID, info);
|
||||
|
|
|
@ -28,15 +28,15 @@ static void* my_gballoc_realloc(void* ptr, size_t size)
|
|||
return realloc(ptr, size);
|
||||
}
|
||||
|
||||
#include "umock_c.h"
|
||||
#include "umocktypes_charptr.h"
|
||||
#include "umocktypes_stdint.h"
|
||||
#include "umock_c_negative_tests.h"
|
||||
#include "umock_c/umock_c.h"
|
||||
#include "umock_c/umocktypes_charptr.h"
|
||||
#include "umock_c/umocktypes_stdint.h"
|
||||
#include "umock_c/umock_c_negative_tests.h"
|
||||
#include "azure_macro_utils/macro_utils.h"
|
||||
|
||||
#define ENABLE_MOCKS
|
||||
#include "azure_c_shared_utility/gballoc.h"
|
||||
#include "azure_c_shared_utility/umock_c_prod.h"
|
||||
#include "umock_c/umock_c_prod.h"
|
||||
#undef ENABLE_MOCKS
|
||||
|
||||
#include "azure_utpm_c/Memory_fp.h"
|
||||
|
@ -53,10 +53,6 @@ extern "C"
|
|||
#define BUFFER_LENGTH 10
|
||||
|
||||
MU_DEFINE_ENUM_STRINGS(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES)
|
||||
|
||||
//TEST_DEFINE_ENUM_TYPE(TPM_COMM_TYPE, TPM_COMM_TYPE_VALUES);
|
||||
//IMPLEMENT_UMOCK_C_ENUM_TYPE(TPM_COMM_TYPE, TPM_COMM_TYPE_VALUES);
|
||||
|
||||
static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code)
|
||||
{
|
||||
ASSERT_FAIL("umock_c reported error :%s", MU_ENUM_TO_STRING(UMOCK_C_ERROR_CODE, error_code));
|
||||
|
|
Загрузка…
Ссылка в новой задаче