More options for test runner.

This commit is contained in:
Sam Tobin-Hochstadt 2010-06-24 16:46:31 -04:00
parent 3c8952d63d
commit 5b1118d514
3 changed files with 25 additions and 9 deletions

View File

@ -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" *)

View File

@ -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)

View File

@ -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.")))