www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 659111b02cdf8844f935d4152d973f022102879a
parent 1345bbf79a68dfe0a430de3a4c068eef05536e79
Author: Matthew Flatt <mflatt@racket-lang.org>
Date:   Mon, 29 Jul 2013 07:01:47 -0600

distro-build: add `#:pause-before' and `#:pause-after' options

I'm hoping this will help reduce failures in my snapshot builds.

original commit: bcc0b335a3f3b760cce97c546f8aa7866d08fb01

Diffstat:
Mpkgs/distro-build/config.rkt | 2++
Mpkgs/distro-build/doc.txt | 8++++++++
Mpkgs/distro-build/drive-clients.rkt | 4+++-
3 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/pkgs/distro-build/config.rkt b/pkgs/distro-build/config.rkt @@ -145,6 +145,8 @@ [(#:site-dest) (path-string? val)] [(#:pdf-doc?) (boolean? val)] [(#:max-snapshots) (real? val)] + [(#:pause-before) (and (real? val) (not (negative? val)))] + [(#:pause-after) (and (real? val) (not (negative? val)))] [(#:readme) (or (string? val) (and (procedure? val) (procedure-arity-includes? val 1)))] diff --git a/pkgs/distro-build/doc.txt b/pkgs/distro-build/doc.txt @@ -239,6 +239,14 @@ Site-configuration keywords (where <string*> means no spaces, etc.): #:max-snapshots <number> --- number of snapshots to keep, used by the `snapshot-site' makefile target + #:pause-before <nonnegative-number> --- a pause in seconds to + wait before starting a machine, which may help a virtual machine + avoid confusion from being stopped and started too quickly; the + default is 0 + + #:pause-after <nonnegative-number> --- a pause in seconds to + wait after stopping a machine; the default is 0 + #:custom <hash-table> --- a hash table mapping arbitrary keywords to arbitrary values; when a value for `#:custom' is overriden in a nested configuration, the new table is merged with the overriden diff --git a/pkgs/distro-build/drive-clients.rkt b/pkgs/distro-build/drive-clients.rkt @@ -458,6 +458,7 @@ (limit-and-report-failure c 2 (lambda () + (sleep (get-opt c '#:pause-before 0)) ;; start client, if a VM: (start-client c (or (get-opt c '#:max-vm) 1)) ;; catch failure in build step proper, so we @@ -467,6 +468,7 @@ c 1 (lambda () (client-build c))) ;; stop client, if a VM: - (stop-client c))))))])))) + (stop-client c) + (sleep (get-opt c '#:pause-after 0)))))))])))) (display-time)