Avoid writing to the current directory in this test.
This commit is contained in:
parent
73a010841f
commit
12927d0e8b
|
@ -4,17 +4,17 @@
|
||||||
racket/system
|
racket/system
|
||||||
compiler/find-exe)
|
compiler/find-exe)
|
||||||
|
|
||||||
(define tmpdir (make-temporary-file "tmp~a" 'directory (current-directory)))
|
(parameterize ((current-directory (find-system-path 'temp-dir)))
|
||||||
(define tmppath (build-path tmpdir "tmp.rkt"))
|
(define tmpdir (make-temporary-file "tmp~a" 'directory (current-directory)))
|
||||||
(with-output-to-file (build-path tmpdir "tmp.rkt") #:exists 'replace
|
(define tmppath (build-path tmpdir "tmp.rkt"))
|
||||||
(lambda ()
|
(with-output-to-file (build-path tmpdir "tmp.rkt") #:exists 'replace
|
||||||
(printf "#lang racket\n")))
|
(lambda ()
|
||||||
(define exec-path (find-exe))
|
(printf "#lang racket\n")))
|
||||||
(define relpath (find-relative-path (current-directory) tmppath))
|
(define exec-path (find-exe))
|
||||||
|
(define relpath (find-relative-path (current-directory) tmppath))
|
||||||
|
|
||||||
(define ok? (system* exec-path "-l" "raco" "make" "-j" "2" (path->string relpath)))
|
(define ok? (system* exec-path "-l" "raco" "make" "-j" "2" (path->string relpath)))
|
||||||
(delete-directory/files tmpdir)
|
(delete-directory/files tmpdir)
|
||||||
|
|
||||||
(unless ok?
|
|
||||||
(error "`raco make` test failed"))
|
|
||||||
|
|
||||||
|
(unless ok?
|
||||||
|
(error "`raco make` test failed")))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user