Source Level Debugger - disable support on BDW

- suppress Gmock warning in DeviceWithSourceLevelDebugger test

Change-Id: Iab9190d3fd7a17741baf87ebe1fbc7244631653b
This commit is contained in:
Hoppe, Mateusz
2018-05-22 13:22:56 +02:00
committed by sys_ocldev
parent 467738f791
commit c104db1d5e
13 changed files with 87 additions and 30 deletions

View File

@ -29,10 +29,13 @@
#include "runtime/os_interface/32bit_memory.h"
#include "runtime/os_interface/debug_settings_manager.h"
#include "runtime/os_interface/os_interface.h"
#include "runtime/source_level_debugger/source_level_debugger.h"
#include "unit_tests/fixtures/device_fixture.h"
#include "unit_tests/helpers/debug_manager_state_restore.h"
#include "unit_tests/helpers/hw_helper_tests.h"
#include "unit_tests/mocks/mock_builtins.h"
#include "unit_tests/mocks/mock_device.h"
#include "hw_cmds.h"
#include "test.h"
@ -742,3 +745,24 @@ TEST(Device_GetCaps, GivenFlagEnabled64kbPagesWhenSetThenReturnCorrectValue) {
OSInterface::osEnabled64kbPages = orgOsEnabled64kbPages;
hwInfo.capabilityTable.ftr64KBpages = orgftr64KBpages;
}
TEST(Device_GetCaps, givenDeviceWithNullSourceLevelDebuggerWhenCapsAreInitializedThenSourceLevelDebuggerActiveIsSetToFalse) {
std::unique_ptr<Device> device(Device::create<OCLRT::MockDevice>(platformDevices[0]));
const auto &caps = device->getDeviceInfo();
EXPECT_EQ(nullptr, device->getSourceLevelDebugger());
EXPECT_FALSE(caps.sourceLevelDebuggerActive);
}
typedef HwHelperTest DeviceCapsWithModifiedHwInfoTest;
TEST_F(DeviceCapsWithModifiedHwInfoTest, givenPlatformWithSourceLevelDebuggerNotSupportedWhenDeviceIsCreatedThenSourceLevelDebuggerActiveIsSetToFalse) {
hwInfo.capabilityTable.sourceLevelDebuggerSupported = false;
std::unique_ptr<MockDeviceWithSourceLevelDebugger<>> device(Device::create<MockDeviceWithSourceLevelDebugger<>>(&hwInfo));
const auto &caps = device->getDeviceInfo();
EXPECT_NE(nullptr, device->getSourceLevelDebugger());
EXPECT_FALSE(caps.sourceLevelDebuggerActive);
}