Use CMake test interfaces, fix crash on exit in Vulkan_unittests
Bug: 171711491
We used to have a crash on exit in the standalone build's
Vulkan_unittests that involved eglReleaseThread, mesa, and nvidia GLX.
This is actually due to not deleting the global Vk emulation state.
Change-Id: I7cb44a972d67a2127fd05ed3d9cbbb5fd4d45cca
diff --git a/stream-servers/vulkan/VkCommonOperations.cpp b/stream-servers/vulkan/VkCommonOperations.cpp
index 48269db..4505747 100644
--- a/stream-servers/vulkan/VkCommonOperations.cpp
+++ b/stream-servers/vulkan/VkCommonOperations.cpp
@@ -1021,6 +1021,10 @@
sVkEmulation->ivk->vkDestroyDevice(sVkEmulation->device, nullptr);
sVkEmulation->gvk->vkDestroyInstance(sVkEmulation->instance, nullptr);
+
+ sVkEmulation->live = false;
+ delete sVkEmulation;
+ sVkEmulation = nullptr;
}
// Precondition: sVkEmulation has valid device support info