static const char *compatibility_result_path = HAL_CC_DEFAULT_COMPATIBILITY_RESULT_PATH;
+#ifdef HAL_API_COMMON_UNITTEST
void set_compatibility_result_path(const char *path)
{
if (!path)
{
memset(g_compatibility_info, 0, sizeof(g_compatibility_info));
}
+#endif /* HAL_API_COMMON_UNITTEST */
static int get_module_by_name(const char *name, enum hal_module *module)
{
int hal_api_cc_get_supported_interface_versions(enum hal_module module,
unsigned int **major_versions, unsigned int **minor_versions, int *num_versions);
-/* For test use only */
+#ifdef HAL_API_COMMON_UNITTEST /* For test use only */
void set_compatibility_manifest_directory(const char *path);
void unset_compatibility_manifest_directory(void);
void set_compatibility_result_path(const char *path);
void unset_compatibility_result_path(void);
void reset_compatibility_info(void);
+#endif /* HAL_API_COMMON_UNITTEST */
#ifdef __cplusplus
}
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall -Werror -Wno-pointer-sign")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} -std=c++14 -Wall -Werror")
+ADD_DEFINITIONS("-DHAL_API_COMMON_UNITTEST")
AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/ UNITTEST_SRCS)
AUX_SOURCE_DIRECTORY(${CMAKE_SOURCE_DIR}/src/ HAL_API_COMMON_SRCS)
ADD_EXECUTABLE(${HAL_API_COMMON_UNITTEST} ${UNITTEST_SRCS} ${HAL_API_COMMON_SRCS})