From 7ff04c1dfabd06f8d72aca322f851acebf5e2b58 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sun, 29 Dec 2013 09:38:01 -0600 Subject: [PATCH] raco test: fix process command-line handling and adjust timeout handling original commit: bbb0c5f6e909ab36e85882dd76be8f3274a1c2ef --- .../compiler-pkgs/compiler-lib/compiler/commands/test.rkt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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)]