raco test: fix process command-line handling and adjust timeout handling
original commit: bbb0c5f6e9
This commit is contained in:
parent
11c41cb89b
commit
7ff04c1dfa
|
@ -43,7 +43,8 @@
|
||||||
(define test-module (read (open-input-string (vector-ref argv 1))))
|
(define test-module (read (open-input-string (vector-ref argv 1))))
|
||||||
(define d (read (open-input-string (vector-ref argv 2))))
|
(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*
|
(call-with-output-file*
|
||||||
result-file
|
result-file
|
||||||
|
@ -235,7 +236,8 @@
|
||||||
(lambda (what get-default) (get-default))))
|
(lambda (what get-default) (get-default))))
|
||||||
(dynamic-require-elsewhere
|
(dynamic-require-elsewhere
|
||||||
p d
|
p d
|
||||||
#:timeout (or (lookup 'timeout
|
#:timeout (if default-timeout
|
||||||
|
(lookup 'timeout
|
||||||
(lambda () default-timeout))
|
(lambda () default-timeout))
|
||||||
+inf.0)))
|
+inf.0)))
|
||||||
|
|
||||||
|
@ -653,7 +655,7 @@
|
||||||
(set-jobs! (string->number* "jobs" n exact-positive-integer?))]
|
(set-jobs! (string->number* "jobs" n exact-positive-integer?))]
|
||||||
[("--timeout") seconds
|
[("--timeout") seconds
|
||||||
"Set default timeout to <seconds>"
|
"Set default timeout to <seconds>"
|
||||||
(set-jobs! (string->number* "timeout" seconds real?))]
|
(set! default-timeout (string->number* "timeout" seconds real?))]
|
||||||
[("--quiet-program" "-Q")
|
[("--quiet-program" "-Q")
|
||||||
"Quiet the program"
|
"Quiet the program"
|
||||||
(set! quiet-program? #t)]
|
(set! quiet-program? #t)]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user