From 6771bddb59663065f1a3762536cf9c0576f83ff6 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 30 Apr 2019 16:33:33 -0600 Subject: [PATCH] fix TR shotout benchmark driver for Racket CS --- .../tests/racket/benchmarks/shootout/auto.rkt | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/pkgs/racket-benchmarks/tests/racket/benchmarks/shootout/auto.rkt b/pkgs/racket-benchmarks/tests/racket/benchmarks/shootout/auto.rkt index 50c5f0767f..16ca55ed8d 100755 --- a/pkgs/racket-benchmarks/tests/racket/benchmarks/shootout/auto.rkt +++ b/pkgs/racket-benchmarks/tests/racket/benchmarks/shootout/auto.rkt @@ -49,25 +49,28 @@ exec racket -qu "$0" ${1+"$@"} (delete-file (build-path compiled "current-bm_rkt.zo")))) (define (mk-typed-racket-non-optimizing bm) - (unless (directory-exists? "typed/compiled") - (make-directory "typed/compiled")) + (define compiled (build-path "typed" (car (use-compiled-file-paths)))) + (unless (directory-exists? compiled) + (make-directory compiled)) (parameterize ([current-namespace (make-base-namespace)] [read-accept-reader #t]) (let ([name (format "~a-non-optimizing.rkt" bm)]) (compile-file (format "typed/~a" name) - "typed/compiled/current-bm_rkt.zo")))) + (build-path compiled "current-bm_rkt.zo"))))) (define (mk-typed-racket bm) - (unless (directory-exists? "typed/compiled") - (make-directory "typed/compiled")) + (define compiled (build-path "typed" (car (use-compiled-file-paths)))) + (unless (directory-exists? compiled) + (make-directory compiled)) (parameterize ([current-namespace (make-base-namespace)] [read-accept-reader #t]) (let ([name (format "~a-optimizing.rkt" bm)]) (compile-file (format "typed/~a" name) - "typed/compiled/current-bm_rkt.zo")))) + (build-path compiled "current-bm_rkt.zo"))))) (define (clean-up-typed bm) - (when (file-exists? "typed/compiled/current-bm_rkt.zo") - (delete-file "typed/compiled/current-bm_rkt.zo"))) + (define compiled (build-path "typed" (car (use-compiled-file-paths)))) + (when (file-exists? (build-path compiled "current-bm_rkt.zo")) + (delete-file (build-path compiled "current-bm_rkt.zo")))) (define (extract-racket-times bm str) (let ([m (regexp-match #rx#"cpu time: ([0-9]+) real time: ([0-9]+) gc time: ([0-9]+)" str)])