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))
|
. stuff))
|
||||||
(parameterize ([current-directory this-dir]
|
(parameterize ([current-directory this-dir]
|
||||||
[sandbox-output o]
|
[sandbox-output o]
|
||||||
[sandbox-error-output current-output-port])
|
[sandbox-error-output current-output-port]
|
||||||
|
[sandbox-eval-limits '(2 10)])
|
||||||
(define exn #f)
|
(define exn #f)
|
||||||
(define thd #f)
|
(define thd #f)
|
||||||
(define (run)
|
(define (run)
|
||||||
|
@ -54,8 +55,7 @@
|
||||||
(call-with-output-file (car m) #:exists 'truncate
|
(call-with-output-file (car m) #:exists 'truncate
|
||||||
(lambda (o) (display (cdr m) o))))
|
(lambda (o) (display (cdr m) o))))
|
||||||
(set! thd (thread run))
|
(set! thd (thread run))
|
||||||
(t (with-limits 2 #f
|
(t (if len-to-read (read-string len-to-read i) (port->string i))
|
||||||
(if len-to-read (read-string len-to-read i) (port->string i)))
|
|
||||||
=> expected)
|
=> expected)
|
||||||
(t (begin (kill-thread thd) (cond [exn => raise] [else #t])))
|
(t (begin (kill-thread thd) (cond [exn => raise] [else #t])))
|
||||||
(for ([m more])
|
(for ([m more])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user