Compile the math library as part of the TR test suite.
This commit is contained in:
parent
8a0c859d14
commit
1d09fbde37
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
(require rackunit rackunit/text-ui racket/file
|
(require rackunit rackunit/text-ui racket/file
|
||||||
mzlib/etc racket/port
|
mzlib/etc racket/port
|
||||||
compiler/compiler racket/promise
|
compiler/compiler setup/setup racket/promise
|
||||||
racket/match syntax/modcode
|
racket/match syntax/modcode
|
||||||
racket/promise
|
racket/promise
|
||||||
"unit-tests/all-tests.rkt"
|
"unit-tests/all-tests.rkt"
|
||||||
|
@ -112,6 +112,12 @@
|
||||||
(mk shootout)
|
(mk shootout)
|
||||||
(mk common)))
|
(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 (just-one p*)
|
||||||
(define-values (path p b) (split-path p*))
|
(define-values (path p b) (split-path p*))
|
||||||
|
@ -156,5 +162,5 @@
|
||||||
|
|
||||||
(provide go go/text just-one places start-workers
|
(provide go go/text just-one places start-workers
|
||||||
verbose?
|
verbose?
|
||||||
int-tests unit-tests compile-benchmarks
|
int-tests unit-tests compile-benchmarks compile-math
|
||||||
optimization-tests missed-optimization-tests)
|
optimization-tests missed-optimization-tests)
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
(define opt? (make-parameter #f))
|
(define opt? (make-parameter #f))
|
||||||
(define missed-opt? (make-parameter #f))
|
(define missed-opt? (make-parameter #f))
|
||||||
(define bench? (make-parameter #f))
|
(define bench? (make-parameter #f))
|
||||||
|
(define math? (make-parameter #f))
|
||||||
(define single (make-parameter #f))
|
(define single (make-parameter #f))
|
||||||
(current-namespace (make-base-namespace))
|
(current-namespace (make-base-namespace))
|
||||||
(command-line
|
(command-line
|
||||||
|
@ -20,9 +21,10 @@
|
||||||
["--opt" "run the optimization tests" (opt? #t)]
|
["--opt" "run the optimization tests" (opt? #t)]
|
||||||
["--missed-opt" "run the missed optimization tests" (missed-opt? #t)]
|
["--missed-opt" "run the missed optimization tests" (missed-opt? #t)]
|
||||||
["--benchmarks" "compile the typed benchmarks" (bench? #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))]
|
["--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))]
|
["--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"
|
["-j" num "number of places to use"
|
||||||
(let ([n (string->number num)])
|
(let ([n (string->number num)])
|
||||||
(places (and (integer? n) (> n 1) n)))]
|
(places (and (integer? n) (> n 1) n)))]
|
||||||
|
@ -43,7 +45,8 @@
|
||||||
(if (int?) (list (int-tests)) '())
|
(if (int?) (list (int-tests)) '())
|
||||||
(if (opt?) (list (optimization-tests)) '())
|
(if (opt?) (list (optimization-tests)) '())
|
||||||
(if (missed-opt?) (list (missed-optimization-tests)) '())
|
(if (missed-opt?) (list (missed-optimization-tests)) '())
|
||||||
(if (bench?) (list (compile-benchmarks)) '())))])])
|
(if (bench?) (list (compile-benchmarks)) '())
|
||||||
|
(if (math?) (list (compile-math)) '())))])])
|
||||||
(unless (= 0 ((exec) to-run))
|
(unless (= 0 ((exec) to-run))
|
||||||
(eprintf "Typed Racket Tests did not pass.\n")
|
(eprintf "Typed Racket Tests did not pass.\n")
|
||||||
(exit 1))))
|
(exit 1))))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user