diff --git a/pkgs/compiler-pkgs/compiler-lib/compiler/commands/test.rkt b/pkgs/compiler-pkgs/compiler-lib/compiler/commands/test.rkt index d71ae4e250..a71d110e52 100644 --- a/pkgs/compiler-pkgs/compiler-lib/compiler/commands/test.rkt +++ b/pkgs/compiler-pkgs/compiler-lib/compiler/commands/test.rkt @@ -43,7 +43,8 @@ (define test-module (read (open-input-string (vector-ref argv 1)))) (define d (read (open-input-string (vector-ref argv 2)))) - (dynamic-require test-module d) + (parameterize ([current-command-line-arguments '#()]) + (dynamic-require test-module d)) (call-with-output-file* result-file @@ -235,7 +236,8 @@ (lambda (what get-default) (get-default)))) (dynamic-require-elsewhere p d - #:timeout (or (lookup 'timeout + #:timeout (if default-timeout + (lookup 'timeout (lambda () default-timeout)) +inf.0))) @@ -653,7 +655,7 @@ (set-jobs! (string->number* "jobs" n exact-positive-integer?))] [("--timeout") seconds "Set default timeout to " - (set-jobs! (string->number* "timeout" seconds real?))] + (set! default-timeout (string->number* "timeout" seconds real?))] [("--quiet-program" "-Q") "Quiet the program" (set! quiet-program? #t)] diff --git a/pkgs/racket-pkgs/racket-doc/scribblings/raco/test.scrbl b/pkgs/racket-pkgs/racket-doc/scribblings/raco/test.scrbl index a5c5e26d88..1f95c81492 100644 --- a/pkgs/racket-pkgs/racket-doc/scribblings/raco/test.scrbl +++ b/pkgs/racket-pkgs/racket-doc/scribblings/raco/test.scrbl @@ -79,7 +79,8 @@ The @exec{raco test} command accepts several flags: @item{@DFlag{timeout} @nonterm{seconds} --- Sets the default timeout (after which a test counts as failed) - to @nonterm{seconds}.} + to @nonterm{seconds}. Use @exec{+inf.0} to allow tests to run without + limit but allow @racket[timeout] sub-submodule configuration.} @item{@Flag{Q} or @DFlag{quiet-program} --- suppresses output from each test program.} @@ -107,7 +108,8 @@ identifiers: @itemlist[ - @item{@racket[timeout] --- override the default timeout for the test} + @item{@racket[timeout] --- override the default timeout for the test, + when timeouts are enabled.} ]