Subject: [PATCH 09/51] gnu: emacs-org-noter: Disable tests.

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

* gnu/packages/emacs-xyz.scm (emacs-org-noter)
[native-inputs]: Add testing inputs: emacs-buttercup, emacs-djvu,
emacs-nov-el, emacs-org-roam, emacs-pdf-tools.
[arguments]{tests?}: Disable tests.
{test-command}: Define buttercup command.
{phases}: Set HOME.
---
 gnu/packages/emacs-xyz.scm | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 3f947888c7..b76fa48bba 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -35993,8 +35993,22 @@ (define-public emacs-org-noter
                    "modules/org-noter-org-roam.el"
                    "modules/org-noter-pdf.el")
            #:exclude
-           #~(list "emacs-devel.el")))
-    (native-inputs (list emacs-log4e emacs-with-simulated-input))
+           #~(list "emacs-devel.el")
+           #:tests? #f ; Multiple failures with "Not at a drawer"
+           #:test-command
+           #~(list "buttercup" "-L" ".")
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-before 'check 'pre-check
+                 (lambda _
+                   (setenv "HOME" (dirname (getcwd))))))))
+    (native-inputs (list emacs-buttercup
+                         emacs-djvu
+                         emacs-log4e
+                         emacs-nov-el
+                         emacs-org-roam
+                         emacs-pdf-tools
+                         emacs-with-simulated-input))
     (propagated-inputs (list emacs-org))
     (home-page "https://github.com/org-noter/org-noter")
     (synopsis "Synchronized, Org-mode, document annotator")
-- 
2.48.1