[bug#77131,45/51] gnu: emacs-racket-mode: Fix tests.

Message ID 20250320100907.20485-45-ngraves@ngraves.fr
State New
Headers
Series [bug#77131,01/51] gnu: Add (gnu packages emacs-build) module. |

Commit Message

Nicolas Graves March 20, 2025, 10:08 a.m. UTC
  * gnu/packages/emacs-xyz.scm (emacs-racket-mode)
[arguments]{test-command}: Set it.
{phases}: Add phase 'pre-check and skip failing tests.
---
 gnu/packages/emacs-xyz.scm | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
  

Patch

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index ac254be614..a31809a61f 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -28089,7 +28089,18 @@  (define-public emacs-racket-mode
       (build-system emacs-build-system)
       (arguments
        (list
-        #:include #~(list "\\.el$" "\\.rkt$")))
+        #:include #~(list "\\.el$" "\\.rkt$")
+        #:test-command #~(list "make" "test")
+        #:phases
+        #~(modify-phases %standard-phases
+            (add-before 'check 'pre-check
+              (lambda _
+                (setenv "HOME" (dirname (getcwd)))
+                (substitute* "test/racket-tests.el"
+                  (("\\(ert-deftest racket-tests/(repl|run) .*" all)
+                   (string-append all "(skip-unless nil)"))))))))
+      (native-inputs
+       (list racket))
       (propagated-inputs
        (list emacs-faceup emacs-paredit emacs-pos-tip emacs-s))
       (home-page "https://www.racket-mode.com/")