From: Sarah Morgensen <iskarian@mgsn.dev>
To: 50035@debbugs.gnu.org
Subject: [bug#50035] [PATCH 3/3] gnu: go-github-com-godbus-dbus-v5: Fix and enable tests.
Date: Thu, 12 Aug 2021 20:12:59 -0700 [thread overview]
Message-ID: <e9b33f991a3ce9a76b7e977783f34a756deb5efa.1628823527.git.iskarian@mgsn.dev> (raw)
In-Reply-To: <5d1fcc896c0f6f63e1664f0eadabf73f0965110b.1628823527.git.iskarian@mgsn.dev>
Disable system D-Bus tests. Fix session D-Bus tests by running them
within our own session.
* gnu/packages/golang.scm (go-github-com-godbus-dbus-v5)[source]: Add
snippet to disable system D-Bus tests.
[arguments]: Enable tests, override 'check phase to run tests within a
dbus session.
---
gnu/packages/golang.scm | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 359c5a987d..28ead635f2 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7431,13 +7431,27 @@ and @code{ioutil} packages that is easy to test.")
(url "https://github.com/godbus/dbus")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; Disable tests which require a system D-Bus instance.
+ (substitute* "conn_test.go"
+ (("func TestSystemBus")
+ "func DisabledTestSystemBus")
+ (("func TestConnectSystemBus")
+ "func DisabledTestConnectSystemBus"))))
(sha256
(base32
"0znax8kskb5gmp5fj75w56bc9p7b22wrdswzlh4d04sprlc471yi"))))
(build-system go-build-system)
(arguments
- `(#:tests? #f ;no /var/run/dbus/system_bus_socket
- #:import-path "github.com/godbus/dbus"))
+ `(#:import-path "github.com/godbus/dbus"
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? import-path #:allow-other-keys)
+ (when tests?
+ (invoke "dbus-run-session" "--" "go" "test" import-path)))))))
(native-inputs
`(("dbus" ,dbus))) ;dbus-launch
(home-page "https://github.com/godbus/dbus/")
--
2.31.1
next prev parent reply other threads:[~2021-08-13 3:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-13 3:06 [bug#50035] [PATCH 1/3] gnu: go-github-com-godbus-dbus: Update to 5.0.4 Sarah Morgensen
2021-08-13 3:12 ` [bug#50035] [PATCH 2/3] gnu: Rename go-github-com-godbus-dbus to go-github-com-godbus-dbus-v5 Sarah Morgensen
2021-08-13 3:12 ` Sarah Morgensen [this message]
2021-08-13 19:12 ` [bug#50035] [PATCH 1/3] gnu: go-github-com-godbus-dbus: Update to 5.0.4 John Kehayias via Guix-patches via
2022-02-04 20:06 ` John Kehayias via Guix-patches via
2023-10-12 17:53 ` [bug#50035] bug#64222: [PATCH 0/4] Add senpai IRC client John Kehayias via Guix-patches via
2023-10-13 4:52 ` [bug#64222] gnu: go-github-com-godbus-dbus-v5 guix-patches--- via
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e9b33f991a3ce9a76b7e977783f34a756deb5efa.1628823527.git.iskarian@mgsn.dev \
--to=iskarian@mgsn.dev \
--cc=50035@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.