Subject: [PATCH] Enable tests for some Emacs packages.
From: Brian Leung <[email-masked]>
To: [email-masked]
Date: Tue, 3 Sep 2019 23:41:29 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

See attached.
From 12d7696af7f29c0edc3da3ad328f14e2b4c1439c Mon Sep 17 00:00:00 2001
From: Brian Leung <[email-masked]>
Date: Tue, 3 Sep 2019 03:50:11 +0200
Subject: [PATCH 1/8] gnu: Enable tests for emacs-evil-multiedit.

* gnu/packages/emacs-xyz.scm (emacs-evil-multiedit): Enable tests.
[inputs]: Add emacs-ert-runner.
---
 gnu/packages/emacs-xyz.scm | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index be88802071..7a9cd59bc7 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -13920,6 +13920,18 @@ describing the key binding changes.")
     (propagated-inputs
      `(("emacs-evil" ,emacs-evil)
        ("emacs-iedit" ,emacs-iedit)))
+    (native-inputs
+     `(("emacs-ert-runner" ,emacs-ert-runner)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'fix-makefile
+           (lambda _
+             (substitute* "Makefile"
+               (("@cask exec ") ""))
+             #t)))
+       #:tests? #t
+       #:test-command '("make" "test")))
     (home-page
      "https://github.com/hlissner/evil-multiedit")
     (synopsis "Multiple cursors for Evil mode")
-- 
2.23.0

From 2339e841b33868fdfe4f5e02311d4d265d2de038 Mon Sep 17 00:00:00 2001
From: Brian Leung <[email-masked]>
Date: Tue, 3 Sep 2019 04:44:28 +0200
Subject: [PATCH 2/8] gnu: emacs-evil-owl: Update to 0.0.1-3.24e5f43.

* gnu/packages/emacs-xyz.scm (emacs-evil-owl): Update to 0.0.1-3.24e5f43.
[source]: Enable tests.
---
 gnu/packages/emacs-xyz.scm | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 7a9cd59bc7..717349781a 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -6736,8 +6736,8 @@ end of a line and increment or decrement it.")
       (license license:gpl3+))))
 
 (define-public emacs-evil-owl
-  (let ((commit "e8fe5b2f745e36db04cb71eb689bf91c5409614f")
-        (revision "2"))
+  (let ((commit "24c5f43df375194386344e69bc720ea3986c9510")
+        (revision "3"))
     (package
       (name "emacs-evil-owl")
       (version (git-version "0.0.1" revision commit))
@@ -6750,10 +6750,13 @@ end of a line and increment or decrement it.")
          (file-name (git-file-name name version))
          (sha256
           (base32
-           "1g7kplna62f271135mnjdbvxk2ayx7m4gvd6l86d2394alx16nhq"))))
+           "0bqzch14whlmrcasakah3psrzswvkzd7mmi8hx5s64kfp29wbdhi"))))
       (build-system emacs-build-system)
       (propagated-inputs
        `(("emacs-evil" ,emacs-evil)))
+      (arguments
+       `(#:tests? #t
+         #:test-command '("make" "test")))
       (home-page "https://github.com/mamapanda/evil-owl")
       (synopsis "Preview candidates when using Evil registers and marks")
       (description
-- 
2.23.0

From 2df27cf787dafb8511867b48ee61271fefd3a21d Mon Sep 17 00:00:00 2001
From: Brian Leung <[email-masked]>
Date: Tue, 3 Sep 2019 08:31:01 +0200
Subject: [PATCH 3/8] gnu: Enable tests for emacs-elisp-demos.

* gnu/packages/emacs-xyz.scm (emacs-elisp-demos): Enable tests.
---
 gnu/packages/emacs-xyz.scm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 717349781a..972ec717b1 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -3091,7 +3091,10 @@ for Flow files.")
         (base32
          "0lybadq66bl4snkwph9i1y0qxln29wyfjn222ii3nfwany28cj66"))))
     (build-system emacs-build-system)
-    (arguments '(#:include '("\\.el$" "\\.org$")))
+    (arguments
+     `(#:include '("\\.el$" "\\.org$")
+       #:tests? #t
+       #:test-command '("make" "test")))
     (home-page "https://github.com/xuchunyang/elisp-demos/")
     (synopsis "Enhance @code{*Help*} buffers with additional examples")
     (description
-- 
2.23.0

From 6d98c68facaab048bac204f06e0b5a78a8c66de0 Mon Sep 17 00:00:00 2001
From: Brian Leung <[email-masked]>
Date: Tue, 3 Sep 2019 08:47:14 +0200
Subject: [PATCH 5/8] gnu: Enable tests for emacs-evil-expat.

* gnu/packages/emacs-xyz.scm (emacs-evil-expat): Enable tests.
---
 gnu/packages/emacs-xyz.scm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 7734dc5795..6fc932ce7a 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -6926,6 +6926,9 @@ aligning text objects based on separators.")
            "0872ix682hkdz0k8pn6sb54rqkx00rz5fxpd5j2snx406yagpaxz"))))
       (build-system emacs-build-system)
       (propagated-inputs `(("emacs-evil" ,emacs-evil)))
