diff options
| author | Andy Wingo <wingo@pobox.com> | 2017-01-08 17:18:40 +0100 |
|---|---|---|
| committer | Andy Wingo <wingo@pobox.com> | 2017-01-08 17:18:40 +0100 |
| commit | 011fae3dd981a7b074f82d9f76e3913276629794 (patch) | |
| tree | cdc627efee40d6ba37d8638d38337a0fb4866fb3 | |
| parent | create-fiber always captures dynamic state (diff) | |
| download | guile-fibers-011fae3dd981a7b074f82d9f76e3913276629794.tar.gz | |
Disable parallelism in scheduling-order tests
* tests/basic.scm (assert-run-fibers-terminates): Allow keyword args to
run-fibers.
(run-order, wakeup-order): Disable parallelism.
| -rw-r--r-- | tests/basic.scm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/basic.scm b/tests/basic.scm index ac1fa8a..dbc0e50 100644 --- a/tests/basic.scm +++ b/tests/basic.scm @@ -40,12 +40,12 @@ exp (format #t "ok\n"))) -(define-syntax-rule (assert-run-fibers-terminates exp) +(define-syntax-rule (assert-run-fibers-terminates exp kw ...) (begin (format #t "assert run-fibers on ~s terminates: " 'exp) (force-output) (let ((start (get-internal-real-time))) - (call-with-values (lambda () (run-fibers (lambda () exp))) + (call-with-values (lambda () (run-fibers (lambda () exp) kw ...)) (lambda vals (format #t "ok (~a s)\n" (/ (- (get-internal-real-time) start) 1.0 internal-time-units-per-second)) @@ -116,7 +116,7 @@ (error "bad run order" run-order n)) (set! run-order (1+ n))))) (iota count))) - (assert-run-fibers-terminates (test-run-order 10))) + (assert-run-fibers-terminates (test-run-order 10) #:parallelism 1)) (let ((run-order 0)) (define (test-wakeup-order count) @@ -127,7 +127,7 @@ (error "bad run order" run-order n)) (set! run-order (1+ n))))) (iota count))) - (assert-run-fibers-terminates (test-wakeup-order 10))) + (assert-run-fibers-terminates (test-wakeup-order 10) #:parallelism 1)) (assert-run-fibers-returns (1) 1) |
