Skip to content

Commit

Permalink
tests: Skip expensive speedup test/benchmark by default.
Browse files Browse the repository at this point in the history
With this change, ‘make check’ runs in 230s on x86_64-linux-gnu (4-core
CPU) instead of 880s.

* tests/speedup.scm <top level>: Exit with 77 when
‘FIBERS_EXPENSIVE_TESTS’ is unset.
  • Loading branch information
civodul committed Nov 23, 2024
1 parent 1a7f13f commit 6c7347c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/speedup.scm
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@
(lp (1+ i) (make-vector (- words 2) #f))
x)))

(unless (getenv "FIBERS_EXPENSIVE_TESTS")
(newline (current-error-port))
(format (current-error-port) "Skipping expensive test/benchmark.~%")
(format (current-error-port) "\
Set the 'FIBERS_EXPENSIVE_TESTS' environment variable to run it.~%")
(newline (current-error-port))
(exit 77))

(measure-speedup
(do-times 100000 (spawn-fiber (lambda () #t) #:parallel? #t)))
(measure-speedup
Expand Down

0 comments on commit 6c7347c

Please sign in to comment.