mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Initialize HwInfo in tests
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
363a92f456
commit
a49b45a679
@ -156,7 +156,7 @@ class BdwHwInfoTests : public ::testing::Test {
|
||||
typedef ::testing::Types<BDW_1x2x6, BDW_1x3x6, BDW_1x3x8, BDW_2x3x8> bdwTestTypes;
|
||||
TYPED_TEST_CASE(BdwHwInfoTests, bdwTestTypes);
|
||||
TYPED_TEST(BdwHwInfoTests, WhenGtIsSetupThenGtSystemInfoIsCorrect) {
|
||||
HardwareInfo hwInfo;
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
auto executionEnvironment = std::make_unique<ExecutionEnvironment>();
|
||||
executionEnvironment->prepareRootDeviceEnvironments(1);
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get());
|
||||
|
@ -5,15 +5,16 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "test.h"
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
|
||||
#include "test.h"
|
||||
using namespace NEO;
|
||||
|
||||
TEST(BdwHwInfoConfig, givenInvalidSystemInfoWhenSettingHardwareInfoThenExpectThrow) {
|
||||
if (IGFX_BROADWELL != productFamily) {
|
||||
return;
|
||||
}
|
||||
HardwareInfo hwInfo;
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo;
|
||||
|
||||
uint64_t config = 0xdeadbeef;
|
||||
@ -35,7 +36,7 @@ BDWTEST_F(BdwHwInfo, givenBoolWhenCallBdwHardwareInfoSetupThenFeatureTableAndWor
|
||||
0x100030006};
|
||||
bool boolValue[]{
|
||||
true, false};
|
||||
HardwareInfo hwInfo;
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo;
|
||||
FeatureTable &featureTable = hwInfo.featureTable;
|
||||
WorkaroundTable &workaroundTable = hwInfo.workaroundTable;
|
||||
@ -68,7 +69,7 @@ BDWTEST_F(BdwHwInfo, givenBoolWhenCallBdwHardwareInfoSetupThenFeatureTableAndWor
|
||||
}
|
||||
|
||||
BDWTEST_F(BdwHwInfo, givenHwInfoConfigStringThenAfterSetupResultingVmeIsDisabled) {
|
||||
HardwareInfo hwInfo;
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
|
||||
uint64_t config = 0x0;
|
||||
hardwareInfoSetup[productFamily](&hwInfo, false, config);
|
||||
|
Reference in New Issue
Block a user