+      (arguments
+       `(#:tests? #t
+         #:test-command '("make" "test")))
       (home-page "https://github.com/edkolev/evil-expat")
       (synopsis "Extra @code{ex} commands for @code{evil-mode}")
       (description
-- 
2.23.0

From b4400de2afb401dc5f1355742bce5dd047bc2ebd Mon Sep 17 00:00:00 2001
From: Brian Leung <[email-masked]>
Date: Tue, 3 Sep 2019 08:43:42 +0200
Subject: [PATCH 4/8] gnu: Enable tests for emacs-evil-exchange.

* gnu/packages/emacs-xyz.scm (emacs-evil-exchange): Enable tests.
[native-inputs]: Add emacs-ert-runner.
---
 gnu/packages/emacs-xyz.scm | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 972ec717b1..7734dc5795 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -6786,6 +6786,17 @@ a popup window for previewing candidates.")
            "0bjpn4yqig17ddym6wqq5fm1b294q74hzcbj9a6gs97fqiwf88xa"))))
       (build-system emacs-build-system)
       (propagated-inputs `(("emacs-evil" ,emacs-evil)))
+      (native-inputs `(("emacs-ert-runner" ,emacs-ert-runner)))
+      (arguments
+       `(#:phases
+         (modify-phases %standard-phases
+           (add-before 'check 'fix-makefile
+             (lambda _
+               (substitute* "Makefile"
+                 (("cask exec ") ""))
+               #t)))
+         #:tests? #t
+         #:test-command '("make" "test")))
       (home-page "https://github.com/Dewdrops/evil-exchange")
       (synopsis "Exchange text easily within Evil")
       (description
-- 
2.23.0

From 25c124b59de2aca596c360d4b0a59cdb5a5b9964 Mon Sep 17 00:00:00 2001
From: Brian Leung <[email-masked]>
Date: Tue, 3 Sep 2019 08:55:32 +0200
Subject: [PATCH 6/8] gnu: Enable tests for emacs-sudo-edit.

* gnu/packages/emacs-xyz.scm (emacs-sudo-edit): Enable tests.
[native-inputs]: Add emacs-undercover.
---
 gnu/packages/emacs-xyz.scm | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 6fc932ce7a..24c8176318 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -3129,11 +3129,10 @@ completion of relevant keywords.")
 
 (define-public emacs-sudo-edit
   (let ((commit "cc3d478937b1accd38742bfceba92af02ee9357d")
-        (version "0.1.0")
         (revision "6"))
     (package
       (name "emacs-sudo-edit")
-      (version (git-version version revision commit))
+      (version (git-version "0.1.0" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -3145,6 +3144,18 @@ completion of relevant keywords.")
           (base32
            "1qv58x5j5a3v1s2ylhck1ykbfclq0mbi0gsvaql3nyv8cxazqlwl"))))
       (build-system emacs-build-system)
+      (native-inputs
+       `(("emacs-undercover" ,emacs-undercover)))
+      (arguments
+       `(#:phases
+         (modify-phases %standard-phases
+           (add-before 'check 'fix-makefile
+             (lambda _
+               (substitute* "Makefile"
+                 (("\\$\\(CASK\\) exec ") ""))
+               #t)))
+         #:tests? #t
+         #:test-command '("make" "test")))
       (home-page "https://github.com/nflath/sudo-edit/")
       (synopsis "Open files as another user")
       (description
-- 
2.23.0

From bc75830a57e5825c44dcafb59f82d1ecbce9fa13 Mon Sep 17 00:00:00 2001
From: Brian Leung <[email-masked]>
Date: Tue, 3 Sep 2019 17:55:09 +0200
Subject: [PATCH 7/8] gnu: Enable tests for emacs-org-ql.

* gnu/packages/emacs-xyz.scm (emacs-org-ql): Enable tests.
---
 gnu/packages/emacs-xyz.scm | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 24c8176318..117474a0d2 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -11345,6 +11345,11 @@ timestamps by providing a @code{ts} struct.")
        ("emacs-ts" ,emacs-ts)
        ("emacs-org" ,emacs-org)
        ("emacs-dash" ,emacs-dash)))
+    (native-inputs
+     `(("emacs-buttercup" ,emacs-buttercup)))
+    (arguments
+     `(#:tests? #t
+       #:test-command '("buttercup" "-L" ".")))
     (home-page "https://github.com/alphapapa/org-ql/")
     (synopsis "Query language for Org buffers")
     (description "This package provides a Lispy query language for Org
-- 
2.23.0

From f3ad77c97cb267204f29f7ed204d1f29ce5ad4eb Mon Sep 17 00:00:00 2001
From: Brian Leung <[email-masked]>
Date: Tue, 3 Sep 2019 22:55:54 +0200
Subject: [PATCH 8/8] gnu: Enable tests for emacs-evil-traces.

* gnu/packages/emacs-xyz.scm (emacs-evil-traces): Enable tests.
---
 gnu/packages/emacs-xyz.scm | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 117474a0d2..387e2143ea 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -17594,6 +17594,17 @@ corresponding Evil keys.")
       (build-system emacs-build-system)
       (propagated-inputs
        `(("emacs-evil" ,emacs-evil)))
+      (arguments
+       `(#:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'set-shell
+             ;; Setting the SHELL environment variable is required for the tests
+             ;; to find sh.
+             (lambda _
+               (setenv "SHELL" (which "sh"))
+               #t)))
+         #:tests? #t
+         #:test-command '("make" "test")))
       (home-page "https://github.com/mamapanda/evil-traces")
       (synopsis "Visual hints for @code{evil-ex}")
       (description "This package adds visual hints to certain @code{ex}
-- 
2.23.0