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/SendTimelinePacketTests.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/profiling/test/SendTimelinePacketTests.cpp') diff --git a/src/profiling/test/SendTimelinePacketTests.cpp b/src/profiling/test/SendTimelinePacketTests.cpp index c03e745574..98b161f65e 100644 --- a/src/profiling/test/SendTimelinePacketTests.cpp +++ b/src/profiling/test/SendTimelinePacketTests.cpp @@ -210,7 +210,7 @@ BOOST_AUTO_TEST_CASE(SendEventClassAfterTimelineEntityPacketTest) { unsigned int uint32_t_size = sizeof(uint32_t); unsigned int uint64_t_size = sizeof(uint64_t); - unsigned int threadId_size = sizeof(std::thread::id); + unsigned int threadId_size = sizeof(std::thread::id); // Is platform dependent MockBufferManager bufferManager(512); TimelinePacketWriterFactory timelinePacketWriterFactory(bufferManager); @@ -337,7 +337,7 @@ BOOST_AUTO_TEST_CASE(SendEventClassAfterTimelineEntityPacketTest) uint32_t eventBinaryPacketSequenceNumbered = (eventBinaryPacketHeaderWord1 >> 24) & 0x00000001; uint32_t eventBinaryPacketDataLength = (eventBinaryPacketHeaderWord1 >> 0) & 0x00FFFFFF; BOOST_CHECK(eventBinaryPacketSequenceNumbered == 0); - BOOST_CHECK(eventBinaryPacketDataLength == 28); + BOOST_CHECK(eventBinaryPacketDataLength == 20 + threadId_size); // Check the decl_id offset += uint32_t_size; -- cgit v1.2.1