From 1d09fbde371c8475e8a1ce3dd9cc66e0f3ee95dc Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Wed, 5 Nov 2014 10:47:36 -0500 Subject: [PATCH] Compile the math library as part of the TR test suite. --- .../typed-racket-test/tests/typed-racket/main.rkt | 10 ++++++++-- .../typed-racket-test/tests/typed-racket/run.rkt | 15 +++++++++------ 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/main.rkt b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/main.rkt index fb5212c37a..896d7d2d10 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/main.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/main.rkt @@ -2,7 +2,7 @@ (require rackunit rackunit/text-ui racket/file mzlib/etc racket/port - compiler/compiler racket/promise + compiler/compiler setup/setup racket/promise racket/match syntax/modcode racket/promise "unit-tests/all-tests.rkt" @@ -112,6 +112,12 @@ (mk shootout) (mk common))) +(define (compile-math) + (test-suite "Compiling Math library" + (check-true + (parameterize ([current-output-port (open-output-nowhere)]) + (setup #:collections '(("math"))))))) + (define (just-one p*) (define-values (path p b) (split-path p*)) @@ -156,5 +162,5 @@ (provide go go/text just-one places start-workers verbose? - int-tests unit-tests compile-benchmarks + int-tests unit-tests compile-benchmarks compile-math optimization-tests missed-optimization-tests) diff --git a/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/run.rkt b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/run.rkt index ea40a94e04..c2830205e3 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/run.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/run.rkt @@ -10,6 +10,7 @@ (define opt? (make-parameter #f)) (define missed-opt? (make-parameter #f)) (define bench? (make-parameter #f)) +(define math? (make-parameter #f)) (define single (make-parameter #f)) (current-namespace (make-base-namespace)) (command-line @@ -20,9 +21,10 @@ ["--opt" "run the optimization tests" (opt? #t)] ["--missed-opt" "run the missed optimization tests" (missed-opt? #t)] ["--benchmarks" "compile the typed benchmarks" (bench? #t)] + ["--math" "compile the math library" (math? #t)] ["--just" path "run only this test" (single (just-one path))] ["--nightly" "for the nightly builds" (begin (nightly? #t) (unit? #t) (opt? #t) (missed-opt? #t) (places 1))] - ["--all" "run all tests" (begin (unit? #t) (int? #t) (opt? #t) (missed-opt? #t) (bench? #t))] + ["--all" "run all tests" (begin (unit? #t) (int? #t) (opt? #t) (missed-opt? #t) (bench? #t) (math? #t))] ["-j" num "number of places to use" (let ([n (string->number num)]) (places (and (integer? n) (> n 1) n)))] @@ -39,11 +41,12 @@ [else (make-test-suite "Typed Racket Tests" - (append (if (unit?) (list unit-tests) '()) - (if (int?) (list (int-tests)) '()) - (if (opt?) (list (optimization-tests)) '()) - (if (missed-opt?) (list (missed-optimization-tests)) '()) - (if (bench?) (list (compile-benchmarks)) '())))])]) + (append (if (unit?) (list unit-tests) '()) + (if (int?) (list (int-tests)) '()) + (if (opt?) (list (optimization-tests)) '()) + (if (missed-opt?) (list (missed-optimization-tests)) '()) + (if (bench?) (list (compile-benchmarks)) '()) + (if (math?) (list (compile-math)) '())))])]) (unless (= 0 ((exec) to-run)) (eprintf "Typed Racket Tests did not pass.\n") (exit 1))))