avs-device-sdk/Integration/test/CMakeLists.txt

101 lines
5.2 KiB
CMake
Raw Normal View History

find_package(GTest ${GTEST_PACKAGE_CONFIG})
set(INCLUDE_PATH "${ACL_SOURCE_DIR}/include"
"${AuthDelegate_INCLUDE_DIR}/test/"
"${GTEST_INCLUDE_DIRS}"
"${KWD_SOURCE_DIR}/include"
"${KITTAI_SOURCE_DIR}/include"
"${KITTAI_KEY_WORD_DETECTOR_INCLUDE_DIR}"
"${SENSORY_SOURCE_DIR}/include"
"${SENSORY_KEY_WORD_DETECTOR_INCLUDE_DIR}"
"${AIP_SOURCE_DIR}/include"
"${SpeechSynthesizer_SOURCE_DIR}/include"
"${Alerts_SOURCE_DIR}/include"
"${AVSSystem_SOURCE_DIR}/include"
"${GST_INCLUDE_DIRS}"
"${AVSCommon_INCLUDE_DIRS}"
"${AudioPlayer_INCLUDE_DIRS}"
v1.3.0 released 12/08/2017: **Enhancements** * ContextManager now passes the namespace/name of the desired state to StateProv iderInterface::provideState(). This is helpful when a single StateProvider obje ct provides multiple states, and needs to know which one ContextManager is askin g for. * The mime parser was hardened against duplicate boundaries. * Added functionality to add and remove AudioPlayer observers to the DefaultClie nt. * Unit tests for Alerts were added. * Added en-IN, en-CA and ja-JP to the SampleApp locale selection menu. * Added default alert and timer audio data to the SDK SampleApp. There is no lo nger a requirement to download these audio files and configure them in the json configuration file. * Added support in SDS Reader and AttachmentReader for seeking into the future. This allows a reader to move to an index which has not yet arrived in the SDS a nd poll/block until it arrives. * Added support for blocking Writers in the SharedDataStream class. * Changed the default status code sent by MessageRequestObserverInterface::onSen dCompleted() to SERVER_OTHER_ERROR, and mapped HTTP code 500 to SERVER_INTERNAL_ ERROR_V2. * Added support for parsing stream duration out of playlists. * Added a configuration option ("sampleApp":"displayCardsSupported") that allows the displaying of display cards to be enabled or disabled. * Named Timers and Reminders have been updated to fall back to the on-device bac kground audio sound when cloud urls cannot be accessed or rendered. **Bug Fixes** * Removed floating point dependencies from core SDK libraries. * Fixed bug in SpeechSynthesizer where it's erroneously calling stop more than once. * Fixed an issue in ContentFetcher where it could hang during destruction until an active GET request completed. * Fixed a couple of parsing bugs in LibCurlHttpContentFetcher related to case-sensitivity and mime-type handling. * Fixed a bug where MediaPlayerObserverInterface::onPlaybackResumed() wasn't being called after resuming from a pause with a pending play/resume. * Fixed a bug in LibCurlContentFetcher where it could error out if data is written to the SDS faster than it is consumed. * The GStreamer-based MediaPlayer reference implementation now uses the ACL HTTP configured client. * An API change has been made to MediaPlayerInterface::setSource(). This method now takes in an optional offset as well to allow for immediately streaming to the offset if possible. * Next and Previous buttons now work with Audible. * Pandora resume stuttering is addressed. * Pausing and resuming Amazon music no longer seeks back to the beginning of the song. * libcurl CURLOPT_NOSIGNAL option is set to 1 (https://curl.haxx.se/libcurl/c/CURLOPT_NOSIGNAL.html) to avoid crashes observed in SampleApp. * Fixed the timing of the PlaybackReportIntervalEvent and PlaybackReportDelayEvent as specified in the directives. * Fixed potential deadlocks in MediaPlayer during shutdown related to queued callbacks. * Fixed a crash in MediaPlayer that could occur if the network is disconnected during playback. * Fixed a bug where music could keep playing while Alexa is speaking. * Fixed a bug which was causing problems with pause/resume and next/previous with Amazon Music. * Fixed a bug where music could briefly start playing between speaks. * Fixed a bug where HLS playlists would stop streaming after the initial playlist had been played to completion. * Fixed a bug where Audible playback could not advance to the next chapter. * Fixed some occurrences of SDK entering the IDLE state during the transition between Listening and Speaking states. * Fixed a bug where PlaybackFinished events were not reporting the correct offset. * An API change has been made to MediaPlayerInterface::getOffset(). This method is now required to return the final offset when called after playback has stopped. * Fixed a problem where AIP was erroneously resetting its state upon getting a cancelDirective() callback. **Known Issues** * Capability agent for Notifications is not included in this release. * `ACL`'s asynchronous receipt of audio attachments may manage resources poorly in scenarios where attachments are received but not consumed. * GUI cards don't show for Kindle. * The new SpeechSynthesizerState state values GAINING_FOCUS and LOSING_FOCUS were added as part of a work-around. The will likely be removed in subsequent releases. * With the gstreamer-based MediaPlayer, after muting and unmuting, the next item starts playing rather than continuing with the current item.
2017-12-09 00:07:37 +00:00
"${AudioResources_INCLUDE_DIRS}"
"${MediaPlayer_SOURCE_DIR}/include"
Version 1.4.0 alexa-client-sdk Changes in this update: **Enhancements** * Added the Notifications Capability Agent. This allows a client to receive notification indicators from Alexa. * Added support for the `SoftwareInfo` event. This code is triggered in the `SampleApp` by providing a positive decimal integer as the "firmwareVersion" value in "sampleApp" object of the `AlexaClientSDKConfig.json`. The reported firmware version can be updated after starting the `SampleApp` by calling `SoftwareInfoSender::setFirmwareVersion()`. This code path can be exercised in the `SampleApp` with the new command: `f`. * Added unit tests for Alerts. * The GStreamer-based pipeline allows for the configuration of `MediaPlayer` output based on information provided in `Config`. * Playlist streaming now uses a `BLOCKING` writer, which improves streaming efficiency. **Bug Fixes** * Fixed bug where `SpeechSynthesizer` would not stop playback when a state change timeout was encountered. * Fixed the `SampleApplication` destructor to avoid segfaults if the object is not constructed correctly. * Fixed bug where `AudioPlayer` would erroneously call `executeStop()` in `cancelDirective()`. * [Issue 396](https://github.com/alexa/avs-device-sdk/issues/396) - Fixed bug for compilation error with GCC7 in `AVSCommon/SDKInterfaces/include/AVSCommon/SDKInterfaces/Audio/AlertsAudioFactoryInterface.h` * [Issue 384](https://github.com/alexa/avs-device-sdk/issues/384) - Fixed bug that caused `AuthServer.py` to crash. * Fixed bug where a long delay was encountered after pausing and resuming a large Audible chapter. * Fixed bug that caused named timers and reminders to loop for an additional `loopCount` . * Fixed memory corruption bug in `MessageInterpreter`. * Fixed illegal memory accesses in `MediaPlayer` logging. **Known Issues** * The `ACL` may encounter issues if audio attachments are received but not consumed. * Display Cards for Kindle don't render. * If using the GStreamer-based `MediaPlayer` implementation, after muting and un-muting an audio item, the next item in the queue will begin playing rather than continuing playback of the originally muted audio item. * `SpeechSynthesizerState` currently uses `GAINING_FOCUS` and `LOSING_FOCUS` as a workaround for handling intermediate state. These states may be removed in a future release. * Music playback doesn't immediately stop when a user barges-in on iHeartRadio.
2018-01-12 23:45:42 +00:00
"${PlaybackController_SOURCE_DIR}/include"
"${CONTEXTMANAGER_SOURCE_DIR}/include")
Version 1.4.0 alexa-client-sdk Changes in this update: **Enhancements** * Added the Notifications Capability Agent. This allows a client to receive notification indicators from Alexa. * Added support for the `SoftwareInfo` event. This code is triggered in the `SampleApp` by providing a positive decimal integer as the "firmwareVersion" value in "sampleApp" object of the `AlexaClientSDKConfig.json`. The reported firmware version can be updated after starting the `SampleApp` by calling `SoftwareInfoSender::setFirmwareVersion()`. This code path can be exercised in the `SampleApp` with the new command: `f`. * Added unit tests for Alerts. * The GStreamer-based pipeline allows for the configuration of `MediaPlayer` output based on information provided in `Config`. * Playlist streaming now uses a `BLOCKING` writer, which improves streaming efficiency. **Bug Fixes** * Fixed bug where `SpeechSynthesizer` would not stop playback when a state change timeout was encountered. * Fixed the `SampleApplication` destructor to avoid segfaults if the object is not constructed correctly. * Fixed bug where `AudioPlayer` would erroneously call `executeStop()` in `cancelDirective()`. * [Issue 396](https://github.com/alexa/avs-device-sdk/issues/396) - Fixed bug for compilation error with GCC7 in `AVSCommon/SDKInterfaces/include/AVSCommon/SDKInterfaces/Audio/AlertsAudioFactoryInterface.h` * [Issue 384](https://github.com/alexa/avs-device-sdk/issues/384) - Fixed bug that caused `AuthServer.py` to crash. * Fixed bug where a long delay was encountered after pausing and resuming a large Audible chapter. * Fixed bug that caused named timers and reminders to loop for an additional `loopCount` . * Fixed memory corruption bug in `MessageInterpreter`. * Fixed illegal memory accesses in `MediaPlayer` logging. **Known Issues** * The `ACL` may encounter issues if audio attachments are received but not consumed. * Display Cards for Kindle don't render. * If using the GStreamer-based `MediaPlayer` implementation, after muting and un-muting an audio item, the next item in the queue will begin playing rather than continuing playback of the originally muted audio item. * `SpeechSynthesizerState` currently uses `GAINING_FOCUS` and `LOSING_FOCUS` as a workaround for handling intermediate state. These states may be removed in a future release. * Music playback doesn't immediately stop when a user barges-in on iHeartRadio.
2018-01-12 23:45:42 +00:00
set(LINK_PATH ACL AuthDelegate AFML ADSL AIP Alerts AudioPlayer AVSSystem ContextManager KWD SpeechSynthesizer Integration gtest gmock PlaybackController)
if(KITTAI_KEY_WORD_DETECTOR)
SET(LINK_PATH ${LINK_PATH} KITTAI)
endif()
if(SENSORY_KEY_WORD_DETECTOR)
SET(LINK_PATH ${LINK_PATH} SENSORY)
endif()
if(GSTREAMER_MEDIA_PLAYER)
SET(LINK_PATH ${LINK_PATH} MediaPlayer)
add_definitions(-DGSTREAMER_MEDIA_PLAYER)
endif()
# Define a variable for the audio inputs.
set(INTEGRATION_INPUTS "${Integration_SOURCE_DIR}/inputs")
# Copy SDK Json file to the build directory.
set(SDK_CONFIG_FILENAME "AlexaClientSDKConfig.json")
set(SDK_CONFIG_FILE_SOURCE "${Integration_SOURCE_DIR}/${SDK_CONFIG_FILENAME}")
set(SDK_CONFIG_FILE_TARGET "${Integration_BINARY_DIR}/${SDK_CONFIG_FILENAME}")
# Use configure_file to support variable substitution later.
configure_file("${SDK_CONFIG_FILE_SOURCE}" "${SDK_CONFIG_FILE_TARGET}")
# Copy AuthServer to the build directory.
set(AUTHSERVER_SCRIPT_FILENAME "AuthServer.py")
set(AUTHSERVER_SCRIPT_FILE_SOURCE "${AlexaClientSDK_SOURCE_DIR}/tools/AuthServer/${AUTHSERVER_SCRIPT_FILENAME}")
set(AUTHSERVER_SCRIPT_FILE_TARGET "${AlexaClientSDK_BINARY_DIR}/AuthServer/${AUTHSERVER_SCRIPT_FILENAME}")
# Use configure_file to pass SDK_CONFIG_FILE_TARGET as the default config file.
configure_file("${AUTHSERVER_SCRIPT_FILE_SOURCE}" "${AUTHSERVER_SCRIPT_FILE_TARGET}")
if(BUILD_TESTING)
set(testSourceFiles
"${CMAKE_CURRENT_SOURCE_DIR}/AlexaAuthorizationDelegateTest.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/AlexaCommunicationsLibraryTest.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/AlexaDirectiveSequencerLibraryTest.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/AudioInputProcessorIntegrationTest.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/ServerDisconnectIntegrationTest.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/SpeechSynthesizerIntegrationTest.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/AlertsIntegrationTest.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/AudioPlayerIntegrationTest.cpp")
# file(GLOB_RECURSE testSourceFiles RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "*Test.cpp")
foreach (testSourceFile IN LISTS testSourceFiles)
get_filename_component(testName ${testSourceFile} NAME_WE)
add_executable(${testName} ${testSourceFile})
target_include_directories(${testName} PUBLIC "${INCLUDE_PATH}")
target_link_libraries(${testName} "${LINK_PATH}")
endforeach()
include(${Integration_BINARY_DIR}/CTestCustom.cmake OPTIONAL)
separate_arguments(CTEST_CUSTOM_PRE_TEST UNIX_COMMAND "${CTEST_CUSTOM_PRE_TEST}")
separate_arguments(CTEST_CUSTOM_POST_TEST UNIX_COMMAND "${CTEST_CUSTOM_POST_TEST}")
add_custom_target(integration
COMMAND ${CTEST_CUSTOM_PRE_TEST}
COMMAND AlexaAuthorizationDelegateTest "${SDK_CONFIG_FILE_TARGET}"
COMMAND AlexaCommunicationsLibraryTest "${SDK_CONFIG_FILE_TARGET}" "${INTEGRATION_INPUTS}"
COMMAND AlexaDirectiveSequencerLibraryTest "${SDK_CONFIG_FILE_TARGET}" "${INTEGRATION_INPUTS}"
COMMAND AudioInputProcessorIntegrationTest "${SDK_CONFIG_FILE_TARGET}" "${INTEGRATION_INPUTS}"
COMMAND ServerDisconnectIntegrationTest "${SDK_CONFIG_FILE_TARGET}" "${INTEGRATION_INPUTS}"
COMMAND SpeechSynthesizerIntegrationTest "${SDK_CONFIG_FILE_TARGET}" "${INTEGRATION_INPUTS}"
COMMAND AlertsIntegrationTest "${SDK_CONFIG_FILE_TARGET}" "${INTEGRATION_INPUTS}"
COMMAND AudioPlayerIntegrationTest "${SDK_CONFIG_FILE_TARGET}" "${INTEGRATION_INPUTS}"
COMMAND ${CTEST_CUSTOM_POST_TEST})
message(STATUS "Please fill ${SDK_CONFIG_FILE_TARGET} before you execute integration tests.")
if(NETWORK_INTEGRATION_TESTS AND (${CMAKE_SYSTEM_NAME} MATCHES "Linux"))
set(networkTestSourceFile
"${CMAKE_CURRENT_SOURCE_DIR}/NetworkIntegrationTests.cpp")
get_filename_component(networkTestName ${networkTestSourceFile} NAME_WE)
add_executable(${networkTestName} ${networkTestSourceFile})
target_include_directories(${networkTestName} PUBLIC "${INCLUDE_PATH}")
target_link_libraries(${networkTestName} "${LINK_PATH}")
add_custom_target(networkIntegration
COMMAND NetworkIntegrationTests "${SDK_CONFIG_FILE_TARGET}" "${NETWORK_INTERFACE}")
message(STATUS "Please fill ${SDK_CONFIG_FILE_TARGET} before you execute integration tests.")
else()
message("Skipping build of NetworkIntegrationTests.cpp.")
endif()
Version 1.1.0 alexa-client-sdk - Changes in this update: - Better GStreamer error reporting. MediaPlayer used to only report `MEDIA_ERROR_UNKNOWN`, now reports more specific errors as defined in `ErrorType.h`. - Codebase has been formatted for easier reading. - `DirectiveRouter::removeDirectiveHandler()` signature changed and now returns a bool indicating if given handler should be successfully removed or not. - Cleanup of raw and shared pointers in the creation of `Transport` objects. - `HTTP2Stream`s now have IDs assigned as they are acquired as opposed to created, making associated logs easier to interpret. - `AlertsCapabilityAgent` has been refactored. - Alert management has been factored out into an `AlertScheduler` class. - Creation of Reminder (implements Alert) class. - Added new capability agent for `PlaybackController` with unit tests. - Added Settings interface with unit tests. - Return type of `getOffsetInMilliseconds()` changed from `int64_t` to `std::chronology::milliseconds`. - Added `AudioPlayer` unit tests. - Added teardown for all Integration tests except Alerts. - Implemented PlaylistParser. - Bug fixes: - AIP getting stuck in `LISTENING` or `THINKING` and refusing user input on network outage. - SampleApp crashing if running for 5 minutes after network disconnect. - Issue where on repeated user barge-ins, `AudioPlayer` would not pause. Specifically, the third attempt to “Play iHeartRadio” would not result in currently-playing music pausing. - Utterances being ignored after particularly long TTS. - GStreamer errors cropping up on SampleApp exit as a result of accessing the pipeline before it’s been setup. - Crashing when playing one URL after another. - Buffer overrun in Alerts Renderer. - [SampleApp crashing when issuing "Alexa skip" command with iHeartRadio.](https://github.com/alexa/avs-device-sdk/issues/153) - [`HTTP2Transport` network thread triggering a join on itself.](https://github.com/alexa/avs-device-sdk/issues/127) - [`HTTP2Stream` request handling truncating exception messages.](https://github.com/alexa/avs-device-sdk/issues/67) - [`AudioPlayer` was attempting an incorrect state transition from `STOPPED` to `PLAYING` through a `playbackResumed`.](https://github.com/alexa/avs-device-sdk/issues/138)
2017-10-02 22:59:05 +00:00
endif()