mirror of
https://https.git.savannah.gnu.org/git/guix.git/
synced 2025-07-14 11:00:36 +02:00
gnu: emacs: Run tests.
Due to inheritance this enables tests on most of the Emacs packages. * gnu/packages/emacs.scm: (emacs-ert-selector): New function. (%selector): New variable. (emacs-minimal): Run tests. Change-Id: Ib5ffeae9b7f49b5f1a56d348c15ce4c4fb28f5ec Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
This commit is contained in:
parent
53d0900944
commit
fccc4fe53e
1 changed files with 44 additions and 1 deletions
|
@ -98,6 +98,42 @@
|
||||||
(srfi srfi-1)
|
(srfi srfi-1)
|
||||||
(ice-9 ftw))))
|
(ice-9 ftw))))
|
||||||
|
|
||||||
|
(define* (emacs-ert-selector excluded-tests #:key run-nativecomp run-expensive run-unstable)
|
||||||
|
"Create an ERT selector that excludes tests."
|
||||||
|
(string-append
|
||||||
|
"(not (or "
|
||||||
|
(if run-nativecomp
|
||||||
|
""
|
||||||
|
"(tag :nativecomp) ")
|
||||||
|
(if run-expensive
|
||||||
|
""
|
||||||
|
"(tag :expensive-test) ")
|
||||||
|
(if run-unstable
|
||||||
|
""
|
||||||
|
"(tag :unstable) ")
|
||||||
|
(string-join
|
||||||
|
(map
|
||||||
|
(lambda (test)
|
||||||
|
(string-append "\\\"" test "\\\""))
|
||||||
|
excluded-tests))
|
||||||
|
"))"))
|
||||||
|
|
||||||
|
(define %selector
|
||||||
|
(emacs-ert-selector
|
||||||
|
'("bytecomp--fun-value-as-head"
|
||||||
|
"esh-util-test/path/get-remote"
|
||||||
|
"esh-var-test/path-var/preserve-across-hosts"
|
||||||
|
"ffap-tests--c-path"
|
||||||
|
"find-func-tests--locate-macro-generated-symbols"
|
||||||
|
"grep-tests--rgrep-abbreviate-properties-darwin"
|
||||||
|
"grep-tests--rgrep-abbreviate-properties-gnu-linux"
|
||||||
|
"grep-tests--rgrep-abbreviate-properties-windows-nt-dos-semantics"
|
||||||
|
"grep-tests--rgrep-abbreviate-properties-windows-nt-sh-semantics"
|
||||||
|
"info-xref-test-makeinfo"
|
||||||
|
"man-tests-find-header-file"
|
||||||
|
"tab-bar-tests-quit-restore-window"
|
||||||
|
"tramp-test48-remote-load-path")))
|
||||||
|
|
||||||
(define-public emacs-minimal
|
(define-public emacs-minimal
|
||||||
(package
|
(package
|
||||||
(name "emacs-minimal")
|
(name "emacs-minimal")
|
||||||
|
@ -153,9 +189,9 @@
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list
|
(list
|
||||||
#:tests? #f ; no check target
|
|
||||||
#:modules (%emacs-modules build-system)
|
#:modules (%emacs-modules build-system)
|
||||||
#:configure-flags #~(list "--with-gnutls=no" "--disable-build-details")
|
#:configure-flags #~(list "--with-gnutls=no" "--disable-build-details")
|
||||||
|
#:make-flags #~(list (string-append "SELECTOR=" #$%selector))
|
||||||
#:phases
|
#:phases
|
||||||
#~(modify-phases %standard-phases
|
#~(modify-phases %standard-phases
|
||||||
(add-after 'unpack 'enable-elogind
|
(add-after 'unpack 'enable-elogind
|
||||||
|
@ -240,6 +276,13 @@
|
||||||
(substitute* (find-files "." "^Makefile\\.in$")
|
(substitute* (find-files "." "^Makefile\\.in$")
|
||||||
(("/bin/pwd")
|
(("/bin/pwd")
|
||||||
"pwd"))))
|
"pwd"))))
|
||||||
|
(add-after 'unpack 'fix-tests
|
||||||
|
(lambda* (#:key tests? inputs #:allow-other-keys)
|
||||||
|
(when tests?
|
||||||
|
(substitute* "test/src/process-tests.el"
|
||||||
|
(("/bin//sh") (search-input-file inputs "bin/sh")))
|
||||||
|
(substitute* "test/lisp/eshell/em-script-tests.el"
|
||||||
|
(("/usr/bin/env") (search-input-file inputs "bin/env"))))))
|
||||||
(add-after 'install 'install-site-start
|
(add-after 'install 'install-site-start
|
||||||
;; Use 'guix-emacs' in "site-start.el", which is used autoload the
|
;; Use 'guix-emacs' in "site-start.el", which is used autoload the
|
||||||
;; Elisp packages found in EMACSLOADPATH.
|
;; Elisp packages found in EMACSLOADPATH.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue