mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-06 21:20:33 +02:00
daemon: Client settings no longer override daemon settings.
Fixes <http://bugs.gnu.org/20217>. * nix/libstore/worker-protocol.hh (PROTOCOL_VERSION): Bump to 0x161. * nix/nix-daemon/nix-daemon.cc (performOp): "build-max-jobs", "build-max-silent-time", and "build-cores" are no longer read upfront; instead, read them from the key/value list at the end. * nix/nix-daemon/guix-daemon.cc (main): Explicitly set 'settings.maxBuildJobs'. * guix/store.scm (%protocol-version): Bump to #x161. (set-build-options): #:max-build-jobs, #:max-silent-time, and #:build-cores now default to #f. Adjust handshake to new protocol. * tests/store.scm ("build-cores"): New test. * tests/guix-daemon.sh: Add test for default "build-cores" value.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# GNU Guix --- Functional package management for GNU
|
||||
# Copyright © 2012, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
|
||||
# Copyright © 2012, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
|
||||
#
|
||||
# This file is part of GNU Guix.
|
||||
#
|
||||
@@ -118,3 +118,30 @@ guile -c "
|
||||
(clear-failed-paths store (list out))
|
||||
(null? (query-failed-paths store)))))))
|
||||
#:guile-for-build (%guile-for-build)) "
|
||||
|
||||
kill "$daemon_pid"
|
||||
|
||||
|
||||
# Make sure the daemon's default 'build-cores' setting is honored.
|
||||
|
||||
guix-daemon --listen="$socket" --disable-chroot --cores=42 &
|
||||
daemon_pid=$!
|
||||
|
||||
GUIX_DAEMON_SOCKET="$socket" \
|
||||
guile -c '
|
||||
(use-modules (guix) (gnu packages) (guix tests))
|
||||
|
||||
(with-store store
|
||||
(let* ((build (add-text-to-store store "build.sh"
|
||||
"echo $NIX_BUILD_CORES > $out"))
|
||||
(bash (add-to-store store "bash" #t "sha256"
|
||||
(search-bootstrap-binary "bash"
|
||||
(%current-system))))
|
||||
(drv (derivation store "the-thing" bash
|
||||
`("-e" ,build)
|
||||
#:inputs `((,bash) (,build))
|
||||
#:env-vars `(("x" . ,(random-text))))))
|
||||
(and (build-derivations store (list drv))
|
||||
(exit
|
||||
(= 42 (pk (call-with-input-file (derivation->output-path drv)
|
||||
read)))))))'
|
||||
|
||||
Reference in New Issue
Block a user