Try to improve the tests wrt timeouts and memory limits
original commit: 226f86d201794a880e0ec49ab6cb03ec937c962e
This commit is contained in:
parent
0e1979d80b
commit
b8556478f5
|
@ -40,7 +40,8 @@
|
|||
. stuff))
|
||||
(parameterize ([current-directory this-dir]
|
||||
[sandbox-output o]
|
||||
[sandbox-error-output current-output-port])
|
||||
[sandbox-error-output current-output-port]
|
||||
[sandbox-eval-limits '(2 10)])
|
||||
(define exn #f)
|
||||
(define thd #f)
|
||||
(define (run)
|
||||
|
@ -54,8 +55,7 @@
|
|||
(call-with-output-file (car m) #:exists 'truncate
|
||||
(lambda (o) (display (cdr m) o))))
|
||||
(set! thd (thread run))
|
||||
(t (with-limits 2 #f
|
||||
(if len-to-read (read-string len-to-read i) (port->string i)))
|
||||
(t (if len-to-read (read-string len-to-read i) (port->string i))
|
||||
=> expected)
|
||||
(t (begin (kill-thread thd) (cond [exn => raise] [else #t])))
|
||||
(for ([m more])
|
||||
|
|
Loading…
Reference in New Issue
Block a user