From 1ee91bf89176251f6e399c8436dca0248cdd6f6b Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Tue, 24 May 2016 16:12:03 -0400 Subject: [PATCH] Allow network-stream-tests to work for out-of-tree builds * test/lisp/net/network-stream-tests.el (network-stream-tests--datadir): New defconst. (make-tls-server): Use it. --- test/lisp/net/network-stream-tests.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/test/lisp/net/network-stream-tests.el b/test/lisp/net/network-stream-tests.el index f30c92a1de5..9e21420dbbc 100644 --- a/test/lisp/net/network-stream-tests.el +++ b/test/lisp/net/network-stream-tests.el @@ -156,11 +156,16 @@ (should (equal (buffer-string) "foo\n"))) (delete-process server))) +(defconst network-stream-tests--datadir + (expand-file-name "test/data/net" source-directory)) + (defun make-tls-server (port) (start-process "gnutls" (generate-new-buffer "*tls*") "gnutls-serv" "--http" - "--x509keyfile" "data/net/key.pem" - "--x509certfile" "data/net/cert.pem" + "--x509keyfile" + (concat network-stream-tests--datadir "/key.pem") + "--x509certfile" + (concat network-stream-tests--datadir "/cert.pem") "--port" (format "%s" port))) (ert-deftest connect-to-tls-ipv4-wait () -- 2.39.2