[bug#77391,v5,4/4] gnu: emacs-ellama: Enable tests.

Message ID 3ddd0230d0f30c04ec3181c6d79ab1a2bfd2cb7b.1743685858.git.suhail@bayesians.ca
State New
Headers
Series gnu: emacs-ellama: Update to 1.8.1. |

Commit Message

Suhail Singh April 2, 2025, 2:42 p.m. UTC
  * gnu/packages/emacs-xyz.scm (emacs-ellama)[arguments]: Enable tests; skip
failing.

Change-Id: I1b468c7b30ad35ae553d354ef63da2d4d1c056a7
---
 gnu/packages/emacs-xyz.scm | 13 +++++++++++++
 1 file changed, 13 insertions(+)
  

Patch

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 7513bbf68e..ac5ae3002a 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -5789,6 +5789,19 @@  (define-public emacs-ellama
               (sha256 (base32
                        "1019vwrm95ck2gi29mvwd7sy753zgwa3addw2x0qbhvb3r53620v"))))
     (build-system emacs-build-system)
+    (arguments
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'disable-failing-tests
+                 (lambda _
+                   (substitute* (find-files "tests/" "\\.el$")
+                     (("\\(ert-deftest test-ellama-context-element-extract-info-node .*" all)
+                      (string-append all "(skip-unless nil)\n"))))))
+           #:tests? #t
+           #:test-command #~(list "emacs" "-Q" "--batch"
+                                  "-l" "ellama.el"
+                                  "-l" "tests/test-ellama.el"
+                                  "-f" "ert-run-tests-batch-and-exit")))
     (propagated-inputs (list emacs-compat emacs-llm emacs-plz emacs-transient))
     (home-page "https://github.com/s-kostyaev/ellama")
     (synopsis "Tool for interacting with LLMs")