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).
This commit is contained in:
parent
cc8550ef12
commit
6a8fca140d
1 changed files with 23 additions and 10 deletions
|
@ -175,12 +175,25 @@ interpretation of the specifications for these languages.")
|
||||||
"0rhyz0qgp0i7pcx6wlvgwy7j33d4cs0xx39f0b6igpfk0vk70r1w"))))
|
"0rhyz0qgp0i7pcx6wlvgwy7j33d4cs0xx39f0b6igpfk0vk70r1w"))))
|
||||||
(build-system cmake-build-system)
|
(build-system cmake-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:tests? #f ;FIXME: 23/39 tests fail. Try "tests/run_all_tests.sh".
|
`(#:phases (modify-phases %standard-phases
|
||||||
#:configure-flags (list
|
(add-after 'unpack 'unpack-googletest
|
||||||
"-DBUILD_TESTS=OFF" ; FIXME: Needs 'googletest' submodule.
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(string-append "-DCMAKE_INSTALL_LIBDIR="
|
(let ((gtest (assoc-ref inputs "googletest:source")))
|
||||||
(assoc-ref %outputs "out") "/lib"))))
|
(when gtest
|
||||||
(native-inputs `(("libxrandr" ,libxrandr)
|
(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)
|
("pkg-config" ,pkg-config)
|
||||||
("python" ,python)
|
("python" ,python)
|
||||||
("vulkan-headers" ,vulkan-headers)
|
("vulkan-headers" ,vulkan-headers)
|
||||||
|
|
Reference in a new issue