move raco make test to a more sensible place

original commit: 28b98beb6c
This commit is contained in:
Matthew Flatt 2014-11-09 08:46:59 -07:00
parent 6e62de29ed
commit b46e39d5eb

View File

@ -0,0 +1,20 @@
#lang racket/base
(require racket/file
racket/path
racket/system
compiler/find-exe)
(define tmpdir (make-temporary-file "tmp~a" 'directory (current-directory)))
(define tmppath (build-path tmpdir "tmp.rkt"))
(with-output-to-file (build-path tmpdir "tmp.rkt") #:exists 'replace
(lambda ()
(printf "#lang racket\n")))
(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)))
(delete-directory/files tmpdir)
(unless ok?
(error "`raco make` test failed"))