Make transform run in parrallel.
This commit is contained in:
parent
f6a0494f65
commit
358475faf1
|
@ -34,15 +34,17 @@
|
||||||
(display rest)))))
|
(display rest)))))
|
||||||
|
|
||||||
;; proc returns the list of tests to be run on each file
|
;; proc returns the list of tests to be run on each file
|
||||||
(define (transform-dir dir)
|
(define (transform-dirs dirs)
|
||||||
(for ([name (directory-list dir)]
|
(define results
|
||||||
#:when (test-file? name))
|
(for*/list ([dir (in-list dirs)]
|
||||||
(transform name dir)))
|
[name (directory-list dir)]
|
||||||
|
#:when (test-file? name))
|
||||||
|
(delay/thread (transform name dir))))
|
||||||
|
(for-each force results))
|
||||||
|
|
||||||
(start-workers)
|
(start-workers)
|
||||||
(cond [(= (vector-length (current-command-line-arguments)) 0)
|
(cond [(= (vector-length (current-command-line-arguments)) 0)
|
||||||
(transform-dir tests-dir)
|
(transform-dirs (list tests-dir missed-optimizations-dir))]
|
||||||
(transform-dir missed-optimizations-dir)]
|
|
||||||
[else ; set of paths to transform
|
[else ; set of paths to transform
|
||||||
(define l (vector->list (current-command-line-arguments)))
|
(define l (vector->list (current-command-line-arguments)))
|
||||||
(for-each (lambda (f)
|
(for-each (lambda (f)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user