mirror of
https://github.com/intel/compute-runtime.git
synced 2025-11-10 05:49:51 +08:00
Improve PrintDeviceAndEngineIdOnSubmission flag
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
96d14967ac
commit
7979dcb757
@@ -199,8 +199,13 @@ HWTEST_TEMPLATED_F(DrmCommandStreamTest, givenPrintIndicesEnabledWhenFlushThenPr
|
||||
|
||||
::testing::internal::CaptureStdout();
|
||||
csr->flush(batchBuffer, csr->getResidencyAllocations());
|
||||
const std::string engineType = EngineHelpers::engineTypeToString(csr->getOsContext().getEngineType());
|
||||
const std::string engineUsage = EngineHelpers::engineUsageToString(csr->getOsContext().getEngineUsage());
|
||||
std::ostringstream expectedValue;
|
||||
expectedValue << "Submission to RootDevice Index: " << csr->getRootDeviceIndex() << ", Sub-Devices Mask: " << csr->getOsContext().getDeviceBitfield().to_ulong() << ", EngineId: " << csr->getOsContext().getEngineType() << "\n";
|
||||
expectedValue << "Submission to RootDevice Index: " << csr->getRootDeviceIndex()
|
||||
<< ", Sub-Devices Mask: " << csr->getOsContext().getDeviceBitfield().to_ulong()
|
||||
<< ", EngineId: " << csr->getOsContext().getEngineType()
|
||||
<< " (" << engineType << ", " << engineUsage << ")\n";
|
||||
EXPECT_THAT(::testing::internal::GetCapturedStdout(), ::testing::HasSubstr(expectedValue.str()));
|
||||
}
|
||||
|
||||
|
||||
@@ -236,8 +236,14 @@ TEST_F(WddmCommandStreamTest, givenPrintIndicesEnabledWhenFlushThenPrintIndices)
|
||||
BatchBuffer batchBuffer{cs.getGraphicsAllocation(), 0, 0, nullptr, false, false, QueueThrottle::MEDIUM, QueueSliceCount::defaultSliceCount, cs.getUsed(), &cs, nullptr, false};
|
||||
::testing::internal::CaptureStdout();
|
||||
csr->flush(batchBuffer, csr->getResidencyAllocations());
|
||||
|
||||
const std::string engineType = EngineHelpers::engineTypeToString(csr->getOsContext().getEngineType());
|
||||
const std::string engineUsage = EngineHelpers::engineUsageToString(csr->getOsContext().getEngineUsage());
|
||||
std::ostringstream expectedValue;
|
||||
expectedValue << "Submission to RootDevice Index: " << csr->getRootDeviceIndex() << ", Sub-Devices Mask: " << csr->getOsContext().getDeviceBitfield().to_ulong() << ", EngineId: " << csr->getOsContext().getEngineType() << "\n";
|
||||
expectedValue << "Submission to RootDevice Index: " << csr->getRootDeviceIndex()
|
||||
<< ", Sub-Devices Mask: " << csr->getOsContext().getDeviceBitfield().to_ulong()
|
||||
<< ", EngineId: " << csr->getOsContext().getEngineType()
|
||||
<< " (" << engineType << ", " << engineUsage << ")\n";
|
||||
EXPECT_STREQ(::testing::internal::GetCapturedStdout().c_str(), expectedValue.str().c_str());
|
||||
|
||||
memoryManager->freeGraphicsMemory(commandBuffer);
|
||||
|
||||
Reference in New Issue
Block a user