From 5b74fe065b33ee99372d472f2d6ee5284d720b75 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 8 Dec 2015 23:27:53 +0100 Subject: guix build: Add '--rounds'. * guix/scripts/build.scm (show-build-options-help) (%standard-build-options): Add --rounds. (set-build-options-from-command-line): Honor it. * doc/guix.texi (Invoking guix build): Document it. * doc/contributing.texi (Submitting Patches): Mention it. --- guix/scripts/build.scm | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'guix/scripts/build.scm') diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm index 192ed5cd45..072840b953 100644 --- a/guix/scripts/build.scm +++ b/guix/scripts/build.scm @@ -170,6 +170,8 @@ options handled by 'set-build-options-from-command-line', and listed in --timeout=SECONDS mark the build as failed after SECONDS of activity")) (display (_ " --verbosity=LEVEL use the given verbosity LEVEL")) + (display (_ " + --rounds=N build N times in a row to detect non-determinism")) (display (_ " -c, --cores=N allow the use of up to N CPU cores for the build")) (display (_ " @@ -181,6 +183,7 @@ options handled by 'set-build-options-from-command-line', and listed in ;; TODO: Add more options. (set-build-options store #:keep-failed? (assoc-ref opts 'keep-failed?) + #:rounds (assoc-ref opts 'rounds) #:build-cores (or (assoc-ref opts 'cores) 0) #:max-build-jobs (or (assoc-ref opts 'max-jobs) 1) #:fallback? (assoc-ref opts 'fallback?) @@ -210,6 +213,12 @@ options handled by 'set-build-options-from-command-line', and listed in (apply values (alist-cons 'keep-failed? #t result) rest))) + (option '("rounds") #t #f + (lambda (opt name arg result . rest) + (apply values + (alist-cons 'rounds (string->number* arg) + result) + rest))) (option '("fallback") #f #f (lambda (opt name arg result . rest) (apply values -- cgit v1.2.3