distro-build: add #:pause-before' and
#:pause-after' options
I'm hoping this will help reduce failures in my snapshot builds.
This commit is contained in:
parent
bf5795ea4c
commit
bcc0b335a3
|
@ -145,6 +145,8 @@
|
||||||
[(#:site-dest) (path-string? val)]
|
[(#:site-dest) (path-string? val)]
|
||||||
[(#:pdf-doc?) (boolean? val)]
|
[(#:pdf-doc?) (boolean? val)]
|
||||||
[(#:max-snapshots) (real? 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)
|
[(#:readme) (or (string? val)
|
||||||
(and (procedure? val)
|
(and (procedure? val)
|
||||||
(procedure-arity-includes? val 1)))]
|
(procedure-arity-includes? val 1)))]
|
||||||
|
|
|
@ -239,6 +239,14 @@ Site-configuration keywords (where <string*> means no spaces, etc.):
|
||||||
#:max-snapshots <number> --- number of snapshots to keep, used by
|
#:max-snapshots <number> --- number of snapshots to keep, used by
|
||||||
the `snapshot-site' makefile target
|
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
|
#:custom <hash-table> --- a hash table mapping arbitrary keywords to
|
||||||
arbitrary values; when a value for `#:custom' is overriden in a
|
arbitrary values; when a value for `#:custom' is overriden in a
|
||||||
nested configuration, the new table is merged with the overriden
|
nested configuration, the new table is merged with the overriden
|
||||||
|
|
|
@ -458,6 +458,7 @@
|
||||||
(limit-and-report-failure
|
(limit-and-report-failure
|
||||||
c 2
|
c 2
|
||||||
(lambda ()
|
(lambda ()
|
||||||
|
(sleep (get-opt c '#:pause-before 0))
|
||||||
;; start client, if a VM:
|
;; start client, if a VM:
|
||||||
(start-client c (or (get-opt c '#:max-vm) 1))
|
(start-client c (or (get-opt c '#:max-vm) 1))
|
||||||
;; catch failure in build step proper, so we
|
;; catch failure in build step proper, so we
|
||||||
|
@ -467,6 +468,7 @@
|
||||||
c 1
|
c 1
|
||||||
(lambda () (client-build c)))
|
(lambda () (client-build c)))
|
||||||
;; stop client, if a VM:
|
;; stop client, if a VM:
|
||||||
(stop-client c))))))]))))
|
(stop-client c)
|
||||||
|
(sleep (get-opt c '#:pause-after 0)))))))]))))
|
||||||
|
|
||||||
(display-time)
|
(display-time)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user