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/ProfilingTests.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/profiling/test/ProfilingTests.cpp') diff --git a/src/profiling/test/ProfilingTests.cpp b/src/profiling/test/ProfilingTests.cpp index a631cb2356..74b93d7c4f 100644 --- a/src/profiling/test/ProfilingTests.cpp +++ b/src/profiling/test/ProfilingTests.cpp @@ -692,7 +692,7 @@ BOOST_AUTO_TEST_CASE(CheckProfilingServiceCounterValues) ProfilingService* profilingServicePtr = &profilingService; std::vector writers; - for (int i = 0; i < 100; ++i) + for (int i = 0; i < 10; ++i) { // Increment and decrement the first counter writers.push_back(std::thread(&ProfilingService::IncrementCounterValue, @@ -719,7 +719,7 @@ BOOST_AUTO_TEST_CASE(CheckProfilingServiceCounterValues) BOOST_CHECK(counterValue == (profilingService.GetCounterValue(armnn::profiling::UNREGISTERED_BACKENDS) - profilingService.GetCounterValue(armnn::profiling::REGISTERED_BACKENDS))); - BOOST_CHECK(profilingService.GetCounterValue(armnn::profiling::INFERENCES_RUN) == 500); + BOOST_CHECK(profilingService.GetCounterValue(armnn::profiling::INFERENCES_RUN) == 50); BOOST_CHECK_NO_THROW(profilingService.SetCounterValue(armnn::profiling::UNREGISTERED_BACKENDS, 4)); BOOST_CHECK_NO_THROW(counterValue = profilingService.GetCounterValue(armnn::profiling::UNREGISTERED_BACKENDS)); -- cgit v1.2.1