From a10e2a26b20b124aaa03f20554172d88683257f7 Mon Sep 17 00:00:00 2001 From: Jan Eilers Date: Thu, 26 Mar 2020 12:04:54 +0000 Subject: IVGCVSW-4526 Fix UnitTest errors when running on raspberry pi * The std::thread::id is included in some timeline packages of the profiler. But the size of thread::id is platform dependent. That's why some tests expected a wrong package size Signed-off-by: Jan Eilers Change-Id: I4794ebbdda2d75ed5be7112f6a3bf2e5f14f221b --- src/profiling/test/ProfilingTestUtils.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/profiling/test/ProfilingTestUtils.cpp') diff --git a/src/profiling/test/ProfilingTestUtils.cpp b/src/profiling/test/ProfilingTestUtils.cpp index 74e140c093..244051c785 100644 --- a/src/profiling/test/ProfilingTestUtils.cpp +++ b/src/profiling/test/ProfilingTestUtils.cpp @@ -909,7 +909,9 @@ void VerifyPostOptimisationStructureTestImpl(armnn::BackendId backendId) // Validate inference data size = inferenceReadableBuffer->GetSize(); - BOOST_CHECK(size == 1596); + + unsigned int threadId_size = sizeof(std::thread::id); // Is platform dependent + BOOST_CHECK(size == 1516 + 10 * threadId_size); readableData = inferenceReadableBuffer->GetReadableData(); BOOST_CHECK(readableData != nullptr); @@ -917,7 +919,7 @@ void VerifyPostOptimisationStructureTestImpl(armnn::BackendId backendId) offset = 0; // Verify Header - VerifyTimelineHeaderBinary(readableData, offset, 1588); + VerifyTimelineHeaderBinary(readableData, offset, 1508 + 10 * threadId_size); // Inference timeline trace // Inference entity -- cgit v1.2.1