gnu: go-netlink: Enable tests.

* gnu/packages/linux.scm (go-netlink): Enable most of the tests.
[arguments]: <#:phases>: Add 'disable-failing-tests phase.

Change-Id: Ie4fafbc922e98a7eb474f91317995b6502a99108
This commit is contained in:
Sharlatan Hellseher 2024-07-25 21:56:50 +01:00
parent c961057bf6
commit a80cec86d5
No known key found for this signature in database
GPG key ID: 76D727BFF62CD2B5

View file

@ -9305,8 +9305,16 @@ management tools in userspace.")
(build-system go-build-system) (build-system go-build-system)
(arguments (arguments
(list (list
#:tests? #f ; Tests depend on specific kernel modules. #:import-path "github.com/vishvananda/netlink"
#:import-path "github.com/vishvananda/netlink")) #:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'disable-failing-tests
(lambda* (#:key tests? unpack-path #:allow-other-keys)
(with-directory-excursion (string-append "src/" unpack-path)
(substitute* (find-files "." "\\_test.go$")
;; Disable tests requiring root access.
(("TestNetNsIdByFd") "OffTestNetNsIdByFd")
(("TestNetNsIdByPid") "OffTestNetNsIdByPid"))))))))
(propagated-inputs (propagated-inputs
(list go-golang-org-x-sys go-github-com-vishvananda-netns)) (list go-golang-org-x-sys go-github-com-vishvananda-netns))
(home-page "https://github.com/vishvananda/netlink") (home-page "https://github.com/vishvananda/netlink")