diff options
author | Jan Eilers <jan.eilers@arm.com> | 2020-03-26 12:04:54 +0000 |
---|---|---|
committer | Jan Eilers <jan.eilers@arm.com> | 2020-03-26 12:04:54 +0000 |
commit | a10e2a26b20b124aaa03f20554172d88683257f7 (patch) | |
tree | 6ca5740a267857e94aa064500e582667ff2ed325 /src/profiling/test/SendTimelinePacketTests.cpp | |
parent | af1c63b98df76caa89ecc8d599de5fe1e0b60d88 (diff) | |
download | armnn-a10e2a26b20b124aaa03f20554172d88683257f7.tar.gz |
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 <jan.eilers@arm.com>
Change-Id: I4794ebbdda2d75ed5be7112f6a3bf2e5f14f221b
Diffstat (limited to 'src/profiling/test/SendTimelinePacketTests.cpp')
-rw-r--r-- | src/profiling/test/SendTimelinePacketTests.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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; |