Skip to content

Commit

Permalink
Disable parallelism in scheduling-order tests
Browse files Browse the repository at this point in the history
* tests/basic.scm (assert-run-fibers-terminates): Allow keyword args to
  run-fibers.
  (run-order, wakeup-order): Disable parallelism.
  • Loading branch information
wingo committed Jan 8, 2017
1 parent 8aa6ac0 commit 011fae3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/basic.scm
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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)
Expand All @@ -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)

Expand Down

0 comments on commit 011fae3

Please sign in to comment.