fix: Taking into account variable ReturnSubDevicesAsApiDevices

Taking into account variable ReturnSubDevicesAsApiDevices
during Retain and Release Device

Related-To: NEO-8161

Signed-off-by: Andrzej Koska <andrzej.koska@intel.com>
This commit is contained in:
Andrzej Koska
2023-08-11 11:00:22 +00:00
committed by Compute-Runtime-Automation
parent 81d037f59b
commit 0a3b135673
5 changed files with 73 additions and 2 deletions

View File

@@ -40,6 +40,18 @@ TEST(ExecutionEnvironment, givenDefaultConstructorWhenItIsCalledThenExecutionEnv
EXPECT_EQ(0, environment.getRefApiCount());
}
TEST(ExecutionEnvironment, givenDefaultConstructorWhenItIsCalledThenSubDevicesAsDevicesIsFalse) {
ExecutionEnvironment environment;
EXPECT_FALSE(environment.isExposingSubDevicesAsDevices());
}
TEST(ExecutionEnvironment, givenDefaultConstructoWhenItIsCalledAndReturnSubDevicesAsApiDevicesIsSetThenSubDevicesAsDevicesIsTrue) {
DebugManagerStateRestore dbgRestore;
DebugManager.flags.ReturnSubDevicesAsApiDevices.set(1);
ExecutionEnvironment environment;
EXPECT_TRUE(environment.isExposingSubDevicesAsDevices());
}
TEST(ExecutionEnvironment, WhenCreatingDevicesThenThoseDevicesAddRefcountsToExecutionEnvironment) {
auto executionEnvironment = new ExecutionEnvironment();