summaryrefslogtreecommitdiff
path: root/test/lisp/emacs-lisp/package-tests.el
diff options
context:
space:
mode:
Diffstat (limited to 'test/lisp/emacs-lisp/package-tests.el')
-rw-r--r--test/lisp/emacs-lisp/package-tests.el15
1 files changed, 6 insertions, 9 deletions
diff --git a/test/lisp/emacs-lisp/package-tests.el b/test/lisp/emacs-lisp/package-tests.el
index 2e4666e7fe3..5172b482cb0 100644
--- a/test/lisp/emacs-lisp/package-tests.el
+++ b/test/lisp/emacs-lisp/package-tests.el
@@ -376,22 +376,19 @@ Must called from within a `tar-mode' buffer."
"package-server" "package-server-buffer"
(executable-find "python2")
"package-test-server.py"))
- port)
+ (addr nil))
(unwind-protect
(progn
(with-current-buffer "package-server-buffer"
(should
(with-timeout (10 nil)
- (while (not port)
+ (while (not addr)
(accept-process-output nil 1)
(goto-char (point-min))
- (if (re-search-forward "Serving HTTP on .* port \\([0-9]+\\) "
- nil t)
- (setq port (match-string 1))))
- port)))
- (with-package-test (:basedir
- package-test-data-dir
- :location (format "http://0.0.0.0:%s/" port))
+ (when (re-search-forward "Server started, \\(.*\\)\n" nil t)
+ (setq addr (match-string 1))))
+ addr)))
+ (with-package-test (:basedir package-test-data-dir :location addr)
(list-packages)
(should package--downloads-in-progress)
(should mode-line-process)