From 545a02dfe6ba050b45d474e1a282e1794fa77bdb Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Fri, 16 Jul 2010 19:55:14 -0400 Subject: [PATCH] Changed the interface to typed racket's test harness. original commit: b13075a1c0679ecf20cc6c84224131c45f455399 --- collects/tests/typed-scheme/run.rkt | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/collects/tests/typed-scheme/run.rkt b/collects/tests/typed-scheme/run.rkt index 7f40679c..b848d7ae 100644 --- a/collects/tests/typed-scheme/run.rkt +++ b/collects/tests/typed-scheme/run.rkt @@ -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))