diff options
author | Jim Flynn <jim.flynn@arm.com> | 2022-03-08 21:23:44 +0000 |
---|---|---|
committer | Jim Flynn <jim.flynn@arm.com> | 2022-03-09 22:14:52 +0000 |
commit | f9db3efe5ce2b989b59c47056e1b84b32d2f1100 (patch) | |
tree | b1fd75d5f951f9036a8f0b37211fc30b4d651262 /src/profiling/test | |
parent | 0e5588f3289845d1bd7597ade081764018eda2cc (diff) | |
download | armnn-f9db3efe5ce2b989b59c47056e1b84b32d2f1100.tar.gz |
IVGCVSW-6821 Remove dependency on armnn::Exception classes from the Profiling code
Change-Id: Id46a9a0576091df21b2af5b472f1ca5c6335e8a3
Signed-off-by: Jim Flynn <jim.flynn@arm.com>
Diffstat (limited to 'src/profiling/test')
-rw-r--r-- | src/profiling/test/BufferTests.cpp | 8 | ||||
-rw-r--r-- | src/profiling/test/ProfilingConnectionDumpToFileDecoratorTests.cpp | 4 | ||||
-rw-r--r-- | src/profiling/test/ProfilingMocks.hpp | 6 | ||||
-rw-r--r-- | src/profiling/test/ProfilingTests.cpp | 65 | ||||
-rw-r--r-- | src/profiling/test/ProfilingTests.hpp | 6 | ||||
-rw-r--r-- | src/profiling/test/SendCounterPacketTests.cpp | 16 | ||||
-rw-r--r-- | src/profiling/test/SendCounterPacketTests.hpp | 2 | ||||
-rw-r--r-- | src/profiling/test/SendTimelinePacketTests.cpp | 2 | ||||
-rw-r--r-- | src/profiling/test/TestTimelinePacketHandler.cpp | 6 | ||||
-rw-r--r-- | src/profiling/test/TimelineUtilityMethodsTests.cpp | 2 |
10 files changed, 61 insertions, 56 deletions
diff --git a/src/profiling/test/BufferTests.cpp b/src/profiling/test/BufferTests.cpp index c4714d6ad4..943cfd5f31 100644 --- a/src/profiling/test/BufferTests.cpp +++ b/src/profiling/test/BufferTests.cpp @@ -9,8 +9,6 @@ #include <common/include/SwTrace.hpp> -#include <armnn/Exceptions.hpp> - #include <doctest/doctest.h> using namespace arm::pipe; @@ -113,7 +111,7 @@ TEST_CASE("PacketBufferCommitErrorTest") IPacketBufferPtr packetBuffer = std::make_unique<PacketBuffer>(8); // Cannot commit data bigger than the max size of the buffer - CHECK_THROWS_AS(packetBuffer->Commit(16);, armnn::RuntimeException); + CHECK_THROWS_AS(packetBuffer->Commit(16);, arm::pipe::ProfilingException); } TEST_CASE("BufferReserveTest") @@ -384,7 +382,7 @@ TEST_CASE("ReadSwTraceMessageExceptionTest0") unsigned int uint32_t_size = sizeof(uint32_t); unsigned int offset = uint32_t_size; CHECK_THROWS_AS(ReadSwTraceMessage(packetBuffer->GetReadableData(), offset, packetBuffer->GetSize()), - ProfilingException); + arm::pipe::ProfilingException); } @@ -406,7 +404,7 @@ TEST_CASE("ReadSwTraceMessageExceptionTest1") unsigned int uint32_t_size = sizeof(uint32_t); unsigned int offset = uint32_t_size; CHECK_THROWS_AS(ReadSwTraceMessage(packetBuffer->GetReadableData(), offset, packetBuffer->GetSize()), - ProfilingException); + arm::pipe::ProfilingException); } diff --git a/src/profiling/test/ProfilingConnectionDumpToFileDecoratorTests.cpp b/src/profiling/test/ProfilingConnectionDumpToFileDecoratorTests.cpp index 3c4800a361..fb8c97265b 100644 --- a/src/profiling/test/ProfilingConnectionDumpToFileDecoratorTests.cpp +++ b/src/profiling/test/ProfilingConnectionDumpToFileDecoratorTests.cpp @@ -82,7 +82,7 @@ TEST_CASE("DumpIncomingInvalidFile") options.m_IncomingCaptureFile = "/"; options.m_OutgoingCaptureFile = ""; ProfilingConnectionDumpToFileDecorator decorator(std::make_unique<DummyProfilingConnection>(), options, false); - CHECK_THROWS_AS(decorator.ReadPacket(0), armnn::RuntimeException); + CHECK_THROWS_AS(decorator.ReadPacket(0), arm::pipe::ProfilingException); } TEST_CASE("DumpIncomingInvalidFileIgnoreErrors") @@ -126,7 +126,7 @@ TEST_CASE("DumpOutgoingInvalidFile") options.m_IncomingCaptureFile = ""; options.m_OutgoingCaptureFile = "/"; ProfilingConnectionDumpToFileDecorator decorator(std::make_unique<DummyProfilingConnection>(), options, false); - CHECK_THROWS_AS(decorator.WritePacket(g_DataPtr, g_DataLength), armnn::RuntimeException); + CHECK_THROWS_AS(decorator.WritePacket(g_DataPtr, g_DataLength), arm::pipe::ProfilingException); } TEST_CASE("DumpOutgoingInvalidFileIgnoreErrors") diff --git a/src/profiling/test/ProfilingMocks.hpp b/src/profiling/test/ProfilingMocks.hpp index ca11ae4348..b9ba9315ee 100644 --- a/src/profiling/test/ProfilingMocks.hpp +++ b/src/profiling/test/ProfilingMocks.hpp @@ -13,13 +13,13 @@ #include <SendCounterPacket.hpp> #include <SendThread.hpp> -#include <armnn/Exceptions.hpp> #include <armnn/Optional.hpp> #include <armnn/Conversion.hpp> #include <armnn/utility/Assert.hpp> #include <armnn/utility/IgnoreUnused.hpp> #include <armnn/utility/NumericCast.hpp> +#include <common/include/ProfilingException.hpp> #include <common/include/ProfilingGuidGenerator.hpp> #include <atomic> @@ -294,8 +294,8 @@ public: reservedSize = 0; if (requestedSize > m_MaxBufferSize) { - throw armnn::InvalidArgumentException("The maximum buffer size that can be requested is [" + - std::to_string(m_MaxBufferSize) + "] bytes"); + throw arm::pipe::InvalidArgumentException("The maximum buffer size that can be requested is [" + + std::to_string(m_MaxBufferSize) + "] bytes"); } reservedSize = requestedSize; return std::make_unique<MockPacketBuffer>(requestedSize); diff --git a/src/profiling/test/ProfilingTests.cpp b/src/profiling/test/ProfilingTests.cpp index 128e1f15d2..0389377fe5 100644 --- a/src/profiling/test/ProfilingTests.cpp +++ b/src/profiling/test/ProfilingTests.cpp @@ -512,29 +512,29 @@ TEST_CASE("CheckProfilingStateMachine") CHECK(profilingState8.GetCurrentState() == ProfilingState::Active); ProfilingStateMachine profilingState9(ProfilingState::Uninitialised); - CHECK_THROWS_AS(profilingState9.TransitionToState(ProfilingState::WaitingForAck), armnn::Exception); + CHECK_THROWS_AS(profilingState9.TransitionToState(ProfilingState::WaitingForAck), arm::pipe::ProfilingException); ProfilingStateMachine profilingState10(ProfilingState::Uninitialised); - CHECK_THROWS_AS(profilingState10.TransitionToState(ProfilingState::Active), armnn::Exception); + CHECK_THROWS_AS(profilingState10.TransitionToState(ProfilingState::Active), arm::pipe::ProfilingException); ProfilingStateMachine profilingState11(ProfilingState::NotConnected); - CHECK_THROWS_AS(profilingState11.TransitionToState(ProfilingState::Uninitialised), armnn::Exception); + CHECK_THROWS_AS(profilingState11.TransitionToState(ProfilingState::Uninitialised), arm::pipe::ProfilingException); ProfilingStateMachine profilingState12(ProfilingState::NotConnected); - CHECK_THROWS_AS(profilingState12.TransitionToState(ProfilingState::Active), armnn::Exception); + CHECK_THROWS_AS(profilingState12.TransitionToState(ProfilingState::Active), arm::pipe::ProfilingException); ProfilingStateMachine profilingState13(ProfilingState::WaitingForAck); - CHECK_THROWS_AS(profilingState13.TransitionToState(ProfilingState::Uninitialised), armnn::Exception); + CHECK_THROWS_AS(profilingState13.TransitionToState(ProfilingState::Uninitialised), arm::pipe::ProfilingException); ProfilingStateMachine profilingState14(ProfilingState::WaitingForAck); profilingState14.TransitionToState(ProfilingState::NotConnected); CHECK(profilingState14.GetCurrentState() == ProfilingState::NotConnected); ProfilingStateMachine profilingState15(ProfilingState::Active); - CHECK_THROWS_AS(profilingState15.TransitionToState(ProfilingState::Uninitialised), armnn::Exception); + CHECK_THROWS_AS(profilingState15.TransitionToState(ProfilingState::Uninitialised), arm::pipe::ProfilingException); ProfilingStateMachine profilingState16(ProfilingState::Active); - CHECK_THROWS_AS(profilingState16.TransitionToState(ProfilingState::WaitingForAck), armnn::Exception); + CHECK_THROWS_AS(profilingState16.TransitionToState(ProfilingState::WaitingForAck), arm::pipe::ProfilingException); ProfilingStateMachine profilingState17(ProfilingState::Uninitialised); @@ -998,7 +998,8 @@ TEST_CASE("CheckCounterDirectoryRegisterDevice") // Register a device with the name of a device already registered const Device* deviceSameName = nullptr; - CHECK_THROWS_AS(deviceSameName = counterDirectory.RegisterDevice(deviceName), arm::pipe::InvalidArgumentException); + CHECK_THROWS_AS(deviceSameName = counterDirectory.RegisterDevice(deviceName), + arm::pipe::InvalidArgumentException); CHECK(counterDirectory.GetDeviceCount() == 1); CHECK(!deviceSameName); @@ -1831,11 +1832,11 @@ TEST_CASE("CounterSelectionCommandHandlerParseData") readCounterValues, sendCounterPacket, profilingStateMachine); profilingStateMachine.TransitionToState(ProfilingState::Uninitialised); - CHECK_THROWS_AS(commandHandler(packetA), armnn::RuntimeException); + CHECK_THROWS_AS(commandHandler(packetA), arm::pipe::ProfilingException); profilingStateMachine.TransitionToState(ProfilingState::NotConnected); - CHECK_THROWS_AS(commandHandler(packetA), armnn::RuntimeException); + CHECK_THROWS_AS(commandHandler(packetA), arm::pipe::ProfilingException); profilingStateMachine.TransitionToState(ProfilingState::WaitingForAck); - CHECK_THROWS_AS(commandHandler(packetA), armnn::RuntimeException); + CHECK_THROWS_AS(commandHandler(packetA), arm::pipe::ProfilingException); profilingStateMachine.TransitionToState(ProfilingState::Active); CHECK_NOTHROW(commandHandler(packetA)); @@ -1959,15 +1960,18 @@ TEST_CASE("CheckTimelineActivationAndDeactivation") arm::pipe::Packet ActivateTimelineReportingPacket(packetHeader1); // Length == 0 CHECK_THROWS_AS( - activateTimelineReportingCommandHandler.operator()(ActivateTimelineReportingPacket), armnn::Exception); + activateTimelineReportingCommandHandler.operator()(ActivateTimelineReportingPacket), + arm::pipe::ProfilingException); stateMachine.TransitionToState(ProfilingState::NotConnected); CHECK_THROWS_AS( - activateTimelineReportingCommandHandler.operator()(ActivateTimelineReportingPacket), armnn::Exception); + activateTimelineReportingCommandHandler.operator()(ActivateTimelineReportingPacket), + arm::pipe::ProfilingException); stateMachine.TransitionToState(ProfilingState::WaitingForAck); CHECK_THROWS_AS( - activateTimelineReportingCommandHandler.operator()(ActivateTimelineReportingPacket), armnn::Exception); + activateTimelineReportingCommandHandler.operator()(ActivateTimelineReportingPacket), + arm::pipe::ProfilingException); stateMachine.TransitionToState(ProfilingState::Active); activateTimelineReportingCommandHandler.operator()(ActivateTimelineReportingPacket); @@ -1992,15 +1996,18 @@ TEST_CASE("CheckTimelineActivationAndDeactivation") stateMachine.Reset(); CHECK_THROWS_AS( - deactivateTimelineReportingCommandHandler.operator()(deactivateTimelineReportingPacket), armnn::Exception); + deactivateTimelineReportingCommandHandler.operator()(deactivateTimelineReportingPacket), + arm::pipe::ProfilingException); stateMachine.TransitionToState(ProfilingState::NotConnected); CHECK_THROWS_AS( - deactivateTimelineReportingCommandHandler.operator()(deactivateTimelineReportingPacket), armnn::Exception); + deactivateTimelineReportingCommandHandler.operator()(deactivateTimelineReportingPacket), + arm::pipe::ProfilingException); stateMachine.TransitionToState(ProfilingState::WaitingForAck); CHECK_THROWS_AS( - deactivateTimelineReportingCommandHandler.operator()(deactivateTimelineReportingPacket), armnn::Exception); + deactivateTimelineReportingCommandHandler.operator()(deactivateTimelineReportingPacket), + arm::pipe::ProfilingException); stateMachine.TransitionToState(ProfilingState::Active); deactivateTimelineReportingCommandHandler.operator()(deactivateTimelineReportingPacket); @@ -2076,12 +2083,12 @@ TEST_CASE("CheckConnectionAcknowledged") mockProfilingServiceStatus); // command handler received packet on ProfilingState::Uninitialised - CHECK_THROWS_AS(commandHandler(packetA), armnn::Exception); + CHECK_THROWS_AS(commandHandler(packetA), arm::pipe::ProfilingException); profilingState.TransitionToState(ProfilingState::NotConnected); CHECK(profilingState.GetCurrentState() == ProfilingState::NotConnected); // command handler received packet on ProfilingState::NotConnected - CHECK_THROWS_AS(commandHandler(packetA), armnn::Exception); + CHECK_THROWS_AS(commandHandler(packetA), arm::pipe::ProfilingException); profilingState.TransitionToState(ProfilingState::WaitingForAck); CHECK(profilingState.GetCurrentState() == ProfilingState::WaitingForAck); @@ -2106,7 +2113,7 @@ TEST_CASE("CheckConnectionAcknowledged") sendTimelinePacket, profilingState, mockProfilingServiceStatus); - CHECK_THROWS_AS(differentCommandHandler(packetB), armnn::Exception); + CHECK_THROWS_AS(differentCommandHandler(packetB), arm::pipe::ProfilingException); } TEST_CASE("CheckSocketConnectionException") @@ -2438,13 +2445,13 @@ TEST_CASE("RequestCounterDirectoryCommandHandlerTest1") arm::pipe::Packet wrongPacket(wrongHeader); profilingStateMachine.TransitionToState(ProfilingState::Uninitialised); - CHECK_THROWS_AS(commandHandler(wrongPacket), armnn::RuntimeException); // Wrong profiling state + CHECK_THROWS_AS(commandHandler(wrongPacket), arm::pipe::ProfilingException); // Wrong profiling state profilingStateMachine.TransitionToState(ProfilingState::NotConnected); - CHECK_THROWS_AS(commandHandler(wrongPacket), armnn::RuntimeException); // Wrong profiling state + CHECK_THROWS_AS(commandHandler(wrongPacket), arm::pipe::ProfilingException); // Wrong profiling state profilingStateMachine.TransitionToState(ProfilingState::WaitingForAck); - CHECK_THROWS_AS(commandHandler(wrongPacket), armnn::RuntimeException); // Wrong profiling state + CHECK_THROWS_AS(commandHandler(wrongPacket), arm::pipe::ProfilingException); // Wrong profiling state profilingStateMachine.TransitionToState(ProfilingState::Active); - CHECK_THROWS_AS(commandHandler(wrongPacket), armnn::InvalidArgumentException); // Wrong packet + CHECK_THROWS_AS(commandHandler(wrongPacket), arm::pipe::InvalidArgumentException); // Wrong packet const uint32_t rightHeader = (packetId & 0x000003FF) << 16; @@ -2505,11 +2512,11 @@ TEST_CASE("RequestCounterDirectoryCommandHandlerTest2") "categoryA", 1, 1, 3.0f, "counterB", "descB"); profilingStateMachine.TransitionToState(ProfilingState::Uninitialised); - CHECK_THROWS_AS(commandHandler(packet), armnn::RuntimeException); // Wrong profiling state + CHECK_THROWS_AS(commandHandler(packet), arm::pipe::ProfilingException); // Wrong profiling state profilingStateMachine.TransitionToState(ProfilingState::NotConnected); - CHECK_THROWS_AS(commandHandler(packet), armnn::RuntimeException); // Wrong profiling state + CHECK_THROWS_AS(commandHandler(packet), arm::pipe::ProfilingException); // Wrong profiling state profilingStateMachine.TransitionToState(ProfilingState::WaitingForAck); - CHECK_THROWS_AS(commandHandler(packet), armnn::RuntimeException); // Wrong profiling state + CHECK_THROWS_AS(commandHandler(packet), arm::pipe::ProfilingException); // Wrong profiling state profilingStateMachine.TransitionToState(ProfilingState::Active); CHECK_NOTHROW(commandHandler(packet)); @@ -3409,8 +3416,8 @@ TEST_CASE("CheckProfilingServiceBadPeriodicCounterSelectionPacket") TEST_CASE("CheckCounterIdMap") { CounterIdMap counterIdMap; - CHECK_THROWS_AS(counterIdMap.GetBackendId(0), armnn::Exception); - CHECK_THROWS_AS(counterIdMap.GetGlobalId(0, armnn::profiling::BACKEND_ID), armnn::Exception); + CHECK_THROWS_AS(counterIdMap.GetBackendId(0), arm::pipe::ProfilingException); + CHECK_THROWS_AS(counterIdMap.GetGlobalId(0, armnn::profiling::BACKEND_ID), arm::pipe::ProfilingException); uint16_t globalCounterIds = 0; diff --git a/src/profiling/test/ProfilingTests.hpp b/src/profiling/test/ProfilingTests.hpp index e1590bd4d9..ed3e03db77 100644 --- a/src/profiling/test/ProfilingTests.hpp +++ b/src/profiling/test/ProfilingTests.hpp @@ -96,7 +96,7 @@ public: else { std::this_thread::sleep_for(std::chrono::milliseconds(timeout)); - throw armnn::TimeoutException("Simulate a timeout error\n"); + throw arm::pipe::TimeoutException("Simulate a timeout error\n"); } } @@ -117,7 +117,7 @@ public: { std::this_thread::sleep_for(std::chrono::milliseconds(timeout)); ++m_ReadRequests; - throw armnn::TimeoutException("Simulate a timeout error\n"); + throw arm::pipe::TimeoutException("Simulate a timeout error\n"); } return arm::pipe::Packet(65536); @@ -143,7 +143,7 @@ public: { armnn::IgnoreUnused(timeout); ++m_ReadRequests; - throw armnn::Exception("Simulate a non-timeout error"); + throw arm::pipe::ProfilingException("Simulate a non-timeout error"); } int ReadCalledCount() diff --git a/src/profiling/test/SendCounterPacketTests.cpp b/src/profiling/test/SendCounterPacketTests.cpp index 1380b42d37..cfcd64b98f 100644 --- a/src/profiling/test/SendCounterPacketTests.cpp +++ b/src/profiling/test/SendCounterPacketTests.cpp @@ -14,11 +14,11 @@ #include <SendCounterPacket.hpp> #include <Processes.hpp> -#include <armnn/Exceptions.hpp> #include <armnn/Conversion.hpp> #include <armnn/Utils.hpp> #include <common/include/Constants.hpp> +#include <common/include/ProfilingException.hpp> #include <armnn/utility/Assert.hpp> @@ -1673,7 +1673,7 @@ TEST_CASE("SendCounterDirectoryPacketTest3") // Buffer with enough space MockBufferManager mockBuffer(1024); SendCounterPacket sendCounterPacket(mockBuffer); - CHECK_THROWS_AS(sendCounterPacket.SendCounterDirectoryPacket(counterDirectory), armnn::RuntimeException); + CHECK_THROWS_AS(sendCounterPacket.SendCounterDirectoryPacket(counterDirectory), arm::pipe::ProfilingException); } TEST_CASE("SendCounterDirectoryPacketTest4") @@ -1691,7 +1691,7 @@ TEST_CASE("SendCounterDirectoryPacketTest4") // Buffer with enough space MockBufferManager mockBuffer(1024); SendCounterPacket sendCounterPacket(mockBuffer); - CHECK_THROWS_AS(sendCounterPacket.SendCounterDirectoryPacket(counterDirectory), armnn::RuntimeException); + CHECK_THROWS_AS(sendCounterPacket.SendCounterDirectoryPacket(counterDirectory), arm::pipe::ProfilingException); } TEST_CASE("SendCounterDirectoryPacketTest5") @@ -1709,7 +1709,7 @@ TEST_CASE("SendCounterDirectoryPacketTest5") // Buffer with enough space MockBufferManager mockBuffer(1024); SendCounterPacket sendCounterPacket(mockBuffer); - CHECK_THROWS_AS(sendCounterPacket.SendCounterDirectoryPacket(counterDirectory), armnn::RuntimeException); + CHECK_THROWS_AS(sendCounterPacket.SendCounterDirectoryPacket(counterDirectory), arm::pipe::ProfilingException); } TEST_CASE("SendCounterDirectoryPacketTest6") @@ -1741,7 +1741,7 @@ TEST_CASE("SendCounterDirectoryPacketTest6") // Buffer with enough space MockBufferManager mockBuffer(1024); SendCounterPacket sendCounterPacket(mockBuffer); - CHECK_THROWS_AS(sendCounterPacket.SendCounterDirectoryPacket(counterDirectory), armnn::RuntimeException); + CHECK_THROWS_AS(sendCounterPacket.SendCounterDirectoryPacket(counterDirectory), arm::pipe::ProfilingException); } TEST_CASE("SendCounterDirectoryPacketTest7") @@ -1790,7 +1790,7 @@ TEST_CASE("SendCounterDirectoryPacketTest7") // Buffer with enough space MockBufferManager mockBuffer(1024); SendCounterPacket sendCounterPacket(mockBuffer); - CHECK_THROWS_AS(sendCounterPacket.SendCounterDirectoryPacket(counterDirectory), armnn::RuntimeException); + CHECK_THROWS_AS(sendCounterPacket.SendCounterDirectoryPacket(counterDirectory), arm::pipe::ProfilingException); } TEST_CASE("SendThreadTest0") @@ -2263,7 +2263,7 @@ TEST_CASE("SendThreadSendStreamMetadataPacket1") sendThread.Start(mockProfilingConnection); // The profiling state is set to "Uninitialized", so the send thread should throw an exception - CHECK_THROWS_AS(sendThread.Stop(), armnn::RuntimeException); + CHECK_THROWS_AS(sendThread.Stop(), arm::pipe::ProfilingException); } TEST_CASE("SendThreadSendStreamMetadataPacket2") @@ -2278,7 +2278,7 @@ TEST_CASE("SendThreadSendStreamMetadataPacket2") sendThread.Start(mockProfilingConnection); // The profiling state is set to "NotConnected", so the send thread should throw an exception - CHECK_THROWS_AS(sendThread.Stop(), armnn::RuntimeException); + CHECK_THROWS_AS(sendThread.Stop(), arm::pipe::ProfilingException); } TEST_CASE("SendThreadSendStreamMetadataPacket3") diff --git a/src/profiling/test/SendCounterPacketTests.hpp b/src/profiling/test/SendCounterPacketTests.hpp index 4dec67d335..bae08b231e 100644 --- a/src/profiling/test/SendCounterPacketTests.hpp +++ b/src/profiling/test/SendCounterPacketTests.hpp @@ -10,13 +10,13 @@ #include <ProfilingUtils.hpp> #include <IProfilingConnectionFactory.hpp> -#include <armnn/Exceptions.hpp> #include <armnn/Optional.hpp> #include <armnn/Conversion.hpp> #include <armnn/utility/Assert.hpp> #include <armnn/utility/IgnoreUnused.hpp> #include <armnn/utility/NumericCast.hpp> + #include <atomic> #include <condition_variable> #include <mutex> diff --git a/src/profiling/test/SendTimelinePacketTests.cpp b/src/profiling/test/SendTimelinePacketTests.cpp index 76fa9c1657..eb6a2627b4 100644 --- a/src/profiling/test/SendTimelinePacketTests.cpp +++ b/src/profiling/test/SendTimelinePacketTests.cpp @@ -399,7 +399,7 @@ TEST_CASE("SendTimelinePacketTests2") std::unique_ptr<ISendTimelinePacket> sendTimelinePacket = timelinePacketWriterFactory.GetSendTimelinePacket(); CHECK_THROWS_AS(sendTimelinePacket->SendTimelineMessageDirectoryPackage(), - armnn::RuntimeException); + arm::pipe::ProfilingException); } TEST_CASE("SendTimelinePacketTests3") diff --git a/src/profiling/test/TestTimelinePacketHandler.cpp b/src/profiling/test/TestTimelinePacketHandler.cpp index d38c1751cb..46f0549bba 100644 --- a/src/profiling/test/TestTimelinePacketHandler.cpp +++ b/src/profiling/test/TestTimelinePacketHandler.cpp @@ -39,7 +39,7 @@ void TestTimelinePacketHandler::HandlePacket(const arm::pipe::Packet& packet) { std::stringstream ss; ss << "Received a packet with unknown header [" << packet.GetHeader() << "]"; - throw armnn::Exception(ss.str()); + throw arm::pipe::ProfilingException(ss.str()); } } @@ -63,7 +63,7 @@ void TestTimelinePacketHandler::WaitOnInferenceCompletion(unsigned int timeout) std::chrono::duration<double, std::milli> elapsed = finish - start; std::stringstream ss; ss << "Timed out waiting on inference completion for " << elapsed.count() << " ms"; - throw armnn::TimeoutException(ss.str()); + throw arm::pipe::TimeoutException(ss.str()); } return; } @@ -138,4 +138,4 @@ arm::pipe::ITimelineDecoder::TimelineStatus TimelineMessageDecoder::CreateRelati } // namespace pipe -} // namespace arm
\ No newline at end of file +} // namespace arm diff --git a/src/profiling/test/TimelineUtilityMethodsTests.cpp b/src/profiling/test/TimelineUtilityMethodsTests.cpp index 0833eb4376..422bc1389d 100644 --- a/src/profiling/test/TimelineUtilityMethodsTests.cpp +++ b/src/profiling/test/TimelineUtilityMethodsTests.cpp @@ -306,7 +306,7 @@ TEST_CASE("DeclareLabelTest") CHECK_THROWS_AS(timelineUtilityMethods.DeclareLabel(""), arm::pipe::InvalidArgumentException); // Try declaring an invalid (wrong SWTrace format) label - CHECK_THROWS_AS(timelineUtilityMethods.DeclareLabel("inv@lid lab€l"), RuntimeException); + CHECK_THROWS_AS(timelineUtilityMethods.DeclareLabel("inv@lid lab€l"), arm::pipe::ProfilingException); // Declare a valid label const std::string labelName = "valid label"; |