Actually run '00-repl-server.test'.
authorLudovic Courtès <ludo@gnu.org>
Sat, 7 Mar 2020 14:59:48 +0000 (15:59 +0100)
committerLudovic Courtès <ludo@gnu.org>
Sat, 7 Mar 2020 15:03:44 +0000 (16:03 +0100)
This is a followup to ddcab06f20525d975503d8d9611e02021fb0dff1.  Until
now the tests would always be marked as unresolved because TMPDIR was
removed before the client and server had been started.

* test-suite/tests/00-repl-server.test (call-with-repl-server): Remove
initial call to 'rmdir'.  Add calls to 'delete-file' and 'rmdir' in the
unwind handler.

test-suite/tests/00-repl-server.test

index ebc2cad11ad02a328ad77b5138cd438d2453002c..8c5713f4a5cce945239e886fc0ef45621a2a296e 100644 (file)
@@ -43,7 +43,6 @@ socket connected to that server."
          (sockaddr (make-socket-address AF_UNIX (string-append tmpdir "/repl-server")))
          (client-socket (socket AF_UNIX SOCK_STREAM 0)))
     (false-if-exception (delete-file (sockaddr:path sockaddr)))
-    (false-if-exception (rmdir tmpdir))
 
     ;; The REPL server requires thread. The test requires fork.
     (unless (and (provided? 'threads) (provided? 'fork))
@@ -90,6 +89,8 @@ socket connected to that server."
          (lambda ()
            (false-if-exception (close-port client-socket))
            (false-if-exception (kill pid SIGTERM))
+           (false-if-exception (delete-file (sockaddr:path sockaddr)))
+           (false-if-exception (rmdir tmpdir))
            (sigaction SIGPIPE SIG_DFL)))))))
 
 (define-syntax-rule (with-repl-server client-socket body ...)