Skip to content

Commit bf33724

Browse files
committed
[CTS] skip image tests if images are not supported
1 parent 0b04127 commit bf33724

File tree

5 files changed

+11
-22
lines changed

5 files changed

+11
-22
lines changed

test/conformance/memory/memory_adapter_level_zero_v2.match

Lines changed: 0 additions & 15 deletions
This file was deleted.

test/conformance/memory/memory_adapter_native_cpu.match

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ urMemBufferPartitionTest.InvalidValueCreateType/*
44
urMemBufferPartitionTest.InvalidValueBufferCreateInfoOutOfBounds/*
55
urMemGetInfoTestWithParam.Success/*
66
urMemGetInfoTest.InvalidSizeSmall/*
7-
urMemImageCreateTestWithImageFormatParam.Success/*
87
urMemReleaseTest.Success/*
98
urMemReleaseTest.CheckReferenceCount/*
109
urMemRetainTest.Success/*

test/conformance/memory/urMemImageCreateWithImageFormatParam.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,10 @@ TEST_P(urMemImageCreateTestWithImageFormatParam, Success) {
110110
}
111111
}
112112

113+
if (res == UR_RESULT_ERROR_UNSUPPORTED_FEATURE) {
114+
GTEST_SKIP() << "urMemImageCreate not supported";
115+
}
116+
113117
if (!is_primary_image_format &&
114118
res == UR_RESULT_ERROR_UNSUPPORTED_IMAGE_FORMAT) {
115119
GTEST_SKIP();

test/conformance/memory/urMemImageCreateWithNativeHandle.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ UUR_INSTANTIATE_DEVICE_TEST_SUITE_P(urMemImageCreateWithNativeHandleTest);
1010

1111
TEST_P(urMemImageCreateWithNativeHandleTest, Success) {
1212
ur_native_handle_t native_handle = 0;
13-
ASSERT_SUCCESS(urMemGetNativeHandle(image, device, &native_handle));
13+
UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(urMemGetNativeHandle(image, device, &native_handle));
1414

1515
ur_mem_handle_t mem = nullptr;
1616
ASSERT_SUCCESS(urMemImageCreateWithNativeHandle(

test/conformance/testing/include/uur/fixtures.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,9 @@ struct urMemImageTest : urContextTest {
209209
if (!imageSupported) {
210210
GTEST_SKIP();
211211
}
212-
ASSERT_SUCCESS(urMemImageCreate(context, UR_MEM_FLAG_READ_WRITE,
213-
&image_format, &image_desc, nullptr,
214-
&image));
212+
UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(
213+
urMemImageCreate(context, UR_MEM_FLAG_READ_WRITE, &image_format,
214+
&image_desc, nullptr, &image));
215215
}
216216

217217
void TearDown() override {
@@ -323,8 +323,9 @@ template <class T> struct urMemImageTestWithParam : urContextTestWithParam<T> {
323323
if (!imageSupported) {
324324
GTEST_SKIP();
325325
}
326-
ASSERT_SUCCESS(urMemImageCreate(this->context, UR_MEM_FLAG_READ_WRITE,
327-
&format, &desc, nullptr, &image));
326+
UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(
327+
urMemImageCreate(this->context, UR_MEM_FLAG_READ_WRITE, &format,
328+
&desc, nullptr, &image));
328329
ASSERT_NE(nullptr, image);
329330
}
330331

0 commit comments

Comments
 (0)