From 5b1118d514ca8cc7f0071bfa531f8268401fc531 Mon Sep 17 00:00:00 2001 From: Sam Tobin-Hochstadt Date: Thu, 24 Jun 2010 16:46:31 -0400 Subject: [PATCH] More options for test runner. --- collects/meta/props | 4 ++-- collects/tests/typed-scheme/main.rkt | 10 ++++++++-- collects/tests/typed-scheme/run.rkt | 20 +++++++++++++++----- 3 files changed, 25 insertions(+), 9 deletions(-) diff --git a/collects/meta/props b/collects/meta/props index 7807ba6cec..7165abd961 100755 --- a/collects/meta/props +++ b/collects/meta/props @@ -1860,8 +1860,8 @@ path/s is either such a string or a list of them. "collects/tests/typed-scheme" responsible (samth) "collects/tests/typed-scheme/fail" drdr:command-line #f "collects/tests/typed-scheme/fail/with-type3.rkt" responsible (sstrickl) -"collects/tests/typed-scheme/nightly-run.rkt" drdr:timeout 1200 -"collects/tests/typed-scheme/run.rkt" drdr:command-line #f drdr:timeout 600 +"collects/tests/typed-scheme/nightly-run.rkt" drdr:command-line #f +"collects/tests/typed-scheme/run.rkt" drdr:command-line (racket "-t" * "--" "--nightly-run") drdr:timeout 1200 "collects/tests/typed-scheme/xfail" drdr:command-line #f "collects/tests/units" responsible (sstrickl) "collects/tests/units/multi-mod-sigs.rktl" drdr:command-line (racket "-f" *) diff --git a/collects/tests/typed-scheme/main.rkt b/collects/tests/typed-scheme/main.rkt index 96fb394ba2..ac68c30a97 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 c462e3d967..efde19fed0 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.")))