diff --git a/.transport.version b/.transport.version index e25d8d9..9ee1f78 100644 --- a/.transport.version +++ b/.transport.version @@ -1 +1 @@ -1.1.5 +1.1.11 diff --git a/cov_build.sh b/cov_build.sh index 7e70d6e..6168ea6 100755 --- a/cov_build.sh +++ b/cov_build.sh @@ -137,7 +137,13 @@ bootstrap_transport_if_missing() { echo "Downloaded FireboltTransport release from ${release_url}" fi - release_dir="$(tar -tzf "${release_archive}" | sed -e 's|^\./||' | awk -F/ 'NF{print $1; exit}')" + release_dir="" + while IFS= read -r entry; do + entry="${entry#./}" + if [[ -z "${release_dir}" && -n "${entry}" ]]; then + release_dir="${entry%%/*}" + fi + done < <(tar -tzf "${release_archive}") if [[ -z "${release_dir}" ]]; then echo "Transport archive appears to be empty: ${release_archive}" >&2 return 1 diff --git a/include/firebolt/speechsynthesis.h b/include/firebolt/speechsynthesis.h index a809351..ff19388 100644 --- a/include/firebolt/speechsynthesis.h +++ b/include/firebolt/speechsynthesis.h @@ -20,6 +20,7 @@ #include #include +#include #include #include namespace Firebolt::SpeechSynthesis diff --git a/src/json_types/speechsynthesis.h b/src/json_types/speechsynthesis.h index 00f4993..56ed6a1 100644 --- a/src/json_types/speechsynthesis.h +++ b/src/json_types/speechsynthesis.h @@ -18,6 +18,8 @@ #pragma once +#include + #include "firebolt/speechsynthesis.h" #include diff --git a/src/speechsynthesis_impl.h b/src/speechsynthesis_impl.h index 147d9f7..3b3d87b 100644 --- a/src/speechsynthesis_impl.h +++ b/src/speechsynthesis_impl.h @@ -18,6 +18,8 @@ #pragma once +#include + #include #include diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index bc6eea3..c0f4c71 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -48,6 +48,42 @@ else() find_package(GTest CONFIG REQUIRED) endif() +set(FIREBOLT_GTEST_HEADER_ROOT "") +if(TARGET GTest::gtest) + get_target_property(FIREBOLT_GTEST_INTERFACE_INCLUDE_DIRS GTest::gtest INTERFACE_INCLUDE_DIRECTORIES) + foreach(dir IN LISTS FIREBOLT_GTEST_INTERFACE_INCLUDE_DIRS) + if(EXISTS "${dir}/gtest/gtest.h") + set(FIREBOLT_GTEST_HEADER_ROOT "${dir}") + break() + endif() + endforeach() +endif() + +set(FIREBOLT_GTEST_OVERRIDE_DIR "") +if(FIREBOLT_GTEST_HEADER_ROOT + AND EXISTS "/usr/local/include/gtest/internal/gtest-internal.h" + AND EXISTS "${FIREBOLT_GTEST_HEADER_ROOT}/gtest/internal/gtest-internal.h") + file(STRINGS "/usr/local/include/gtest/internal/gtest-internal.h" FIREBOLT_GTEST_LOCAL_SIGNATURE + REGEX "std::string test_suite_name" LIMIT_COUNT 1) + file(STRINGS "${FIREBOLT_GTEST_HEADER_ROOT}/gtest/internal/gtest-internal.h" FIREBOLT_GTEST_SELECTED_SIGNATURE + REGEX "const char\\* test_suite_name" LIMIT_COUNT 1) + + if(FIREBOLT_GTEST_LOCAL_SIGNATURE AND FIREBOLT_GTEST_SELECTED_SIGNATURE) + set(FIREBOLT_GTEST_OVERRIDE_DIR "${CMAKE_CURRENT_BINARY_DIR}/gtest_header_override") + file(REMOVE_RECURSE "${FIREBOLT_GTEST_OVERRIDE_DIR}") + file(MAKE_DIRECTORY "${FIREBOLT_GTEST_OVERRIDE_DIR}") + execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink + "${FIREBOLT_GTEST_HEADER_ROOT}/gtest" + "${FIREBOLT_GTEST_OVERRIDE_DIR}/gtest") + if(EXISTS "${FIREBOLT_GTEST_HEADER_ROOT}/gmock") + execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink + "${FIREBOLT_GTEST_HEADER_ROOT}/gmock" + "${FIREBOLT_GTEST_OVERRIDE_DIR}/gmock") + endif() + message(STATUS "Using GTest header override: ${FIREBOLT_GTEST_OVERRIDE_DIR}") + endif() +endif() + find_package(nlohmann_json_schema_validator CONFIG REQUIRED) include(GoogleTest) @@ -67,6 +103,12 @@ add_executable(${UNIT_TESTS_APP} ${UNIT_TESTS} ) +if(FIREBOLT_GTEST_OVERRIDE_DIR) + target_include_directories(${UNIT_TESTS_APP} BEFORE PRIVATE + "${FIREBOLT_GTEST_OVERRIDE_DIR}" + ) +endif() + target_compile_options(${UNIT_TESTS_APP} PRIVATE --coverage -g -O0 -fno-inline) target_link_options(${UNIT_TESTS_APP} PRIVATE --coverage) @@ -115,6 +157,12 @@ add_executable(${COMPONENT_TESTS_APP} ${COMPONENT_TESTS} ) +if(FIREBOLT_GTEST_OVERRIDE_DIR) + target_include_directories(${COMPONENT_TESTS_APP} BEFORE PRIVATE + "${FIREBOLT_GTEST_OVERRIDE_DIR}" + ) +endif() + target_link_libraries(${COMPONENT_TESTS_APP} PRIVATE FireboltClient