From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45831) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d9PJe-0005Le-LV for guix-patches@gnu.org; Sat, 13 May 2017 01:10:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d9PJb-0000qv-FQ for guix-patches@gnu.org; Sat, 13 May 2017 01:10:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:38955) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d9PJb-0000qW-4W for guix-patches@gnu.org; Sat, 13 May 2017 01:10:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d9PJa-00086l-IC for guix-patches@gnu.org; Sat, 13 May 2017 01:10:02 -0400 Subject: bug#26889: Tests for emacs-clojure-mode Resent-Message-ID: Message-Id: MIME-Version: 1.0 From: Arun Isaac Date: Sat, 13 May 2017 10:38:22 +0530 In-reply-to: <8737c97nmq.fsf@gnu.org> References: <864f5ab5.AEAAKEHRjrgAAAAAAAAAAAOtUOAAAAACwQwAAAAAAAW9WABZFK4O@mailjet.com> <8737c97nmq.fsf@gnu.org> Content-Type: multipart/mixed; boundary="=-=-=" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 26889@debbugs.gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Here is another patch set with the suggested changes incorporated. = --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=series.patch >From 8947eda0984e3d444b0960e37e92ac622fc9ac9a Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Thu, 11 May 2017 23:23:30 +0530 Subject: [PATCH 1/4] gnu: Add emacs-ansi. * gnu/packages/emacs.scm (emacs-ansi): New variable. --- gnu/packages/emacs.scm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 21120b331..cab7f8cf8 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -4639,3 +4639,30 @@ addition of surrounding pairs, such as parantheses and quotes, in evil mode.") comment out lines of code in evil mode. It provides @code{gcc} to comment out lines, and @code{gc} to comment out the target of a motion.") (license license:gpl3+))) + +;; Tests for emacs-ansi have a circular dependency with ert-runner, and +;; therefore cannot be run +(define-public emacs-ansi + (package + (name "emacs-ansi") + (version "0.4.1") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/rejeep/ansi.el/archive/v" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "13jj4vbi98j3p17hs99bmy7g21jd5h4v3wpxk4pkvhylm3bfwjw8")))) + (build-system emacs-build-system) + (propagated-inputs + `(("emacs-dash" ,emacs-dash) + ("emacs-s" ,emacs-s))) + (home-page "https://github.com/rejeep/ansi.el") + (synopsis "Convert strings to ANSI") + (description "@code{emacs-ansi} defines functions that turns simple +strings to ANSI strings. Turning a string into an ANSI string can be to add +color to a text, add color in the background of a text or adding a style, such +as bold, underscore or italic.") + (license license:gpl3+))) -- 2.12.2 >From 60c83587fbccc3ca096f21772c560642c6265678 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Thu, 11 May 2017 23:24:43 +0530 Subject: [PATCH 2/4] gnu: Add emacs-commander. * gnu/packages/emacs.scm (emacs-commander): New variable. --- gnu/packages/emacs.scm | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index cab7f8cf8..b1896fdba 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -4666,3 +4666,29 @@ strings to ANSI strings. Turning a string into an ANSI string can be to add color to a text, add color in the background of a text or adding a style, such as bold, underscore or italic.") (license license:gpl3+))) + +;; Tests for emacs-commander have a circular dependency with ert-runner, and +;; therefore cannot be run +(define-public emacs-commander + (package + (name "emacs-commander") + (version "0.7.0") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/rejeep/commander.el/archive/v" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "196s2i15z7gwxa97l1wkxvjnfmj5n38wwm6d3g4zz15l2vqggc2y")))) + (build-system emacs-build-system) + (propagated-inputs + `(("emacs-dash" ,emacs-dash) + ("emacs-f" ,emacs-f) + ("emacs-s" ,emacs-s))) + (home-page "https://github.com/rejeep/commander.el") + (synopsis "Emacs command line parser") + (description "@code{emacs-commander} provides command line parsing for +Emacs.") + (license license:gpl3+))) -- 2.12.2 >From b4fa1ebbae2b414139fbdfb3bb44439ae6bfdb0c Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Thu, 11 May 2017 23:25:27 +0530 Subject: [PATCH 3/4] gnu: Add ert-runner. * gnu/packages/emacs.scm (ert-runner): New variable. --- gnu/packages/emacs.scm | 64 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 63 insertions(+), 1 deletion(-) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index b1896fdba..a9dd3db6c 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -92,7 +92,8 @@ #:use-module (gnu packages gd) #:use-module (gnu packages fontutils) #:use-module (guix utils) - #:use-module (srfi srfi-1)) + #:use-module (srfi srfi-1) + #:use-module (ice-9 match)) (define-public emacs (package @@ -4692,3 +4693,64 @@ as bold, underscore or italic.") (description "@code{emacs-commander} provides command line parsing for Emacs.") (license license:gpl3+))) + +;; Tests for ert-runner have a circular dependency with ecukes, and therefore +;; cannot be run +(define-public ert-runner + (let ((dependencies + `(("emacs-ansi" ,emacs-ansi) + ("emacs-commander" ,emacs-commander) + ("emacs-dash" ,emacs-dash) + ("emacs-f" ,emacs-f) + ("emacs-s" ,emacs-s) + ("emacs-shut-up" ,emacs-shut-up)))) + (package + (name "ert-runner") + (version "0.7.0") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/rejeep/ert-runner.el/archive/v" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1657nck9i96a4xgl8crfqq0s8gflzp21pkkzwg6m3z5npjxklgwp")))) + (build-system emacs-build-system) + (inputs dependencies) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'install 'install-executable + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (substitute* "bin/ert-runner" + (("ERT_RUNNER=\"\\$\\(dirname \\$\\(dirname \\$0\\)\\)") + (string-append "ERT_RUNNER=\"" out + "/share/emacs/site-lisp/guix.d/" + ,name "-" ,version))) + (install-file "bin/ert-runner" (string-append out "/bin")) + (wrap-program (string-append out "/bin/ert-runner") + (list "EMACSLOADPATH" ":" '= + (append + ,(match dependencies + (((labels packages) ...) + `(map (lambda (label package version) + (string-append (assoc-ref inputs label) + "/share/emacs/site-lisp/guix.d/" + (string-drop package 6) + "-" version)) + ',labels + ',(map package-name packages) + ',(map package-version packages)))) + ;; empty element to include the default load path as + ;; determined by emacs' standard initialization + ;; procedure + (list "")))) + #t)))))) + (home-page "https://github.com/rejeep/ert-runner.el") + (synopsis "Opinionated Ert testing workflow") + (description "@code{ert-runner} is a tool for Emacs projects tested +using ERT. It assumes a certain test structure setup and can therefore make +running tests easier.") + (license license:gpl3+)))) -- 2.12.2 >From 8dc79fafe9e3de005a44524b2ad918ca13f75732 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Thu, 11 May 2017 23:28:53 +0530 Subject: [PATCH 4/4] gnu: emacs-clojure-mode: Enable tests. * gnu/packages/emacs.scm (emacs-clojure-mode)[arguments]: Add 'check' phase. [native-inputs]: Add emacs-dash, emacs-s and ert-runner. --- gnu/packages/emacs.scm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index a9dd3db6c..4f5988b75 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -2876,6 +2876,16 @@ S-expression.") (base32 "117mvjqh4nm8mvmwmmvy4qmkdg23ldlzk08y91g8b8ac8kxwqg81")))) (build-system emacs-build-system) + (native-inputs + `(("emacs-dash" ,emacs-dash) + ("emacs-s" ,emacs-s) + ("ert-runner" ,ert-runner))) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'install 'check + (lambda* (#:key inputs #:allow-other-keys) + (zero? (system* "ert-runner"))))))) (home-page "https://github.com/clojure-emacs/clojure-mode") (synopsis "Major mode for Clojure code") (description -- 2.12.2 --=-=-=--