Changed the interface to typed racket's test harness.
original commit: b13075a1c0679ecf20cc6c84224131c45f455399
This commit is contained in:
parent
9fea49db55
commit
545a02dfe6
|
@ -4,30 +4,39 @@
|
|||
(require "main.ss")
|
||||
|
||||
(define exec (make-parameter go/text))
|
||||
(define the-tests (make-parameter tests))
|
||||
(define skip-all? #f)
|
||||
(define the-tests (make-parameter #f))
|
||||
(define nightly? (make-parameter #f))
|
||||
(define unit? (make-parameter #f))
|
||||
(define int? (make-parameter #f))
|
||||
(define opt? (make-parameter #f))
|
||||
(define bench? (make-parameter #f))
|
||||
(current-namespace (make-base-namespace))
|
||||
(command-line
|
||||
#:once-each
|
||||
["--unit" "run just the unit tests" (the-tests unit-tests)]
|
||||
["--int" "run just the integration tests" (the-tests int-tests)]
|
||||
["--nightly" "for the nightly builds" (nightly? #t)]
|
||||
["--unit" "run the unit tests" (unit? #t)]
|
||||
["--int" "run the integration tests" (int? #t)]
|
||||
["--nightly" "for the nightly builds" (begin (nightly? #t) (unit? #t) (int? #t))]
|
||||
["--just" path "run only this test" (the-tests (just-one path))]
|
||||
["--opt" "run the optimizer tests" (opt? #t)]
|
||||
["--benchmarks" "compile the typed benchmarks" (bench? #t)]
|
||||
["--all" "run all tests" (begin (unit? #t) (int? #t) (opt? #t) (bench? #t))]
|
||||
["--gui" "run using the gui"
|
||||
(if (gui-available?)
|
||||
(begin (exec go))
|
||||
(error "GUI not available"))]
|
||||
)
|
||||
|
||||
(the-tests
|
||||
(cond [(and (unit?) (int?)) tests]
|
||||
[(unit?) unit-tests]
|
||||
[(int?) int-tests]
|
||||
[else #f]))
|
||||
|
||||
(cond [(and (nightly?) (eq? 'cgc (system-type 'gc)))
|
||||
(printf "Skipping Typed Racket tests.\n")]
|
||||
[(unless (= 0 ((exec) (the-tests)))
|
||||
(eprintf "Typed Racket Tests did not pass."))
|
||||
[(when (the-tests)
|
||||
(unless (= 0 ((exec) (the-tests)))
|
||||
(eprintf "Typed Racket Tests did not pass.")))
|
||||
(when (opt?)
|
||||
(parameterize ([current-command-line-arguments #()])
|
||||
(dynamic-require '(file "optimizer/run.rkt") #f))
|
||||
|
|
Loading…
Reference in New Issue
Block a user