guix build: Add '--timeout' to the common build options.
* guix/scripts/build.scm (show-build-options-help): Document '--timeout'. (set-build-options-from-command-line): Pass #:timeout to 'set-build-options'. (%standard-build-options): Add '--timeout'. * doc/guix.texi (Invoking guix build): Document it.
This commit is contained in:
parent
6c20d1d0c3
commit
002622b65b
@ -1903,6 +1903,13 @@ instead of offloading builds to remote machines.
|
||||
When the build or substitution process remains silent for more than
|
||||
@var{seconds}, terminate it and report a build failure.
|
||||
|
||||
@item --timeout=@var{seconds}
|
||||
Likewise, when the build or substitution process lasts for more than
|
||||
@var{seconds}, terminate it and report a build failure.
|
||||
|
||||
By default there is no timeout. This behavior can be restored with
|
||||
@code{--timeout=0}.
|
||||
|
||||
@item --verbosity=@var{level}
|
||||
Use the given verbosity level. @var{level} must be an integer between 0
|
||||
and 5; higher means more verbose output. Setting a level of 4 or more
|
||||
|
@ -126,6 +126,8 @@ options handled by 'set-build-options-from-command-line', and listed in
|
||||
(display (_ "
|
||||
--max-silent-time=SECONDS
|
||||
mark the build as failed after SECONDS of silence"))
|
||||
(display (_ "
|
||||
--timeout=SECONDS mark the build as failed after SECONDS of activity"))
|
||||
(display (_ "
|
||||
--verbosity=LEVEL use the given verbosity LEVEL"))
|
||||
(display (_ "
|
||||
@ -142,6 +144,7 @@ options handled by 'set-build-options-from-command-line', and listed in
|
||||
#:use-substitutes? (assoc-ref opts 'substitutes?)
|
||||
#:use-build-hook? (assoc-ref opts 'build-hook?)
|
||||
#:max-silent-time (assoc-ref opts 'max-silent-time)
|
||||
#:timeout (assoc-ref opts 'timeout)
|
||||
#:verbosity (assoc-ref opts 'verbosity)))
|
||||
|
||||
(define %standard-build-options
|
||||
@ -175,6 +178,11 @@ options handled by 'set-build-options-from-command-line', and listed in
|
||||
(alist-cons 'max-silent-time (string->number* arg)
|
||||
result)
|
||||
rest)))
|
||||
(option '("timeout") #t #f
|
||||
(lambda (opt name arg result . rest)
|
||||
(apply values
|
||||
(alist-cons 'timeout (string->number* arg) result)
|
||||
rest)))
|
||||
(option '("verbosity") #t #f
|
||||
(lambda (opt name arg result . rest)
|
||||
(let ((level (string->number arg)))
|
||||
|
Loading…
Reference in New Issue
Block a user