Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .transport.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.5
1.1.11
8 changes: 7 additions & 1 deletion cov_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Comment on lines +141 to +146
if [[ -z "${release_dir}" ]]; then
echo "Transport archive appears to be empty: ${release_archive}" >&2
return 1
Expand Down
1 change: 1 addition & 0 deletions include/firebolt/speechsynthesis.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <firebolt/types.h>

#include <functional>
#include <memory_resource>
#include <string>
#include <vector>
namespace Firebolt::SpeechSynthesis
Expand Down
2 changes: 2 additions & 0 deletions src/json_types/speechsynthesis.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

#pragma once

#include <memory_resource>

#include "firebolt/speechsynthesis.h"
#include <firebolt/json_types.h>

Comment on lines 18 to 25
Expand Down
2 changes: 2 additions & 0 deletions src/speechsynthesis_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

#pragma once

#include <memory_resource>

#include <firebolt/helpers.h>
#include <firebolt/speechsynthesis.h>

Comment on lines 18 to 25
Expand Down
48 changes: 48 additions & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Comment on lines +66 to +71
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()
Comment on lines +75 to +82
message(STATUS "Using GTest header override: ${FIREBOLT_GTEST_OVERRIDE_DIR}")
endif()
endif()

find_package(nlohmann_json_schema_validator CONFIG REQUIRED)

include(GoogleTest)
Expand All @@ -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)

Expand Down Expand Up @@ -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
Expand Down
Loading