Automate installing the API library for testing
Automate installing the API library for testing

To run dEQP tests we previously either had to install the Vulkan Loader
and configure it to find the SwiftShader Vulkan ICD, or manually copy
over the library.

This change introduces the SWIFTSHADER_VULKAN_API_LIBRARY_INSTALL_PATH
environment variable, which can be set to a path where the API library
should be copied to. When used with dEQP it ensures we always test with
the last build, instead of the path provided in the JSON file used by
the Vulkan loader.

Note this is only meant as a convenience for SwiftShader development.
It shouldn't be used as a substitute for installing the ICD for
system-wide usage. The latter should probably use CMAKE_INSTALL_PREFIX
instead, but there are no known use cases yet for installing SwiftShader
as the system-level driver, through the CMake build.

Bug: b/149486511
Change-Id: I5ec9d669967ba0c05a763263605ee0ad5cfd505e
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/53768
Presubmit-Ready: Nicolas Capens <51edc787c30f24c4904e8ffbb5523c3a9f7a451d@google.com>
Tested-by: Nicolas Capens <51edc787c30f24c4904e8ffbb5523c3a9f7a451d@google.com>
Kokoro-Result: kokoro <2ac7b1f3fa578934c95181d4272be0d3bca00121@google.com>
Reviewed-by: Alexis Hétu <1c7141772178a7e80858c3db5052b328076f08f4@google.com>

google/swiftshader,bkaradzic/SwiftShader,bkaradzic/SwiftShader,bkaradzic/SwiftShader,bkaradzic/SwiftShader,google/swiftshader,bkaradzic/SwiftShader,google/swiftshader