IVGCVSW-4582 Undefined reference to GetProfilingService causes failure in the Backends CI job

* Enable the GetProfilingService() function to BackendProfilingTests and ProfilingTestUtils

Signed-off-by: Sadik Armagan <sadik.armagan@arm.com>
Change-Id: I32e3625db0f465883f2ec27fb7c2fad4e91b6306
diff --git a/src/armnn/test/RuntimeTests.cpp b/src/armnn/test/RuntimeTests.cpp
index 9ced7e9..d5bc26a 100644
--- a/src/armnn/test/RuntimeTests.cpp
+++ b/src/armnn/test/RuntimeTests.cpp
@@ -21,6 +21,7 @@
 
 #include <boost/test/unit_test.hpp>
 #include "RuntimeTests.hpp"
+#include "TestUtils.hpp"
 
 namespace armnn
 {
@@ -30,11 +31,6 @@
     runtime->m_LoadedNetworks.reserve(1);
 }
 
-profiling::ProfilingService& GetProfilingService(armnn::Runtime* runtime)
-{
-    return runtime->m_ProfilingService;
-}
-
 }
 
 BOOST_AUTO_TEST_SUITE(Runtime)
diff --git a/src/armnn/test/TestUtils.cpp b/src/armnn/test/TestUtils.cpp
index b0ed17e..8ef820b 100644
--- a/src/armnn/test/TestUtils.cpp
+++ b/src/armnn/test/TestUtils.cpp
@@ -18,3 +18,13 @@
     from->GetOutputSlot(fromIndex).Connect(to->GetInputSlot(toIndex));
     from->GetOutputSlot(fromIndex).SetTensorInfo(tensorInfo);
 }
+
+namespace armnn
+{
+
+profiling::ProfilingService& GetProfilingService(armnn::Runtime* runtime)
+{
+    return runtime->m_ProfilingService;
+}
+
+}
\ No newline at end of file
diff --git a/src/armnn/test/TestUtils.hpp b/src/armnn/test/TestUtils.hpp
index 9b1a3bf..9c5f672 100644
--- a/src/armnn/test/TestUtils.hpp
+++ b/src/armnn/test/TestUtils.hpp
@@ -7,6 +7,7 @@
 
 #include <armnn/INetwork.hpp>
 #include <Graph.hpp>
+#include <Runtime.hpp>
 
 void Connect(armnn::IConnectableLayer* from, armnn::IConnectableLayer* to, const armnn::TensorInfo& tensorInfo,
              unsigned int fromIndex = 0, unsigned int toIndex = 0);
@@ -47,3 +48,10 @@
 
     return true;
 }
+
+namespace armnn
+{
+
+profiling::ProfilingService& GetProfilingService(armnn::Runtime* runtime);
+
+} // namespace armnn
\ No newline at end of file
diff --git a/src/backends/backendsCommon/test/BackendProfilingTests.cpp b/src/backends/backendsCommon/test/BackendProfilingTests.cpp
index 1cf67c0..7c78e14 100644
--- a/src/backends/backendsCommon/test/BackendProfilingTests.cpp
+++ b/src/backends/backendsCommon/test/BackendProfilingTests.cpp
@@ -14,7 +14,7 @@
 #include "ProfilingUtils.hpp"
 #include "RequestCounterDirectoryCommandHandler.hpp"
 
-#include <Runtime.hpp>
+#include <test/TestUtils.hpp>
 
 #include <armnn/utility/IgnoreUnused.hpp>
 #include <armnn/BackendId.hpp>
@@ -119,7 +119,6 @@
 
     armnn::MockBackendInitialiser initialiser;
     // Create a runtime
-//    armnn::IRuntimePtr runtime(armnn::IRuntime::Create(options));
     armnn::Runtime runtime(options);
 
     // Check if the MockBackends 3 dummy counters {0, 1, 2-5 (four cores)} are registered
diff --git a/src/profiling/test/ProfilingTestUtils.cpp b/src/profiling/test/ProfilingTestUtils.cpp
index 17291ba..325cb40 100644
--- a/src/profiling/test/ProfilingTestUtils.cpp
+++ b/src/profiling/test/ProfilingTestUtils.cpp
@@ -9,7 +9,8 @@
 #include <armnn/Descriptors.hpp>
 #include <LabelsAndEventClasses.hpp>
 #include <ProfilingService.hpp>
-#include <Runtime.hpp>
+
+#include <test/TestUtils.hpp>
 
 #include <boost/test/unit_test.hpp>
 
@@ -296,7 +297,6 @@
     // Create runtime in which test will run
     armnn::IRuntime::CreationOptions options;
     options.m_ProfilingOptions.m_EnableProfiling = true;
-//    armnn::IRuntimePtr runtime(armnn::IRuntime::Create(options));
     armnn::Runtime runtime(options);
 
     // build up the structure of the network