From fd7fff2c58c296606ecc43c827367940ab8fa5cd Mon Sep 17 00:00:00 2001 From: Danny Yoo Date: Tue, 17 May 2011 15:52:45 -0400 Subject: [PATCH] adding compile-context-preservation-enabled so we get the same results of compilation in both racket and drracket tests --- Makefile | 8 ++++++++ test-helpers.rkt | 6 +++++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..27a8753 --- /dev/null +++ b/Makefile @@ -0,0 +1,8 @@ +test-compiler: + raco make -v --disable-inline test-compiler.rkt + racket test-compiler.rkt + + +test-earley: + raco make -v --disable-inline test-earley.rkt + racket test-earley.rkt diff --git a/test-helpers.rkt b/test-helpers.rkt index a501775..4b704f6 100644 --- a/test-helpers.rkt +++ b/test-helpers.rkt @@ -19,7 +19,11 @@ (define (parse stx) (parameterize ([current-namespace (lookup-language-namespace `(file ,(path->string kernel-language-path)) - #;'racket/base)]) + #;'racket/base)] + ;; We want to disable some optimizations for the moment. + ;; See: http://docs.racket-lang.org/drracket/module.html + [compile-context-preservation-enabled #t]) + (let ([bc (racket:compile stx)] [op (open-output-bytes)]) (write bc op)