From 0c32ccfcd0b770cdd4eeb9d778b7f72a233e229a Mon Sep 17 00:00:00 2001 From: Finn Williams Date: Tue, 12 May 2020 13:37:06 +0100 Subject: IVGCVSW-4737 Add check for CpuRef back-end before using it in tests Signed-off-by: Finn Williams Change-Id: Id7fbb7a39d2e9c7085636df44d4c8603a60cd4bf --- src/profiling/test/FileOnlyProfilingDecoratorTests.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/profiling') diff --git a/src/profiling/test/FileOnlyProfilingDecoratorTests.cpp b/src/profiling/test/FileOnlyProfilingDecoratorTests.cpp index 164a94a9ec..80236ae4eb 100644 --- a/src/profiling/test/FileOnlyProfilingDecoratorTests.cpp +++ b/src/profiling/test/FileOnlyProfilingDecoratorTests.cpp @@ -3,10 +3,7 @@ // SPDX-License-Identifier: MIT // -#include -#include #include -#include #include #include #include "PrintPacketHeaderHandler.hpp" @@ -17,7 +14,6 @@ #include #include -#include #include #include @@ -53,6 +49,12 @@ std::string UniqueFileName() BOOST_AUTO_TEST_CASE(TestFileOnlyProfiling) { + // This test requires the CpuRef backend to be enabled + if(!BackendRegistryInstance().IsBackendRegistered("CpuRef")) + { + return; + } + // Create a temporary file name. boost::filesystem::path tempPath = boost::filesystem::temp_directory_path(); boost::filesystem::path tempFile = UniqueFileName(); -- cgit v1.2.1