mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-10 15:12:56 +08:00
test: Adjust direct submission tests
Disable direct submission at the end of the test for cases where direct submission is enabled in test body. Adjust mock csr to restore os context in cases where context has been replaced in test body. Related-To: NEO-15017 Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
c9ebf91271
commit
f8dc80c7fc
@@ -363,7 +363,7 @@ HWTEST_F(GraphicsAllocationTests, givenGraphicsAllocationWhenAssignedTaskCountAb
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
auto osContext = std::unique_ptr<OsContext>(OsContext::create(nullptr, 0, 0, EngineDescriptorHelper::getDefaultDescriptor()));
|
||||
MockCommandStreamReceiver csr(executionEnvironment, 0, 1);
|
||||
csr.osContext = osContext.get();
|
||||
csr.setupContext(*osContext);
|
||||
MockGraphicsAllocationTaskCount::getTaskCountCalleedTimes = 0;
|
||||
MockGraphicsAllocationTaskCount graphicsAllocation;
|
||||
graphicsAllocation.hostPtrTaskCountAssignment = 1;
|
||||
@@ -376,7 +376,7 @@ HWTEST_F(GraphicsAllocationTests, givenGraphicsAllocationAllocTaskCountHigherTha
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
auto osContext = std::unique_ptr<OsContext>(OsContext::create(nullptr, 0, 0, EngineDescriptorHelper::getDefaultDescriptor()));
|
||||
MockCommandStreamReceiver csr(executionEnvironment, 0, 1);
|
||||
csr.osContext = osContext.get();
|
||||
csr.setupContext(*osContext);
|
||||
MockGraphicsAllocationTaskCount graphicsAllocation;
|
||||
graphicsAllocation.updateTaskCount(10u, 0u);
|
||||
*csr.getTagAddress() = 5;
|
||||
@@ -390,7 +390,7 @@ HWTEST_F(GraphicsAllocationTests, givenGraphicsAllocationAllocTaskCountLowerThan
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
auto osContext = std::unique_ptr<OsContext>(OsContext::create(nullptr, 0, 0, EngineDescriptorHelper::getDefaultDescriptor()));
|
||||
MockCommandStreamReceiver csr(executionEnvironment, 0, 1);
|
||||
csr.osContext = osContext.get();
|
||||
csr.setupContext(*osContext);
|
||||
MockGraphicsAllocationTaskCount graphicsAllocation;
|
||||
graphicsAllocation.updateTaskCount(5u, 0u);
|
||||
csr.taskCount = 10;
|
||||
@@ -404,7 +404,7 @@ HWTEST_F(GraphicsAllocationTests, givenGraphicsAllocationAllocTaskCountNotUsedLo
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
auto osContext = std::unique_ptr<OsContext>(OsContext::create(nullptr, 0, 0, EngineDescriptorHelper::getDefaultDescriptor()));
|
||||
MockCommandStreamReceiver csr(executionEnvironment, 0, 1);
|
||||
csr.osContext = osContext.get();
|
||||
csr.setupContext(*osContext);
|
||||
MockGraphicsAllocationTaskCount graphicsAllocation;
|
||||
graphicsAllocation.updateTaskCount(GraphicsAllocation::objectNotResident, 0u);
|
||||
csr.taskCount = 10;
|
||||
@@ -418,7 +418,7 @@ HWTEST_F(GraphicsAllocationTests, givenGraphicsAllocationAllocTaskCountLowerThan
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
auto osContext = std::unique_ptr<OsContext>(OsContext::create(nullptr, 0, 0, EngineDescriptorHelper::getDefaultDescriptor()));
|
||||
MockCommandStreamReceiver csr(executionEnvironment, 0, 1);
|
||||
csr.osContext = osContext.get();
|
||||
csr.setupContext(*osContext);
|
||||
MockGraphicsAllocationTaskCount graphicsAllocation;
|
||||
graphicsAllocation.updateTaskCount(5u, 0u);
|
||||
csr.taskCount = 10;
|
||||
|
||||
Reference in New Issue
Block a user