diff options
author | Michael Gran <spk121@yahoo.com> | 2023-06-20 12:21:54 -0700 |
---|---|---|
committer | Michael Gran <spk121@yahoo.com> | 2025-03-30 20:11:47 -0700 |
commit | d512ec06575a44f3cbefae6524acb8e84791cd8e (patch) | |
tree | 246e3b543c30f8fb08b30e18e47ef488dd04d96e | |
parent | f187c46bd9c7b822799d1be56df19b3c24f17ecb (diff) | |
download | guile-d512ec06575a44f3cbefae6524acb8e84791cd8e.tar.gz |
Skip tests that require STATPROF when not supported
* test-suite/tests/statprof.test (when-implemented): throw unresolved
when SIGPROF unavailable
-rw-r--r-- | test-suite/tests/statprof.test | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/test-suite/tests/statprof.test b/test-suite/tests/statprof.test index 994d88269..0e99d8edd 100644 --- a/test-suite/tests/statprof.test +++ b/test-suite/tests/statprof.test @@ -36,15 +36,17 @@ ;; on platforms such as GNU/Hurd or Cygwin where `ITIMER_PROF' is is ;; currently unimplemented. (define-syntax-rule (when-implemented body ...) - (catch 'system-error - (lambda () - body ...) - (lambda args - (let ((errno (system-error-errno args))) - (false-if-exception (statprof-stop)) - (if (or (= errno ENOSYS) (= errno EINVAL)) - (throw 'unresolved) - (apply throw args)))))) + (begin + (unless (defined? 'SIGPROF) (throw 'unresolved)) + (catch 'system-error + (lambda () + body ...) + (lambda args + (let ((errno (system-error-errno args))) + (false-if-exception (statprof-stop)) + (if (or (= errno ENOSYS) (= errno EINVAL)) + (throw 'unresolved) + (apply throw args))))))) (pass-if-equal "return values" '(42 77) |