diff --git a/collects/setup/parallel-build.rkt b/collects/setup/parallel-build.rkt index 5e30d7f586..460fa35b0a 100644 --- a/collects/setup/parallel-build.rkt +++ b/collects/setup/parallel-build.rkt @@ -198,7 +198,7 @@ [(cons hd tail) (define-values (dir file b) (split-path hd)) (set! filelist tail) - (values hd (list (->bytes hd) (->bytes dir) (->bytes file)))] + (values hd (list (->bytes hd) (->bytes dir) (->bytes file) null))] [(list) null])) (define/public (has-jobs?) (not (null? filelist))) (define/public (jobs-cnt) (length filelist)) diff --git a/collects/tests/racket/parallel-build.rkt b/collects/tests/racket/parallel-build.rkt new file mode 100644 index 0000000000..c5305ee76b --- /dev/null +++ b/collects/tests/racket/parallel-build.rkt @@ -0,0 +1,32 @@ +#lang racket +(require setup/parallel-build) + +(define tmp1 (make-temporary-file)) +(define tmp2 (make-temporary-file)) + +(define (mk file) + (with-output-to-file file + #:exists 'truncate + (lambda () + (printf "#lang racket/base\n")))) + +(mk tmp1) +(mk tmp2) + +(parallel-compile-files + (list tmp1 tmp2) + #:worker-count 2 + #:handler (lambda (type work msg out err) + (match type + ['done (printf " Made ~a\n" work)] + ['output (printf " Output from: ~a\n~a~a" work out err)] + [else (eprintf " Error compiling ~a\n~a\n~a~a" work msg out err)]))) + +(define (delete-files f) + (delete-file f) + (let-values ([(base name dir?) (split-path f)]) + (delete-file (build-path base "compiled" (path-add-suffix name #".dep"))) + (delete-file (build-path base "compiled" (path-add-suffix name #".zo"))))) + +(delete-files tmp1) +(delete-files tmp2)