From a6e482aa88f91658f13f2745dd242487db124aec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zef=20Kucia?= Date: Mon, 1 Apr 2019 11:19:47 +0200 Subject: [PATCH] tests: Skip some tests when VKD3D_VULKAN_DEVICE is set. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Allows running tests with VKD3D_VULKAN_DEVICE. Signed-off-by: Józef Kucia Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- tests/vkd3d_api.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/tests/vkd3d_api.c b/tests/vkd3d_api.c index 89b388fd..0bc48177 100644 --- a/tests/vkd3d_api.c +++ b/tests/vkd3d_api.c @@ -559,18 +559,25 @@ static void test_physical_device(void) vr = vkEnumeratePhysicalDevices(vk_instance, &count, vk_physical_devices); ok(vr == VK_SUCCESS, "Got unexpected VkResult %d.\n", vr); - for (i = 0; i < count; ++i) + if (!getenv("VKD3D_VULKAN_DEVICE")) { - trace("Creating device for Vulkan physical device %p.\n", vk_physical_devices[i]); + for (i = 0; i < count; ++i) + { + trace("Creating device for Vulkan physical device %p.\n", vk_physical_devices[i]); - create_info.vk_physical_device = vk_physical_devices[i]; - hr = vkd3d_create_device(&create_info, &IID_ID3D12Device, (void **)&device); - ok(hr == S_OK, "Failed to create device, hr %#x.\n", hr); - vk_physical_device = vkd3d_get_vk_physical_device(device); - ok(vk_physical_device == vk_physical_devices[i], - "Got unexpected Vulkan physical device %p.\n", vk_physical_device); - refcount = ID3D12Device_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); + create_info.vk_physical_device = vk_physical_devices[i]; + hr = vkd3d_create_device(&create_info, &IID_ID3D12Device, (void **)&device); + ok(hr == S_OK, "Failed to create device, hr %#x.\n", hr); + vk_physical_device = vkd3d_get_vk_physical_device(device); + ok(vk_physical_device == vk_physical_devices[i], + "Got unexpected Vulkan physical device %p.\n", vk_physical_device); + refcount = ID3D12Device_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); + } + } + else + { + skip("VKD3D_VULKAN_DEVICE is set.\n"); } free(vk_physical_devices);