Add REQUIRE_SVM_OR_SKIP helper macro for tests

Change-Id: I07fbde14a0d3be801087561b8460b15b857c3f2e
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
Filip Hazubski
2020-03-24 12:17:13 +01:00
committed by sys_ocldev
parent 8bb4be1689
commit 214585eb1b
19 changed files with 151 additions and 64 deletions

View File

@ -11,6 +11,7 @@
#include "opencl/source/event/user_event.h"
#include "opencl/test/unit_test/context/driver_diagnostics_tests.h"
#include "opencl/test/unit_test/fixtures/buffer_fixture.h"
#include "opencl/test/unit_test/test_macros/test_checks.h"
using namespace NEO;
@ -662,9 +663,7 @@ TEST_P(PerformanceHintEnqueueMapTest, GivenZeroCopyFlagWhenEnqueueUnmapIsCalling
}
TEST_F(PerformanceHintEnqueueTest, GivenSVMPointerWhenEnqueueSVMMapIsCallingThenContextProvidesProperHint) {
if (!pPlatform->getClDevice(0)->getHardwareInfo().capabilityTable.ftrSvm) {
GTEST_SKIP();
}
REQUIRE_SVM_OR_SKIP(pPlatform->getClDevice(0));
void *svmPtr = context->getSVMAllocsManager()->createSVMAlloc(0, 256, {});
pCmdQ->enqueueSVMMap(CL_FALSE, 0, svmPtr, 256, 0, nullptr, nullptr, false);