Enable running vk-unittests from any directory
By setting LD_LIBRARY_PATH to the directory containing
libvk_swiftshader.so, this change enables running vk-unittests
from any working directory.
Bug: b/128618202
Change-Id: Ib10e4742b90a41d1ef9867b59ce2ccb7394e2b02
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/36811
Presubmit-Ready: Nicolas Capens <nicolascapens@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
diff --git a/tests/VulkanUnitTests/Driver.cpp b/tests/VulkanUnitTests/Driver.cpp
index 047e394..0e795e8 100644
--- a/tests/VulkanUnitTests/Driver.cpp
+++ b/tests/VulkanUnitTests/Driver.cpp
@@ -86,7 +86,8 @@
#elif OS_LINUX
return load("./build/Linux/libvk_swiftshader.so") ||
load("swiftshader/libvk_swiftshader.so") ||
- load("./libvk_swiftshader.so");
+ load("./libvk_swiftshader.so") ||
+ load("libvk_swiftshader.so");
#elif OS_ANDROID || OS_FUCHSIA
return load("libvk_swiftshader.so");
#else