Ensuring the tests can run locally
This commit is contained in:
Родитель
2354a829e1
Коммит
1e948e9250
|
@ -6,7 +6,7 @@ project(azure_iot_c_back_compat)
|
|||
|
||||
set(sdk_branch "master" CACHE STRING "Full path to custom HSM repo library")
|
||||
|
||||
option(refresh_sdk "set refresh_sdk to get the latest SDK bits from master (default is OFF)" OFF)
|
||||
option(use_installed_dependencies "use_installed_dependencies to ON to use installed packages instead of building dependencies from submodules" ON)
|
||||
|
||||
# do not add or build any tests of the dependencies
|
||||
set(run_e2e_tests OFF)
|
||||
|
@ -19,9 +19,19 @@ enable_testing()
|
|||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/deps/azure-c-testrunnerswitcher)
|
||||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/deps/azure-ctest)
|
||||
|
||||
set(AZUREIOT_INC_FOLDER "/usr/local/include/azureiot" "/usr/local/include/azureiot/inc" "/usr/local/include/iothub_service_client")
|
||||
include_directories(${AZUREIOT_INC_FOLDER})
|
||||
if (${use_installed_dependencies})
|
||||
set(AZUREIOT_INC_FOLDER "/usr/local/include/azureiot" "/usr/local/include/azureiot/inc" "/usr/local/include/iothub_service_client")
|
||||
else()
|
||||
if (NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/deps/azure-iot-sdk-c/CMakeLists.txt")
|
||||
message("Cloning Azure Iot SDK C...")
|
||||
execute_process(COMMAND git clone https://github.com/Azure/azure-iot-sdk-c.git -q ${CMAKE_CURRENT_SOURCE_DIR}/deps/azure-iot-sdk-c)
|
||||
execute_process(COMMAND git submodule update --init WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/deps/azure-iot-sdk-c)
|
||||
endif()
|
||||
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/deps/azure-iot-sdk-c")
|
||||
set(AZUREIOT_INC_FOLDER "${CMAKE_CURRENT_SOURCE_DIR}/deps/azure-iot-sdk-c/iothub_client/inc" "${CMAKE_CURRENT_SOURCE_DIR}/deps/azure-iot-sdk-c/iothub_service_client/inc")
|
||||
endif()
|
||||
|
||||
include_directories(${AZUREIOT_INC_FOLDER})
|
||||
include_directories(${TESTRUNNERSWITCHER_INC_FOLDER})
|
||||
include_directories(${CTEST_INC_FOLDER})
|
||||
include_directories(${UMOCK_C_INC_FOLDER})
|
||||
|
|
|
@ -82,7 +82,6 @@ function(back_compat_windows_add_dll whatIsBuilding)
|
|||
SET(VAR 1)
|
||||
foreach(file ${${whatIsBuilding}_test_files})
|
||||
|
||||
message("${file} is ${VAR}")
|
||||
# for x64 the underscore is not needed
|
||||
if (ARCHITECTURE STREQUAL "x86_64" OR ARCHITECTURE STREQUAL "ARM")
|
||||
set_property(TARGET ${whatIsBuilding}_dll APPEND_STRING PROPERTY LINK_FLAGS ${SPACES}/INCLUDE:"some_symbol_for_cppunittest_${VAR}")
|
||||
|
|
|
@ -2,5 +2,5 @@
|
|||
#Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
add_subdirectory(iothub_mqtt_back_compat)
|
||||
#add_subdirectory(iothub_amqp_back_compat)
|
||||
#add_subdirectory(iothub_http_back_compat)
|
||||
add_subdirectory(iothub_amqp_back_compat)
|
||||
add_subdirectory(iothub_http_back_compat)
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
cmake_minimum_required(VERSION 2.8.11)
|
||||
|
||||
#compileAsC11()
|
||||
set(theseTestsName iothub_mqtt_back_compat)
|
||||
|
||||
set(${theseTestsName}_test_files
|
||||
|
|
Загрузка…
Ссылка в новой задаче