aboutsummaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-03-09 23:09:18 +0100
committerLudovic Courtès <ludo@gnu.org>2014-03-09 23:09:18 +0100
commit002622b65b60286209d2c959d590a392afa782b1 (patch)
tree58c1f050558ffd3c944eb58d82a95225c0419340 /guix
parent6c20d1d0c3822c0332f3cca963121365133e6412 (diff)
downloadgnu-guix-002622b65b60286209d2c959d590a392afa782b1.tar
gnu-guix-002622b65b60286209d2c959d590a392afa782b1.tar.gz
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.
Diffstat (limited to 'guix')
-rw-r--r--guix/scripts/build.scm8
1 files changed, 8 insertions, 0 deletions
diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm
index 14b8f2d6bd..618015e9ba 100644
--- a/guix/scripts/build.scm
+++ b/guix/scripts/build.scm
@@ -127,6 +127,8 @@ options handled by 'set-build-options-from-command-line', and listed in
--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 (_ "
-c, --cores=N allow the use of up to N CPU cores for the build")))
@@ -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)))