From 28b98beb6ce48c36e0fd352e1643b7fd29b1e9b0 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sun, 9 Nov 2014 08:46:59 -0700 Subject: [PATCH] move `raco make` test to a more sensible place --- .../compiler-test/tests/compiler/make.rkt | 20 +++++++++++++++++++ .../racket-test/tests/racket/setup.rktl | 16 --------------- 2 files changed, 20 insertions(+), 16 deletions(-) create mode 100644 pkgs/compiler-pkgs/compiler-test/tests/compiler/make.rkt diff --git a/pkgs/compiler-pkgs/compiler-test/tests/compiler/make.rkt b/pkgs/compiler-pkgs/compiler-test/tests/compiler/make.rkt new file mode 100644 index 0000000000..e537e03b4a --- /dev/null +++ b/pkgs/compiler-pkgs/compiler-test/tests/compiler/make.rkt @@ -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")) + diff --git a/pkgs/racket-pkgs/racket-test/tests/racket/setup.rktl b/pkgs/racket-pkgs/racket-test/tests/racket/setup.rktl index 4c2f19ec1e..f63fc2e239 100644 --- a/pkgs/racket-pkgs/racket-test/tests/racket/setup.rktl +++ b/pkgs/racket-pkgs/racket-test/tests/racket/setup.rktl @@ -38,22 +38,6 @@ (test "a/b" path->module-path "a/b") (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: