AubStream update (1/n)

Change-Id: I6579e7af2015493490c5edcc413dcb2e6c804b9f
This commit is contained in:
Milczarek, Slawomir
2019-01-18 21:44:23 +01:00
committed by sys_ocldev
parent 40870f9c7d
commit 21f855b719
16 changed files with 46 additions and 43 deletions

View File

@@ -1,5 +1,5 @@
#
# Copyright (C) 2017-2018 Intel Corporation
# Copyright (C) 2017-2019 Intel Corporation
#
# SPDX-License-Identifier: MIT
#
@@ -79,8 +79,8 @@ if(DEFINED AUB_STREAM_DIR)
add_library (aub_stream_mock_lib OBJECT
${IGDRCL_SOURCE_DIR}/unit_tests/aub_stream_mocks/aub_stream_interface_mock.cpp
)
list(APPEND NEO_IGDRCL_TESTS__TARGET_OBJECTS
$<TARGET_OBJECTS:${AUB_STREAM_ENABLE_LIB_NAME}>
list(APPEND NEO_IGDRCL_TESTS__TARGET_OBJECTS
$<TARGET_OBJECTS:${AUB_STREAM_PROJECT_NAME}_all_hw>
$<TARGET_OBJECTS:aub_stream_mock_lib>
)
else()
@@ -91,6 +91,7 @@ add_executable(igdrcl_tests
${NEO_IGDRCL_TESTS__TARGET_OBJECTS}
${IGDRCL_SRCS_tests_local}
)
hide_subdir(gen_common)
add_subdirectory(gen_common)

View File

@@ -8,7 +8,7 @@
#include "unit_tests/mocks/mock_aub_manager.h"
namespace OCLRT {
AubManager *createAubManager(uint32_t gfxFamily, uint32_t devicesCount, uint64_t memoryBankSize, bool localMemorySupported, const std::string &aubFileName) {
aub_stream::AubManager *createAubManager(uint32_t gfxFamily, uint32_t devicesCount, uint64_t memoryBankSize, bool localMemorySupported, const std::string &aubFileName) {
return new MockAubManager();
}
} // namespace OCLRT

View File

@@ -1,5 +1,5 @@
#
# Copyright (C) 2017-2018 Intel Corporation
# Copyright (C) 2017-2019 Intel Corporation
#
# SPDX-License-Identifier: MIT
#
@@ -19,7 +19,7 @@ list(APPEND IGDRCL_AUB_TESTS__TARGET_OBJECTS
)
if(DEFINED AUB_STREAM_DIR)
list(APPEND IGDRCL_AUB_TESTS__TARGET_OBJECTS $<TARGET_OBJECTS:${AUB_STREAM_ENABLE_LIB_NAME}>)
list(APPEND IGDRCL_AUB_TESTS__TARGET_OBJECTS $<TARGET_OBJECTS:${AUB_STREAM_PROJECT_NAME}_all_hw>)
endif()
add_executable(igdrcl_aub_tests

View File

@@ -710,13 +710,13 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenEngineI
struct InjectMmmioTest : public AubCommandStreamReceiverTests {
void SetUp() override {
AubCommandStreamReceiverTests::SetUp();
injectMmioListCopy = AubDump::injectMMIOList;
injectMmioListCopy = aub_stream::injectMMIOList;
}
void TearDown() override {
AubCommandStreamReceiverTests::TearDown();
AubDump::injectMMIOList = injectMmioListCopy;
AubDump::injectMMIOList.shrink_to_fit();
aub_stream::injectMMIOList = injectMmioListCopy;
aub_stream::injectMMIOList.shrink_to_fit();
}
private:

View File

@@ -8,9 +8,7 @@
#include "third_party/aub_stream/headers/aub_manager.h"
#include "third_party/aub_stream/headers/hardware_context.h"
using namespace AubDump;
struct MockHardwareContext : public HardwareContext {
struct MockHardwareContext : public aub_stream::HardwareContext {
MockHardwareContext(uint32_t deviceIndex, uint32_t engineIndex)
: deviceIndex(deviceIndex), engineIndex(engineIndex){};
~MockHardwareContext() override{};
@@ -35,7 +33,9 @@ struct MockHardwareContext : public HardwareContext {
uint32_t engineIndex = 0;
};
class MockAubManager : public AubManager {
class MockAubManager : public aub_stream::AubManager {
using HardwareContext = aub_stream::HardwareContext;
public:
MockAubManager(){};
~MockAubManager() override {}