Set a maximum timeout for all tests in DrDr

This commit is contained in:
Jay McCarthy 2012-11-24 07:43:58 -07:00
parent fd86928320
commit cf7e54bb9f

View File

@ -329,13 +329,20 @@
(list "-t" (list "-t"
(path->string* (path->string*
(build-path (drdr-directory) "set-browser.rkt")))) (build-path (drdr-directory) "set-browser.rkt"))))
;; And go ;; And go
(define top-sema (make-semaphore 0)) (define top-sema (make-semaphore 0))
(notify! "Starting testing") (notify! "Starting testing")
(when (directory-exists? collects-pth) (when (directory-exists? collects-pth)
(test-directory collects-pth top-sema) (test-directory collects-pth top-sema)
(notify! "All testing scheduled... waiting for completion") (notify! "All testing scheduled... waiting for completion")
(semaphore-wait top-sema)) (sync
top-sema
(handle-evt
(alarm-evt
(+ (current-inexact-milliseconds)
(* 1000 (* 2 (current-make-install-timeout-seconds)))))
(λ _
(kill-thread (current-thread))))))
(notify! "Stopping testing") (notify! "Stopping testing")
(stop-job-queue! test-workers) (stop-job-queue! test-workers)
(stop-job-queue! gui-workers)) (stop-job-queue! gui-workers))