ULT build: fix building unit tests when aubstream is not available

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski 2022-12-02 12:54:10 +01:00 committed by Compute-Runtime-Automation
parent eca8333d4e
commit a2aad265bf
1 changed files with 10 additions and 8 deletions

View File

@ -6,13 +6,12 @@
*/
#include "shared/source/debug_settings/debug_settings_manager.h"
#include "shared/source/gmm_helper/gmm_helper.h"
#include "shared/source/helpers/hw_info.h"
#include "shared/source/helpers/options.h"
#include "shared/test/common/helpers/debug_manager_state_restore.h"
#include "shared/test/common/helpers/default_hw_info.h"
#include "shared/test/common/helpers/variable_backup.h"
#include "shared/test/common/mocks/mock_aub_center.h"
#include "shared/test/common/mocks/mock_execution_environment.h"
#include "aubstream/aubstream.h"
#include "gtest/gtest.h"
@ -31,9 +30,10 @@ TEST(AubCenter, GivenUseAubStreamAndTbxServerIpDebugVariableSetWhenAubCenterIsCr
DebugManager.flags.TbxServer.set("10.10.10.10");
VariableBackup<std::string> backup(&aub_stream_stubs::tbxServerIp);
GmmHelper gmmHelper(nullptr, defaultHwInfo.get());
MockExecutionEnvironment executionEnvironment{};
auto &rootDeviceEnvironment = *executionEnvironment.rootDeviceEnvironments[0];
MockAubCenter aubCenter(defaultHwInfo.get(), gmmHelper, false, "", CommandStreamReceiverType::CSR_TBX);
MockAubCenter aubCenter(rootDeviceEnvironment, false, "", CommandStreamReceiverType::CSR_TBX);
EXPECT_STREQ("10.10.10.10", aub_stream_stubs::tbxServerIp.c_str());
}
@ -48,9 +48,10 @@ TEST(AubCenter, GivenUseAubStreamAndTbxServerPortDebugVariableSetWhenAubCenterIs
uint16_t port = 1234u;
EXPECT_NE(port, aub_stream_stubs::tbxServerPort);
GmmHelper gmmHelper(nullptr, defaultHwInfo.get());
MockExecutionEnvironment executionEnvironment{};
auto &rootDeviceEnvironment = *executionEnvironment.rootDeviceEnvironments[0];
MockAubCenter aubCenter(defaultHwInfo.get(), gmmHelper, false, "", CommandStreamReceiverType::CSR_TBX);
MockAubCenter aubCenter(rootDeviceEnvironment, false, "", CommandStreamReceiverType::CSR_TBX);
EXPECT_EQ(port, aub_stream_stubs::tbxServerPort);
}
@ -63,8 +64,9 @@ TEST(AubCenter, GivenUseAubStreamAndTbxFrontdoorModeDebugVariableSetWhenAubCente
EXPECT_FALSE(aub_stream_stubs::tbxFrontdoorMode);
GmmHelper gmmHelper(nullptr, defaultHwInfo.get());
MockExecutionEnvironment executionEnvironment{};
auto &rootDeviceEnvironment = *executionEnvironment.rootDeviceEnvironments[0];
MockAubCenter aubCenter(defaultHwInfo.get(), gmmHelper, false, "", CommandStreamReceiverType::CSR_TBX);
MockAubCenter aubCenter(rootDeviceEnvironment, false, "", CommandStreamReceiverType::CSR_TBX);
EXPECT_TRUE(aub_stream_stubs::tbxFrontdoorMode);
}