diff options
author | Sharlatan Hellseher <sharlatanus@gmail.com> | 2024-09-03 09:44:29 +0100 |
---|---|---|
committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2024-09-03 15:43:09 +0100 |
commit | b60f731c68548e752195c7f9405756ca9f3e6ed5 (patch) | |
tree | 0811fffeacd1f6fcb364b5b28c309a30c570ba6a /gnu/packages | |
parent | 5e2d4317d16682db67fa5cdeabe24da572474778 (diff) | |
download | guix-b60f731c68548e752195c7f9405756ca9f3e6ed5.tar.gz guix-b60f731c68548e752195c7f9405756ca9f3e6ed5.zip |
gnu: go-github-com-zalando-go-keyring: Enable tests.
* gnu/packages/golang.scm (go-github-com-zalando-go-keyring)
[arguments]: <#:phases>: Add 'disable-failing-tests phase, use custom 'check.
[propagated-inputs]: Remove dbus.
[native-inputs]: Add dbus.
Change-Id: I06ba340ef936fef006b7b804688b2ca2863d00a2
Diffstat (limited to 'gnu/packages')
-rw-r--r-- | gnu/packages/golang.scm | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index 773529425e..95b5480406 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -6771,10 +6771,28 @@ formatting information, rather than the current locale name.") "1p6qlsbj9rmqiwz9ly4c7jmifcx8m45xjhsbdwdvw2jzw5jc2ch1")))) (build-system go-build-system) (arguments - `(#:tests? #f ;XXX: Fix dbus tests - #:import-path "github.com/zalando/go-keyring")) + (list + #:import-path "github.com/zalando/go-keyring" + #: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 DBus instance. + (("TestDelete") "OffTestDelete") + (("TestGet") "OffTestGet") + (("TestSet") "OffTestSet"))))) + (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" "-v" "./...")))))))) + (native-inputs + (list dbus)) (propagated-inputs - (list go-github-com-godbus-dbus-v5 dbus)) + (list go-github-com-godbus-dbus-v5)) (home-page "https://github.com/zalando/go-keyring/") (synopsis "Library for working with system keyring") (description "@code{go-keyring} is a library for setting, getting and |