Subject: [PATCH 45/51] gnu: emacs-racket-mode: Fix tests.

From: Nicolas Graves <[email-masked]>
Date: Thu, 20 Mar 2025 11:08:53 +0100

* 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(-)

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/")
-- 
2.48.1