Initialize HwInfo in tests

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2021-06-30 08:56:08 +00:00
committed by Compute-Runtime-Automation
parent 363a92f456
commit a49b45a679
33 changed files with 80 additions and 67 deletions

View File

@ -206,7 +206,7 @@ class GlkHwInfoTests : public ::testing::Test {
typedef ::testing::Types<GLK_1x3x6, GLK_1x2x6> glkTestTypes;
TYPED_TEST_CASE(GlkHwInfoTests, glkTestTypes);
TYPED_TEST(GlkHwInfoTests, WhenGtIsSetupThenGtSystemInfoIsCorrect) {
HardwareInfo hwInfo;
HardwareInfo hwInfo = *defaultHwInfo;
auto executionEnvironment = std::make_unique<ExecutionEnvironment>();
executionEnvironment->prepareRootDeviceEnvironments(1);
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get());

View File

@ -5,15 +5,16 @@
*
*/
#include "test.h"
#include "shared/test/common/helpers/default_hw_info.h"
#include "test.h"
using namespace NEO;
TEST(GlkHwInfoConfig, GivenIncorrectDataWhenConfiguringHwInfoThenErrorIsReturned) {
if (IGFX_GEMINILAKE != productFamily) {
return;
}
HardwareInfo hwInfo;
HardwareInfo hwInfo = *defaultHwInfo;
GT_SYSTEM_INFO &gtSystemInfo = hwInfo.gtSystemInfo;
gtSystemInfo = {0};
@ -34,7 +35,7 @@ GLKTEST_F(GlkHwInfo, givenBoolWhenCallGlkHardwareInfoSetupThenFeatureTableAndWor
0x100030006};
bool boolValue[]{
true, false};
HardwareInfo hwInfo;
HardwareInfo hwInfo = *defaultHwInfo;
GT_SYSTEM_INFO &gtSystemInfo = hwInfo.gtSystemInfo;
FeatureTable &featureTable = hwInfo.featureTable;
WorkaroundTable &workaroundTable = hwInfo.workaroundTable;