mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-29 19:30:36 +02:00
Skip tests that require alarm or SIGALRM when not supported
* test-suite/tests/sandbox.test ("time limit"): skip if unsupported * test-suite/tests/time.test ("gmtime"): skip if unsupported
This commit is contained in:
parent
d512ec0657
commit
12861e2bc2
2 changed files with 7 additions and 1 deletions
|
@ -40,13 +40,17 @@
|
|||
|
||||
(with-test-prefix "time limit"
|
||||
(pass-if "0 busy loop"
|
||||
(unless (defined? 'SIGALRM) (throw 'unsupported))
|
||||
(call-with-time-limit 0 busy-loop (lambda () #t)))
|
||||
(pass-if "0.001 busy loop"
|
||||
(unless (defined? 'SIGALRM) (throw 'unsupported))
|
||||
(call-with-time-limit 0.001 busy-loop (lambda () #t)))
|
||||
(pass-if "0 sleep"
|
||||
(unless (defined? 'SIGALRM) (throw 'unsupported))
|
||||
(call-with-time-limit 0 (lambda () (usleep-loop #e1e6) #f)
|
||||
(lambda () #t)))
|
||||
(pass-if "0.001 sleep"
|
||||
(unless (defined? 'SIGALRM) (throw 'unsupported))
|
||||
(call-with-time-limit 0.001 (lambda () (usleep-loop #e1e6) #f)
|
||||
(lambda () #t))))
|
||||
|
||||
|
|
|
@ -29,7 +29,9 @@
|
|||
|
||||
(for-each (lambda (t)
|
||||
(pass-if (list "in another thread after error" t)
|
||||
(or (provided? 'threads) (throw 'unsupported))
|
||||
(unless (and (provided? 'threads)
|
||||
(defined? 'alarm))
|
||||
(throw 'unsupported))
|
||||
|
||||
(alarm 5)
|
||||
(false-if-exception (gmtime t))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue