fix some tests that need to find `racket'

This commit is contained in:
Matthew Flatt 2013-08-02 12:08:26 -06:00
parent 2a271a55fc
commit 4492cf2555
5 changed files with 18 additions and 14 deletions

View File

@ -1,6 +1,7 @@
#lang racket #lang racket
(require tests/eli-tester (require tests/eli-tester
racket/runtime-path) racket/runtime-path
compiler/find-exe)
(define (capture-output command . args) (define (capture-output command . args)
(define o (open-output-string)) (define o (open-output-string))
@ -14,7 +15,7 @@
(define (test-on-program filename) (define (test-on-program filename)
; run modular program, capture output ; run modular program, capture output
(define-values (modular-output modular-error) (define-values (modular-output modular-error)
(capture-output (find-executable-path "racket") filename)) (capture-output (find-exe) filename))
(define demod-filename (define demod-filename
(let-values ([(base filename dir?) (split-path filename)]) (let-values ([(base filename dir?) (split-path filename)])
@ -25,11 +26,11 @@
; demodularize ; demodularize
(parameterize ([current-input-port (open-input-string "")]) (parameterize ([current-input-port (open-input-string "")])
(system* (find-executable-path "raco") "demod" "-o" demod-filename filename)) (system* (find-exe) "-l-" "raco" "demod" "-o" demod-filename filename))
; run whole program ; run whole program
(define-values (whole-output whole-error) (define-values (whole-output whole-error)
(capture-output (find-executable-path "racket") demod-filename)) (capture-output (find-exe) demod-filename))
; compare output ; compare output
(test (test

View File

@ -7,6 +7,7 @@ exec racket -t "$0" -- -s -t 60 -v -R $*
(require setup/dirs (require setup/dirs
racket/runtime-path racket/runtime-path
racket/future racket/future
compiler/find-exe
"zo-test-util.rkt") "zo-test-util.rkt")
(define ((make-recorder! ht) file phase) (define ((make-recorder! ht) file phase)
@ -63,7 +64,7 @@ exec racket -t "$0" -- -s -t 60 -v -R $*
(! p-str)])) (! p-str)]))
(define-runtime-path zo-test-worker-path "zo-test-worker.rkt") (define-runtime-path zo-test-worker-path "zo-test-worker.rkt")
(define racket-path (path->string (find-executable-path "racket"))) (define racket-path (path->string (find-exe)))
(define p (define p
(command-line #:program "zo-test" (command-line #:program "zo-test"

View File

@ -18,7 +18,8 @@ exec racket -qu "$0" ${1+"$@"}
dynext/file dynext/file
syntax/toplevel syntax/toplevel
scheme/runtime-path scheme/runtime-path
racket/port) racket/port
compiler/find-exe)
;; Implementaton-specific control functions ------------------------------ ;; Implementaton-specific control functions ------------------------------
@ -363,7 +364,7 @@ exec racket -qu "$0" ${1+"$@"}
void void
mk-racket mk-racket
(lambda (bm) (lambda (bm)
(system (format "racket -u ~a.rkt" bm))) (system* (find-exe) "-u" (format "~a.rkt" bm)))
extract-racket-times extract-racket-times
clean-up-zo clean-up-zo
racket-skip-progs) racket-skip-progs)

View File

@ -18,7 +18,8 @@ exec racket -qu "$0" ${1+"$@"}
mzlib/file mzlib/file
dynext/file dynext/file
syntax/toplevel syntax/toplevel
scheme/runtime-path) scheme/runtime-path
compiler/find-exe)
;; Implementaton-specific control functions ------------------------------ ;; Implementaton-specific control functions ------------------------------
@ -80,7 +81,7 @@ exec racket -qu "$0" ${1+"$@"}
void void
mk-racket mk-racket
(lambda (bm) (lambda (bm)
(system (format "racket run.rkt ~a racket" bm))) (system* (find-exe) "run.rkt" bm "racket"))
extract-racket-times extract-racket-times
clean-up-zo clean-up-zo
'()) '())
@ -88,7 +89,7 @@ exec racket -qu "$0" ${1+"$@"}
void void
mk-typed-racket-non-optimizing mk-typed-racket-non-optimizing
(lambda (bm) (lambda (bm)
(system (format "racket run.rkt ~a typed-racket-non-optimizing" bm))) (system* (find-exe) "run.rkt" bm "typed-racket-non-optimizing"))
extract-racket-times extract-racket-times
clean-up-typed clean-up-typed
'()) '())
@ -96,7 +97,7 @@ exec racket -qu "$0" ${1+"$@"}
void void
mk-typed-racket mk-typed-racket
(lambda (bm) (lambda (bm)
(system (format "racket run.rkt ~a typed-racket" bm))) (system* (find-exe) "run.rkt" bm "typed-racket"))
extract-racket-times extract-racket-times
clean-up-typed clean-up-typed
'()) '())

View File

@ -1,10 +1,10 @@
#lang racket/base #lang racket/base
(require tests/stress (require tests/stress
racket/system racket/system
racket/runtime-path) racket/runtime-path
compiler/find-exe)
(define racket-pth (define racket-pth (find-exe))
(find-executable-path "racket"))
(define-runtime-path ttt:raw "ttt-bench-raw.rkt") (define-runtime-path ttt:raw "ttt-bench-raw.rkt")
(define-runtime-path ttt:ctc "ttt-bench-ctc.rkt") (define-runtime-path ttt:ctc "ttt-bench-ctc.rkt")