diff --git a/collects/tests/typed-scheme/main.rkt b/collects/tests/typed-scheme/main.rkt index 96fb394b..ac68c30a 100644 --- a/collects/tests/typed-scheme/main.rkt +++ b/collects/tests/typed-scheme/main.rkt @@ -86,8 +86,14 @@ (test-suite "Typed Scheme Tests" unit-tests int-tests)) -(define (go [unit? #f]) (test/gui (if unit? unit-tests tests))) -(define (go/text [unit? #f]) (run-tests (if unit? unit-tests tests) 'verbose)) +(define (go [unit? #f] [int? #f]) (test/gui (cond [unit? unit-tests] + [int? int-tests] + [else tests]))) +(define (go/text [unit? #f] [int? #f]) (run-tests + (cond [unit? unit-tests] + [int? int-tests] + [else tests]) + 'verbose)) (provide go go/text) diff --git a/collects/tests/typed-scheme/run.rkt b/collects/tests/typed-scheme/run.rkt index c462e3d9..efde19fe 100644 --- a/collects/tests/typed-scheme/run.rkt +++ b/collects/tests/typed-scheme/run.rkt @@ -2,14 +2,24 @@ (require racket/vector racket/gui/dynamic) (require "main.ss") -(current-namespace (make-base-namespace)) + (define exec (make-parameter go/text)) (define unit-only? (make-parameter #f)) +(define int-only? (make-parameter #f)) +(define skip-all? #f) +(current-namespace (make-base-namespace)) (command-line #:once-each ["--unit" "run just the unit tests" (unit-only? #t)] + ["--int" "run just the integration tests" (int-only? #t)] + ["--nightly" "for the nightly builds" (when (eq? 'cgc (system-type 'gc)) + (set! skip-all? #t))] ["--gui" "run using the gui" - (current-namespace ((gui-dynamic-require 'make-gui-namespace))) - (exec go)]) -(unless (= 0 ((exec) (unit-only?))) - (error "Typed Scheme Tests did not pass.")) + (if (gui-available?) + (begin (exec go)) + (error "GUI not available"))]) + +(if skip-all? + (printf "Skipping Typed Racket tests.\n") + (unless (= 0 ((exec) (unit-only?) (int-only?))) + (error "Typed Racket Tests did not pass.")))