move raco make test to a more sensible place

This commit is contained in:
Matthew Flatt 2014-11-09 08:46:59 -07:00
parent de65bb5586
commit 28b98beb6c
2 changed files with 20 additions and 16 deletions

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"))

View File

@ -38,22 +38,6 @@
(test "a/b" path->module-path "a/b") (test "a/b" path->module-path "a/b")
(test (find-system-path 'temp-dir) path->module-path (find-system-path 'temp-dir)) (test (find-system-path 'temp-dir) path->module-path (find-system-path 'temp-dir))
;; ----------------------------------------
(require compiler/find-exe)
(let ()
(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))
(test #t system* exec-path "-l" "raco" "make" "-j" "2" (path->string relpath))
(delete-directory/files tmpdir))
;; ---------------------------------------- ;; ----------------------------------------
;; Make sure that setting the reader doesn't break reading a configuration file: ;; Make sure that setting the reader doesn't break reading a configuration file: