diff --git a/tests/init-tests.el b/tests/init-tests.el index 6b0f443..be494f5 100644 --- a/tests/init-tests.el +++ b/tests/init-tests.el @@ -14,6 +14,13 @@ (proto (if no-ssl "http" "https"))) (add-to-list 'package-archives (cons "melpa" (concat proto "://melpa.org/packages/")) t)) +(condition-case nil + (package-initialize) + (error (progn + (message "Retrying in 5 secs...") + (sleep-for 5) + (package-initialize)))) + (package-initialize) ;; Optionally: bootstrap use-package for declarative package specs @@ -25,7 +32,12 @@ ;; Bootstrap ert-async (unless (package-installed-p 'ert-async) - (package-refresh-contents) + (condition-case nil + (package-refresh-contents) + (error (progn + (message "Retrying in 5 secs...") + (sleep-for 5) + (package-refresh-contents)))) (package-install 'ert-async)) (eval-when-compile (require 'ert-async))