Refactor variables to modify getDevices func behavior

store them in one struct
expect that global state is restored on test end

Related-To: NEO-4207

Change-Id: Icd1db59598f464a34608290d6023405cf7f246f0
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2020-02-03 13:19:12 +01:00
committed by sys_ocldev
parent e631899fba
commit 10db7e0328
33 changed files with 130 additions and 93 deletions

View File

@@ -6,6 +6,7 @@
*/
#include "core/os_interface/os_interface.h"
#include "core/unit_tests/helpers/ult_hw_config.h"
#include "runtime/device/device.h"
#include "runtime/platform/platform.h"
#include "runtime/program/kernel_info.h"
@@ -13,7 +14,6 @@
#include "unit_tests/fixtures/device_fixture.h"
#include "unit_tests/helpers/execution_environment_helper.h"
#include "unit_tests/helpers/variable_backup.h"
#include "unit_tests/libult/create_command_stream.h"
#include "unit_tests/libult/source_level_debugger_library.h"
#include "unit_tests/mocks/mock_source_level_debugger.h"
@@ -488,7 +488,8 @@ TEST(SourceLevelDebugger, givenKernelDebuggerLibraryActiveWhenDeviceImplIsCreate
DebuggerLibrary::setDebuggerActive(true);
DebuggerLibrary::injectDebuggerLibraryInterceptor(&interceptor);
VariableBackup<bool> backup(&overrideCommandStreamReceiverCreation, true);
VariableBackup<UltHwConfig> backup(&ultHwConfig);
ultHwConfig.useHwCsr = true;
HardwareInfo *hwInfo = nullptr;
ExecutionEnvironment *executionEnvironment = getExecutionEnvironmentImpl(hwInfo, 1);