mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
store: 'GUIX_DAEMON_SOCKET' can now be a URI.
* guix/store.scm (%daemon-socket-file): Rename to... (%daemon-socket-uri): ... this. (connect-to-daemon): New procedure. (open-connection): Rename 'file' to 'uri'. Use 'connect-to-daemon' instead of 'open-unix-domain-socket'. * guix/tests.scm (open-connection-for-tests): Rename 'file' to 'uri'. * tests/guix-build.sh: Add tests. * tests/store.scm ("open-connection with file:// URI"): New tests.
This commit is contained in:
parent
031e6087c4
commit
1397b422e2
5 changed files with 70 additions and 14 deletions
|
@ -1,5 +1,5 @@
|
|||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
|
@ -56,13 +56,13 @@
|
|||
(or (and=> (getenv "GUIX_BINARY_SUBSTITUTE_URL") list)
|
||||
'())))
|
||||
|
||||
(define* (open-connection-for-tests #:optional (file (%daemon-socket-file)))
|
||||
(define* (open-connection-for-tests #:optional (uri (%daemon-socket-uri)))
|
||||
"Open a connection to the build daemon for tests purposes and return it."
|
||||
(guard (c ((nix-error? c)
|
||||
(format (current-error-port)
|
||||
"warning: build daemon error: ~s~%" c)
|
||||
#f))
|
||||
(let ((store (open-connection file)))
|
||||
(let ((store (open-connection uri)))
|
||||
;; Make sure we build everything by ourselves.
|
||||
(set-build-options store
|
||||
#:use-substitutes? #f
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue