diff options
author | Marius Bakke <mbakke@fastmail.com> | 2020-05-22 16:57:46 +0200 |
---|---|---|
committer | Marius Bakke <marius@gnu.org> | 2020-05-26 22:36:07 +0200 |
commit | 6a8fca140d69141c91ea167e66d4daaad611261c (patch) | |
tree | 5634465208e218f8d560c0b153ab4f774ce32ada /gnu/packages/vulkan.scm | |
parent | cc8550ef120200b4bd27000b3deed41febc64c4c (diff) | |
download | guix-6a8fca140d69141c91ea167e66d4daaad611261c.tar.gz |
gnu: vulkan-loader: Enable tests.
* gnu/packages/vulkan.scm (vulkan-loader)[arguments]: Remove #:tests? and #:configure-flags. Add #:phases to unpack googletest and disable tests that cannot run in the build container. [native-inputs]: Add (PACKAGE-SOURCE GOOGLETEST).
Diffstat (limited to 'gnu/packages/vulkan.scm')
-rw-r--r-- | gnu/packages/vulkan.scm | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm index 30a89499fc..22391316c0 100644 --- a/gnu/packages/vulkan.scm +++ b/gnu/packages/vulkan.scm @@ -175,16 +175,29 @@ interpretation of the specifications for these languages.") "0rhyz0qgp0i7pcx6wlvgwy7j33d4cs0xx39f0b6igpfk0vk70r1w")))) (build-system cmake-build-system) (arguments - `(#:tests? #f ;FIXME: 23/39 tests fail. Try "tests/run_all_tests.sh". - #:configure-flags (list - "-DBUILD_TESTS=OFF" ; FIXME: Needs 'googletest' submodule. - (string-append "-DCMAKE_INSTALL_LIBDIR=" - (assoc-ref %outputs "out") "/lib")))) - (native-inputs `(("libxrandr" ,libxrandr) - ("pkg-config" ,pkg-config) - ("python" ,python) - ("vulkan-headers" ,vulkan-headers) - ("wayland" ,wayland))) + `(#:phases (modify-phases %standard-phases + (add-after 'unpack 'unpack-googletest + (lambda* (#:key inputs #:allow-other-keys) + (let ((gtest (assoc-ref inputs "googletest:source"))) + (when gtest + (copy-recursively gtest "external/googletest")) + #t))) + (add-after 'unpack 'disable-loader-tests + (lambda _ + ;; Many tests require a Vulkan driver. Skip those. + (substitute* "tests/loader_validation_tests.cpp" + ((".*= vkCreateInstance.*" all) + (string-append "GTEST_SKIP();\n" all)) + (("TEST_F.*InstanceExtensionEnumerated.*" all) + (string-append all "\nGTEST_SKIP();\n"))) + #t))))) + (native-inputs + `(("googletest:source" ,(package-source googletest)) + ("libxrandr" ,libxrandr) + ("pkg-config" ,pkg-config) + ("python" ,python) + ("vulkan-headers" ,vulkan-headers) + ("wayland" ,wayland))) (home-page "https://github.com/KhronosGroup/Vulkan-Loader") (synopsis "Khronos official ICD loader and validation layers for Vulkan") |