Rename HwInfoConfig to ProductHelper

Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
Kamil Kopryk
2022-12-12 16:43:41 +00:00
committed by Compute-Runtime-Automation
parent a1cf7fb938
commit 232b886056
394 changed files with 1818 additions and 1787 deletions

View File

@@ -18,15 +18,15 @@
namespace NEO {
HwInfoConfigTestWindows::HwInfoConfigTestWindows() {
ProductHelperTestWindows::ProductHelperTestWindows() {
this->executionEnvironment = std::make_unique<MockExecutionEnvironment>();
this->rootDeviceEnvironment = std::make_unique<RootDeviceEnvironment>(*executionEnvironment);
}
HwInfoConfigTestWindows::~HwInfoConfigTestWindows() = default;
ProductHelperTestWindows::~ProductHelperTestWindows() = default;
void HwInfoConfigTestWindows::SetUp() {
HwInfoConfigTest::SetUp();
void ProductHelperTestWindows::SetUp() {
ProductHelperTest::SetUp();
osInterface.reset(new OSInterface());
@@ -35,20 +35,20 @@ void HwInfoConfigTestWindows::SetUp() {
outHwInfo = *rootDeviceEnvironment->getHardwareInfo();
}
void HwInfoConfigTestWindows::TearDown() {
HwInfoConfigTest::TearDown();
void ProductHelperTestWindows::TearDown() {
ProductHelperTest::TearDown();
}
template <typename HelperType>
HelperType &HwInfoConfigTestWindows::getHelper() const {
HelperType &ProductHelperTestWindows::getHelper() const {
auto &helper = rootDeviceEnvironment->getHelper<HelperType>();
return helper;
}
template ProductHelper &HwInfoConfigTestWindows::getHelper() const;
template GfxCoreHelper &HwInfoConfigTestWindows::getHelper() const;
template ProductHelper &ProductHelperTestWindows::getHelper() const;
template GfxCoreHelper &ProductHelperTestWindows::getHelper() const;
using ProductHelperTestWindows = HwInfoConfigTestWindows;
using ProductHelperTestWindows = ProductHelperTestWindows;
TEST_F(ProductHelperTestWindows, givenCorrectParametersWhenConfiguringHwInfoThenReturnSuccess) {

View File

@@ -18,15 +18,15 @@ namespace NEO {
struct MockExecutionEnvironment;
struct RootDeviceEnvironment;
struct HwInfoConfigTestWindows : public HwInfoConfigTest {
HwInfoConfigTestWindows();
~HwInfoConfigTestWindows();
struct ProductHelperTestWindows : public ProductHelperTest {
ProductHelperTestWindows();
~ProductHelperTestWindows();
void SetUp() override;
void TearDown() override;
std::unique_ptr<OSInterface> osInterface;
MockHwInfoConfigHw<IGFX_UNKNOWN> hwConfig;
MockProductHelperHw<IGFX_UNKNOWN> hwConfig;
std::unique_ptr<MockExecutionEnvironment> executionEnvironment;
std::unique_ptr<RootDeviceEnvironment> rootDeviceEnvironment;

View File

@@ -116,9 +116,9 @@ TEST_F(WddmTests, GivenDebugFlagDisablesEvictIfNecessarySupportThenFlagIsFalse)
DebugManagerStateRestore restorer{};
DebugManager.flags.PlaformSupportEvictIfNecessaryFlag.set(0);
auto hwInfoConfig = HwInfoConfig::get(rootDeviceEnvironment->getHardwareInfo()->platform.eProductFamily);
auto productHelper = ProductHelper::get(rootDeviceEnvironment->getHardwareInfo()->platform.eProductFamily);
wddm->setPlatformSupportEvictIfNecessaryFlag(*hwInfoConfig);
wddm->setPlatformSupportEvictIfNecessaryFlag(*productHelper);
EXPECT_FALSE(wddm->platformSupportsEvictIfNecessary);
}
@@ -126,25 +126,25 @@ TEST_F(WddmTests, GivenDebugFlagEnablesEvictIfNecessarySupportThenFlagIsTrue) {
DebugManagerStateRestore restorer{};
DebugManager.flags.PlaformSupportEvictIfNecessaryFlag.set(1);
auto hwInfoConfig = HwInfoConfig::get(rootDeviceEnvironment->getHardwareInfo()->platform.eProductFamily);
auto productHelper = ProductHelper::get(rootDeviceEnvironment->getHardwareInfo()->platform.eProductFamily);
wddm->setPlatformSupportEvictIfNecessaryFlag(*hwInfoConfig);
wddm->setPlatformSupportEvictIfNecessaryFlag(*productHelper);
EXPECT_TRUE(wddm->platformSupportsEvictIfNecessary);
}
TEST_F(WddmTests, givenDebugFlagForceEvictOnlyIfNecessaryAllValuesThenForceSettingIsSetCorrectly) {
DebugManagerStateRestore restorer{};
auto hwInfoConfig = HwInfoConfig::get(rootDeviceEnvironment->getHardwareInfo()->platform.eProductFamily);
auto productHelper = ProductHelper::get(rootDeviceEnvironment->getHardwareInfo()->platform.eProductFamily);
wddm->setPlatformSupportEvictIfNecessaryFlag(*hwInfoConfig);
wddm->setPlatformSupportEvictIfNecessaryFlag(*productHelper);
EXPECT_EQ(-1, wddm->forceEvictOnlyIfNecessary);
DebugManager.flags.ForceEvictOnlyIfNecessaryFlag.set(0);
wddm->setPlatformSupportEvictIfNecessaryFlag(*hwInfoConfig);
wddm->setPlatformSupportEvictIfNecessaryFlag(*productHelper);
EXPECT_EQ(0, wddm->forceEvictOnlyIfNecessary);
DebugManager.flags.ForceEvictOnlyIfNecessaryFlag.set(1);
wddm->setPlatformSupportEvictIfNecessaryFlag(*hwInfoConfig);
wddm->setPlatformSupportEvictIfNecessaryFlag(*productHelper);
EXPECT_EQ(1, wddm->forceEvictOnlyIfNecessary);
}