diff options
author | Matteo Martincigh <matteo.martincigh@arm.com> | 2019-11-08 11:23:06 +0000 |
---|---|---|
committer | Matteo Martincigh <matteo.martincigh@arm.com> | 2019-11-15 15:34:20 +0000 |
commit | cdfb9417ddce28a5cbd33f8049a147168a26aa9b (patch) | |
tree | 925ebcb589cff2a118cd47dfbaf5d1a5daf058ea /tests/profiling/gatordmock/tests/GatordMockTests.cpp | |
parent | 34a407d4a95830ff9fad05e2bff34dcfc631c931 (diff) | |
download | armnn-cdfb9417ddce28a5cbd33f8049a147168a26aa9b.tar.gz |
IVGCVSW-4073 Send stream info in the ConnectionAcknowledgedCommandHandler
* Added call to ISendTimelinePacket::SendStreamMetaDataPacket
* Added call to ISendTimelinePacket::SendTimelineMessageDirectoryPackage
* Added new StreamMetadataCommandHandler class to the mock Gatord service
* Updated code and unit tests
* Added include paths to the gatord mock target
Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
Change-Id: Ic6d200b513175884607b7c0563cbfa4942ff2fc6
Diffstat (limited to 'tests/profiling/gatordmock/tests/GatordMockTests.cpp')
-rw-r--r-- | tests/profiling/gatordmock/tests/GatordMockTests.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/tests/profiling/gatordmock/tests/GatordMockTests.cpp b/tests/profiling/gatordmock/tests/GatordMockTests.cpp index 53f580deaf..26c0361200 100644 --- a/tests/profiling/gatordmock/tests/GatordMockTests.cpp +++ b/tests/profiling/gatordmock/tests/GatordMockTests.cpp @@ -3,12 +3,13 @@ // SPDX-License-Identifier: MIT // -#include "../GatordMockService.hpp" -#include "../PeriodicCounterCaptureCommandHandler.hpp" - #include <CommandHandlerRegistry.hpp> #include <DirectoryCaptureCommandHandler.hpp> #include <ProfilingService.hpp> +#include <GatordMockService.hpp> +#include <PeriodicCounterCaptureCommandHandler.hpp> +#include <StreamMetadataCommandHandler.hpp> +#include <TimelineDirectoryCaptureCommandHandler.hpp> #include <test/SendCounterPacketTests.hpp> @@ -117,15 +118,23 @@ BOOST_AUTO_TEST_CASE(GatorDMockEndToEnd) profiling::CommandHandlerRegistry registry; // Update with derived functors + gatordmock::StreamMetadataCommandHandler streamMetadataCommandHandler( + 0, 0, packetVersionResolver.ResolvePacketVersion(0, 0).GetEncodedValue(), true); + gatordmock::PeriodicCounterCaptureCommandHandler counterCaptureCommandHandler( 0, 4, packetVersionResolver.ResolvePacketVersion(0, 4).GetEncodedValue(), true); profiling::DirectoryCaptureCommandHandler directoryCaptureCommandHandler( 0, 2, packetVersionResolver.ResolvePacketVersion(0, 2).GetEncodedValue(), true); + gatordmock::TimelineDirectoryCaptureCommandHandler timelineDirectoryCaptureCommandHandler( + 1, 0, packetVersionResolver.ResolvePacketVersion(1, 0).GetEncodedValue(), true); + // Register different derived functors + registry.RegisterFunctor(&streamMetadataCommandHandler); registry.RegisterFunctor(&counterCaptureCommandHandler); registry.RegisterFunctor(&directoryCaptureCommandHandler); + registry.RegisterFunctor(&timelineDirectoryCaptureCommandHandler); // Setup the mock service to bind to the UDS. std::string udsNamespace = "gatord_namespace"; gatordmock::GatordMockService mockService(registry, false); |