mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
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:
committed by
sys_ocldev
parent
e631899fba
commit
10db7e0328
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2019 Intel Corporation
|
||||
# Copyright (C) 2019-2020 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
@@ -15,6 +15,8 @@ set(NEO_CORE_HELPERS_TESTS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/simd_helper_tests.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/string_tests.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/string_to_hash_tests.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ult_hw_config.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ult_hw_config.inl
|
||||
)
|
||||
|
||||
set_property(GLOBAL PROPERTY NEO_CORE_HELPERS_TESTS ${NEO_CORE_HELPERS_TESTS})
|
||||
|
||||
18
core/unit_tests/helpers/ult_hw_config.h
Normal file
18
core/unit_tests/helpers/ult_hw_config.h
Normal file
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Copyright (C) 2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
namespace NEO {
|
||||
struct UltHwConfig {
|
||||
bool mockedGetDevicesFuncResult = true;
|
||||
bool useHwCsr = false;
|
||||
bool useMockedGetDevicesFunc = true;
|
||||
bool forceOsAgnosticMemoryManager = true;
|
||||
};
|
||||
|
||||
extern UltHwConfig ultHwConfig;
|
||||
} // namespace NEO
|
||||
12
core/unit_tests/helpers/ult_hw_config.inl
Normal file
12
core/unit_tests/helpers/ult_hw_config.inl
Normal file
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "core/unit_tests/helpers/ult_hw_config.h"
|
||||
|
||||
namespace NEO {
|
||||
UltHwConfig ultHwConfig{};
|
||||
} // namespace NEO
|
||||
Reference in New Issue
Block a user