guix_mirror_bot pushed a commit to branch emacs-team
in repository guix.
commit 2f174a8c984ebd476d9da7b37911ac91370d86a6
Author: Liliana Marie Prikler <[email protected]>
AuthorDate: Sun Mar 16 17:52:51 2025 +0100
gnu: emacs-lsp-mode: Fix tests.
* gnu/packages/emacs-xyz.scm (emacs-lsp-mode)[arguments]: Add
#:test-command.
<#:phases>: Add ‘skip-failing-tests’ and ‘set-home’.
[native-inputs]: Add emacs-deferred, emacs-el-mock, and emacs-ert-runner.
---
gnu/packages/emacs-xyz.scm | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index f339933023..17e776c2aa 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -34272,6 +34272,8 @@ the standard @code{Dockerfile} file format.")
(arguments
(list
#:emacs emacs ;need libxml support
+ #:test-command #~(list "ert-runner" "-L" "." "-L" "clients"
+ "-t" "!no-win" "-t" "!org")
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'move-clients-libraries
@@ -34281,6 +34283,28 @@ the standard @code{Dockerfile} file format.")
(for-each (lambda (f)
(install-file f "."))
(find-files "clients/" "\\.el$"))))
+ (add-before 'check 'skip-failing-tests
+ (lambda _
+ (substitute* "test/lsp-common-test.el"
+ (("\\(require 'elenv" all)
+ (string-append all " nil t"))
+ (("\\(ert-deftest lsp--path-to-uri-1 .*" all)
+ (string-append all "(skip-unless (featurep 'elenv))"))
+ (("\\(ert-deftest lsp-byte-compilation-test .*" all)
+ (string-append all "(skip-unless nil)"))
+ (("\\(ert-deftest lsp--build-.*-response-test-[34] .*" all)
+ (string-append all "(skip-unless nil)")))
+ (substitute* "test/lsp-mode-test.el"
+ (("\\(ert-deftest lsp--merge-results .*" all)
+ (string-append all "(skip-unless nil)")))
+ (substitute* "test/lsp-integration-test.el"
+ (("\\(ert-deftest lsp-.*-hover-request(-tick)? .*" all)
+ (string-append all "(skip-unless nil)"))
+ (("\\(ert-deftest lsp-test-current-buffer-mode .*" all)
+ (string-append all "(skip-unless nil)")))
+ (delete-file "test/lsp-clangd-test.el")))
+ (add-before 'check 'set-home
+ (lambda _ (setenv "HOME" (getenv "TMPDIR"))))
(add-after 'unpack 'enable-plists
(lambda _
(substitute* "lsp-protocol.el"
@@ -34302,6 +34326,9 @@ the standard @code{Dockerfile} file format.")
emacs-hydra
emacs-markdown-mode
emacs-spinner))
+ (native-inputs (list emacs-deferred
+ emacs-el-mock
+ emacs-ert-runner))
(home-page "https://emacs-lsp.github.io/lsp-mode/")
(synopsis "Emacs client and library for the Language Server Protocol")
(description