avs-device-sdk/tools/Testing.cmake

40 lines
1.4 KiB
CMake
Raw Normal View History

if(POLICY CMP0057)
cmake_policy(SET CMP0057 NEW)
endif()
include(CTest)
include(ThirdParty/googletest.cmake)
add_custom_target(unit COMMAND ${CMAKE_CTEST_COMMAND})
macro(discover_unit_tests includes libraries)
# This will result in some errors not finding GTest when running cmake, but allows us to better integrate with CTest
find_package(GTest ${GTEST_PACKAGE_CONFIG})
if(BUILD_TESTING)
set (extra_macro_args ${ARGN})
LIST(LENGTH extra_macro_args num_extra_args)
if (${num_extra_args} GREATER 0)
list(GET extra_macro_args 0 inputs)
endif()
file(GLOB_RECURSE tests RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/*Test.cpp")
foreach (testsourcefile IN LISTS tests)
get_filename_component(testname ${testsourcefile} NAME_WE)
add_executable(${testname} ${testsourcefile})
target_include_directories(${testname} PRIVATE ${includes})
target_link_libraries(${testname} ${libraries} gtest_main gmock_main)
GTEST_ADD_TESTS(${testname} "${inputs}" ${testsourcefile})
add_dependencies(unit ${testname})
endforeach ()
endif()
endmacro()
Version 1.2.0 alexa-client-sdk Changes in this update * **Enhancements** * Updated MediaPlayer to solve stability issues * All capability agents were refined to work with the updated MediaPlayer * Added the TemplateRuntime capability agent * Added the SpeakerManager capability agent * Added a configuration option ("sampleApp":"endpoint") that allows the endpoint that SampleApp connects to to be specified without changing code or rebuilding * Added very verbose capture of libcurl debug information * Added an observer interface to observer audio state changes from AudioPlayer * Added support for StreamMetadataExtracted Event. Stream tags found in the stream are represented in JSON and sent to AVS * Added to the SampleApp a simple GuiRenderer as an observer to the TemplateRuntime Capability Agent * Moved shared libcurl functionality to AVSCommon/Utils * Added a CMake option to exclude tests from the "make all" build. Use "cmake <absolute-path-to-source> -DACSDK_EXCLUDE_TEST_FROM_ALL=ON" to enable it. When this option is enabled "make unit" and "make integration" still could be used to build and run the tests * **Bug fixes**: * Previously scheduled alerts now play following a restart * General stability fixes * Bug fix for CertifiedSender blocking forever if the network goes down while it's trying to send a message to AVS * Fixes for known issue of Alerts integration tests fail: AlertsTest.UserLongUnrelatedBargeInOnActiveTimer and AlertsTest.handleOneTimerWithVocalStop * Attempting to end a tap-to-talk interaction with the tap-to-talk button wouldn't work * SharedDataStream could encounter a race condition due to a combination of a blocking Reader and a Writer closing before writing any data * Bug-fix for the ordering of notifications within alerts scheduling. This fixes the issue where a local-stop on an alert would also stop a subsequent alert if it were to begin without delay * **Known Issues** * Capability agent for Notifications is not included in this release * Inconsistent playback behavior when resuming content ("Alexa, pause." / "Alexa, resume."). Specifically, handling playback offsets, which causes the content to play from the start. This behavior is also occasionally seen with "Next" / "Previous". * `ACL`'s asynchronous receipt of audio attachments may manage resources poorly in scenarios where attachments are received but not consumed.
2017-10-30 22:14:38 +00:00
option(ACSDK_EXCLUDE_TEST_FROM_ALL "Exclude unit test from all." OFF)
macro(acsdk_add_test_subdirectory_if_allowed)
if (ACSDK_EXCLUDE_TEST_FROM_ALL)
add_subdirectory("test" EXCLUDE_FROM_ALL)
else()
add_subdirectory("test")
endif()
endmacro()