Each tests gets its own planet directory
This commit is contained in:
parent
c0f8fef313
commit
34b64f40a9
|
@ -90,6 +90,21 @@
|
|||
(define-syntax-rule (with-temporary-directory e)
|
||||
(call-with-temporary-directory (lambda () e)))
|
||||
|
||||
(define (call-with-temporary-planet-directory thunk)
|
||||
(define tempdir
|
||||
(build-path (current-directory)
|
||||
(symbol->string (gensym 'planetdir))))
|
||||
(dynamic-wind
|
||||
(lambda ()
|
||||
(make-directory* tempdir))
|
||||
(lambda ()
|
||||
(with-env (["PLTPLANETDIR" (path->string tempdir)])
|
||||
(thunk)))
|
||||
(lambda ()
|
||||
(delete-directory/files tempdir))))
|
||||
(define-syntax-rule (with-temporary-planet-directory e)
|
||||
(call-with-temporary-planet-directory (lambda () e)))
|
||||
|
||||
(define (call-with-temporary-home-directory thunk)
|
||||
(define new-dir
|
||||
(make-temporary-file
|
||||
|
@ -260,6 +275,7 @@
|
|||
(format ":~a"
|
||||
(cpu->child
|
||||
(current-worker)))])
|
||||
(with-temporary-planet-directory
|
||||
(with-temporary-home-directory
|
||||
(with-temporary-directory
|
||||
(run/collect/wait/log
|
||||
|
@ -267,7 +283,7 @@
|
|||
#:timeout pth-timeout
|
||||
#:env (current-env)
|
||||
(first l)
|
||||
(rest l))))))))
|
||||
(rest l)))))))))
|
||||
(λ ()
|
||||
(semaphore-post dir-sema)))))]
|
||||
[else
|
||||
|
|
Loading…
Reference in New Issue
Block a user