IVGCVSW-3937 Make dynamic use the of the profiling connection
in the SendCounterPacket class
* Passing the profiling connection as an argument to the
pertinent methods of the SendCounterPacket class, as the
connection is created dynamically by the ProfilingService
* Updated the unit tests accordingly
Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
Change-Id: Ibe72bdbad814a201c4f1505cff4badbb9b03b13e
diff --git a/src/profiling/test/ProfilingTests.cpp b/src/profiling/test/ProfilingTests.cpp
index 71d9dcf..ba1e6cf 100644
--- a/src/profiling/test/ProfilingTests.cpp
+++ b/src/profiling/test/ProfilingTests.cpp
@@ -1778,9 +1778,8 @@
uint32_t version = 1;
Holder holder;
TestCaptureThread captureThread;
- MockProfilingConnection mockProfilingConnection;
MockBufferManager mockBuffer(512);
- SendCounterPacket sendCounterPacket(mockProfilingConnection, mockBuffer);
+ SendCounterPacket sendCounterPacket(mockBuffer);
uint32_t sizeOfUint32 = numeric_cast<uint32_t>(sizeof(uint32_t));
uint32_t sizeOfUint16 = numeric_cast<uint32_t>(sizeof(uint16_t));
@@ -2140,9 +2139,8 @@
std::vector<uint16_t> captureIds1 = { 0, 1 };
std::vector<uint16_t> captureIds2;
- MockProfilingConnection mockProfilingConnection;
MockBufferManager mockBuffer(512);
- SendCounterPacket sendCounterPacket(mockProfilingConnection, mockBuffer);
+ SendCounterPacket sendCounterPacket(mockBuffer);
std::vector<uint16_t> counterIds;
CaptureReader captureReader;
@@ -2210,9 +2208,8 @@
Packet packetA(packetId, 0, packetData);
- MockProfilingConnection mockProfilingConnection;
MockBufferManager mockBuffer(1024);
- SendCounterPacket sendCounterPacket(mockProfilingConnection, mockBuffer);
+ SendCounterPacket sendCounterPacket(mockBuffer);
CounterDirectory counterDirectory;
@@ -2244,9 +2241,8 @@
Packet packetA(packetId, 0, packetData);
- MockProfilingConnection mockProfilingConnection;
MockBufferManager mockBuffer(1024);
- SendCounterPacket sendCounterPacket(mockProfilingConnection, mockBuffer);
+ SendCounterPacket sendCounterPacket(mockBuffer);
CounterDirectory counterDirectory;
const Device* device = counterDirectory.RegisterDevice("deviceA", 1);