mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: go-github-com-godbus-dbus: Enable tests.
* gnu/packages/golang.scm (go-github-com-godbus-dbus): Enable tests. [arguments] <#:phases>: Add 'disable-failing-tests phase. Override 'check phase to run tests within a dbus session. Change-Id: Ib27d33363d4d7071e91380588413ae035ae9609f Co-authored-by: Sharlatan Hellseher <sharlatanus@gmail.com> Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
This commit is contained in:
parent
d4da8af4e4
commit
c293aa1d6f
1 changed files with 16 additions and 2 deletions
|
@ -6666,8 +6666,22 @@ RFC-5802 and RFC-7677.")
|
|||
"0h0cl1r136g0kxbw3i7ggb9mhavpi1yr7d7312iwhkxm93dxkphg"))))
|
||||
(build-system go-build-system)
|
||||
(arguments
|
||||
`(#:tests? #f ;no /var/run/dbus/system_bus_socket
|
||||
#:import-path "github.com/godbus/dbus"))
|
||||
(list
|
||||
#:import-path "github.com/godbus/dbus"
|
||||
#: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 which require a system D-Bus instance.
|
||||
(("TestSystemBus") "OffTestSystemBus")
|
||||
(("TestConnectSystemBus") "OffTestConnectSystemBus")))))
|
||||
(replace 'check
|
||||
(lambda* (#:key tests? import-path #:allow-other-keys)
|
||||
(when tests?
|
||||
(with-directory-excursion (string-append "src/" import-path)
|
||||
(invoke "dbus-run-session" "--" "go" "test" "./..."))))))))
|
||||
(native-inputs
|
||||
(list dbus)) ;dbus-launch
|
||||
(home-page "https://github.com/godbus/dbus/")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue