[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 01/02: Disable REPL server tests if no threads
From: |
Andy Wingo |
Subject: |
[Guile-commits] 01/02: Disable REPL server tests if no threads |
Date: |
Wed, 1 Mar 2017 06:34:34 -0500 (EST) |
wingo pushed a commit to branch stable-2.0
in repository guile.
commit 64a8785089aea211338b3fffbaa9afe817416512
Author: Andy Wingo <address@hidden>
Date: Wed Mar 1 12:19:39 2017 +0100
Disable REPL server tests if no threads
* test-suite/tests/00-repl-server.test (call-with-repl-server): The REPL
server needs threads so don't bother testing if we have no threads.
Also, prevent SIGPIPE from killing the parent process.
---
test-suite/tests/00-repl-server.test | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/test-suite/tests/00-repl-server.test
b/test-suite/tests/00-repl-server.test
index 4b5ec0c..8570ca3 100644
--- a/test-suite/tests/00-repl-server.test
+++ b/test-suite/tests/00-repl-server.test
@@ -32,6 +32,10 @@ socket connected to that server."
(false-if-exception
(delete-file (sockaddr:path sockaddr)))
+ ;; The REPL server requires threads.
+ (unless (provided? 'threads)
+ (throw 'unsupported))
+
(match (primitive-fork)
(0
(dynamic-wind
@@ -51,6 +55,7 @@ socket connected to that server."
(lambda ()
(primitive-exit 0))))
(pid
+ (sigaction SIGPIPE SIG_IGN)
(dynamic-wind
(const #t)
(lambda ()
@@ -71,7 +76,8 @@ socket connected to that server."
(proc client-socket))
(lambda ()
(false-if-exception (close-port client-socket))
- (false-if-exception (kill pid SIGTERM))))))))
+ (false-if-exception (kill pid SIGTERM))
+ (sigaction SIGPIPE SIG_DFL)))))))
(define-syntax-rule (with-repl-server client-socket body ...)
"Evaluate BODY... in a context where CLIENT-SOCKET is bound to a