Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reorganize the TR testing files, and add progress output.
`typed-racket-test/main` is now the file to run for almost everything. `typed-racket-test/run` continues to exist so that DrDr preserves the timing history. Integration tests now print a progress meter, which should fix the Travis timeouts.
- Loading branch information
Showing
2 changed files
with
64 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,9 @@ | ||
#lang racket | ||
(require racket/vector racket/gui/dynamic rackunit) | ||
|
||
(require "main.rkt") | ||
|
||
(define exec (make-parameter go/text)) | ||
(define nightly? (make-parameter #f)) | ||
(define unit? (make-parameter #f)) | ||
(define int? (make-parameter #f)) | ||
(define opt? (make-parameter #f)) | ||
(define missed-opt? (make-parameter #f)) | ||
(define bench? (make-parameter #f)) | ||
(define math? (make-parameter #f)) | ||
(define single (make-parameter #f)) | ||
(current-namespace (make-base-namespace)) | ||
(command-line | ||
#:once-each | ||
["-v" "verbose" (verbose? #t)] | ||
["--unit" "run the unit tests" (unit? #t)] | ||
["--int" "run the integration tests" (int? #t)] | ||
["--opt" "run the optimization tests" (opt? #t)] | ||
["--missed-opt" "run the missed optimization tests" (missed-opt? #t)] | ||
["--benchmarks" "compile the typed benchmarks" (bench? #t)] | ||
["--math" "compile the math library" (math? #t)] | ||
["--just" path "run only this test" (single (just-one path))] | ||
["--nightly" "for the nightly builds" (begin (nightly? #t) (unit? #t) (opt? #t) (missed-opt? #t) (places 1))] | ||
["--all" "run all tests" (begin (unit? #t) (int? #t) (opt? #t) (missed-opt? #t) (bench? #t) (math? #t))] | ||
["-j" num "number of places to use" | ||
(let ([n (string->number num)]) | ||
(places (and (integer? n) (> n 1) n)))] | ||
["--gui" "run using the gui" | ||
(if (gui-available?) | ||
(exec go) | ||
(error "GUI not available"))]) | ||
|
||
(start-workers) | ||
|
||
(if (and (nightly?) (eq? 'cgc (system-type 'gc))) | ||
(printf "Skipping Typed Racket tests.\n") | ||
(let ([to-run (cond [(single) (single)] | ||
[else | ||
(make-test-suite | ||
"Typed Racket Tests" | ||
(append (if (unit?) (list unit-tests) '()) | ||
(if (int?) (list (int-tests)) '()) | ||
(if (opt?) (list (optimization-tests)) '()) | ||
(if (missed-opt?) (list (missed-optimization-tests)) '()) | ||
(if (bench?) (list (compile-benchmarks)) '()) | ||
(if (math?) (list (compile-math)) '())))])]) | ||
(unless (= 0 ((exec) to-run)) | ||
(eprintf "Typed Racket Tests did not pass.\n") | ||
(exit 1)))) | ||
|
||
;; Test mode: | ||
(module test racket/base | ||
(require syntax/location) | ||
(parameterize ([current-command-line-arguments (vector "--nightly")]) | ||
(dynamic-require (quote-module-path "..") 0)) | ||
(dynamic-require '(submod typed-racket-test/main main) 0)) | ||
(module config info | ||
(define timeout 1800))) |