distro-build: improve failure reporting
This commit is contained in:
parent
265603ed69
commit
949ea16cbf
|
@ -370,6 +370,7 @@
|
|||
(* 30 60)))
|
||||
(define orig-thread (current-thread))
|
||||
(define timeout? #f)
|
||||
(begin0
|
||||
(parameterize ([current-custodian cust])
|
||||
(thread (lambda ()
|
||||
(sleep (* timeout-factor timeout))
|
||||
|
@ -387,7 +388,7 @@
|
|||
(log-error "~a failed..." (client-name c))
|
||||
(log-error (exn-message exn)))])
|
||||
(thunk)))
|
||||
(custodian-shutdown-all cust)))
|
||||
(custodian-shutdown-all cust))))
|
||||
|
||||
(define (client-thread c sequential? thunk)
|
||||
(unless stop?
|
||||
|
@ -400,9 +401,10 @@
|
|||
(define p (open-output-file log-file
|
||||
#:exists 'truncate/replace))
|
||||
(file-stream-buffer-mode p 'line)
|
||||
(parameterize ([current-output-port p]
|
||||
(unless (parameterize ([current-output-port p]
|
||||
[current-error-port p])
|
||||
(thunk)))
|
||||
(thunk))
|
||||
(printf "Build FAILED for ~s\n" (client-name c))))
|
||||
(cond
|
||||
[sequential? (go) (thread void)]
|
||||
[else (thread go)])))
|
||||
|
@ -443,10 +445,11 @@
|
|||
(start-client c (or (get-opt c '#:max-vm) 1))
|
||||
;; catch failure in build step proper, so we
|
||||
;; can more likely stop the client:
|
||||
(begin0
|
||||
(limit-and-report-failure
|
||||
c 1
|
||||
(lambda () (client-build c)))
|
||||
;; stop client, if a VM:
|
||||
(stop-client c)))))]))))
|
||||
(stop-client c))))))]))))
|
||||
|
||||
(display-time)
|
||||
|
|
Loading…
Reference in New Issue
Block a user