Run EnqueueSvmMemFillTest only when SVM is supported

Related-To: NEO-3157

Change-Id: I29d1a0bd99cef4644c31d896ff2dfe96a5fee81c
Signed-off-by: Hoppe, Mateusz <mateusz.hoppe@intel.com>
This commit is contained in:
Hoppe, Mateusz 2019-05-13 11:36:10 +02:00 committed by sys_ocldev
parent e67879ffca
commit 2b09ed85d6
1 changed files with 7 additions and 1 deletions

View File

@ -25,6 +25,10 @@ struct EnqueueSvmMemFillTest : public DeviceFixture,
void SetUp() override {
DeviceFixture::SetUp();
CommandQueueFixture::SetUp(pDevice, 0);
const HardwareInfo &hwInfo = pDevice->getHardwareInfo();
if (!hwInfo.capabilityTable.ftrSvm) {
GTEST_SKIP();
}
patternSize = (size_t)GetParam();
ASSERT_TRUE((0 < patternSize) && (patternSize <= 128));
SVMAllocsManager::SvmAllocationProperties svmProperties;
@ -38,7 +42,9 @@ struct EnqueueSvmMemFillTest : public DeviceFixture,
}
void TearDown() override {
context->getSVMAllocsManager()->freeSVMAlloc(svmPtr);
if (svmPtr) {
context->getSVMAllocsManager()->freeSVMAlloc(svmPtr);
}
CommandQueueFixture::TearDown();
DeviceFixture::TearDown();
}