Files
compute-runtime/shared/test/common/fixtures/mock_aub_center_fixture.cpp
Mateusz Jablonski cb2b572e94 feature: add support for null aub mode
In this mode AUB csr will be created, however, no aub file will be created

Related-To: NEO-11097
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2024-04-09 16:59:42 +02:00

35 lines
1.4 KiB
C++

/*
* Copyright (C) 2022-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/test/common/fixtures/mock_aub_center_fixture.h"
#include "shared/source/execution_environment/root_device_environment.h"
#include "shared/test/common/helpers/default_hw_info.h"
#include "shared/test/common/mocks/mock_aub_center.h"
#include "shared/test/common/mocks/mock_aub_manager.h"
#include "shared/test/common/tests_configuration.h"
namespace NEO {
MockAubCenterFixture::MockAubCenterFixture(CommandStreamReceiverType commandStreamReceiverType) : commandStreamReceiverType(commandStreamReceiverType){};
void MockAubCenterFixture::setMockAubCenter(RootDeviceEnvironment &rootDeviceEnvironment) {
setMockAubCenter(rootDeviceEnvironment, CommandStreamReceiverType::aub);
}
void MockAubCenterFixture::setMockAubCenter(RootDeviceEnvironment &rootDeviceEnvironment, CommandStreamReceiverType commandStreamReceiverType) {
if (testMode != TestMode::aubTests && testMode != TestMode::aubTestsWithTbx) {
rootDeviceEnvironment.initGmm();
auto mockAubCenter = std::make_unique<MockAubCenter>(rootDeviceEnvironment, false, "", commandStreamReceiverType);
if (!mockAubCenter->aubManager) {
mockAubCenter->aubManager = std::make_unique<MockAubManager>();
}
rootDeviceEnvironment.aubCenter.reset(mockAubCenter.release());
}
}
} // namespace NEO