move raco make
test to a more sensible place
This commit is contained in:
parent
de65bb5586
commit
28b98beb6c
20
pkgs/compiler-pkgs/compiler-test/tests/compiler/make.rkt
Normal file
20
pkgs/compiler-pkgs/compiler-test/tests/compiler/make.rkt
Normal 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"))
|
||||||
|
|
|
@ -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:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user