gnu: emacs-ess: Fix build.

* gnu/packages/statistics.scm (emacs-ess)[arguments]<#:phases>: Fix syntax
category for a skipped a test.  Extend syntax to check for tests in more files.

Change-Id: I7344637107920288995893dec2b1e6642d11f95e
This commit is contained in:
Nicolas Goaziou 2024-06-19 08:11:38 +02:00
parent 5aba852c18
commit da1f3aff2e
No known key found for this signature in database
GPG Key ID: DA00B4F048E92F2D

View File

@ -6922,34 +6922,33 @@ Java package that provides routines for various statistical distributions.")
(let-syntax (let-syntax
((disable-tests ((disable-tests
(syntax-rules () (syntax-rules ()
((_ file ()) ((_ ())
(syntax-error "test names list must not be empty")) (syntax-error "test names list must not be empty"))
((_ file (test-name ...)) ((_ (test-name ...))
(substitute* file (substitute* (find-files "test" "\\.el$")
(((string-append "^\\(ert-deftest " test-name ".*") (((string-append "^\\(ert-deftest " test-name ".*")
all) all)
(string-append all "(skip-unless nil)\n")) (string-append all "(skip-unless nil)\n"))
...)))) ...))))
(disable-etests ;different test syntax (disable-etests ;different test syntax
(syntax-rules () (syntax-rules ()
((_ file ()) ((_ ())
(syntax-error "test names list must not be empty")) (syntax-error "test names list must not be empty"))
((_ file (test-name ...)) ((_ (test-name ...))
(emacs-batch-edit-file file (for-each
'(progn (lambda (file)
(mapc (lambda (test) (emacs-batch-edit-file file
(goto-char (point-min)) '(progn
(search-forward (dolist (test (list test-name ...))
(format "etest-deftest %s " test)) (goto-char (point-min))
(beginning-of-line) (let ((s (format "etest-deftest %s "
(kill-sexp)) test)))
(list test-name ...)) (when (search-forward s nil t)
(basic-save-buffer))))))) (beginning-of-line)
(disable-tests (list "test/ess-test-inf.el" (kill-sexp))))
"test/ess-test-r.el") (basic-save-buffer))))
("ess--derive-connection-path" (find-files "test" "\\.el$"))))))
;; Looks like an off-by-one error. (disable-tests ("ess--derive-connection-path"
"ess--command-browser-unscoped-essr"
"ess-eval-line-test" "ess-eval-line-test"
"ess-eval-region-test" "ess-eval-region-test"
"ess-mock-remote-process" "ess-mock-remote-process"
@ -6957,9 +6956,10 @@ Java package that provides routines for various statistical distributions.")
"ess-r-load-ESSR-github-fetch-yes" "ess-r-load-ESSR-github-fetch-yes"
"ess-set-working-directory-test" "ess-set-working-directory-test"
"ess-test-r-startup-directory")) "ess-test-r-startup-directory"))
(disable-etests "test/ess-test-r-eval.el" (disable-etests ("ess-r-eval-ns-env-roxy-tracebug-test"
("ess-r-eval-ns-env-roxy-tracebug-test" "ess-r-eval-sink-freeze-test"
"ess-r-eval-sink-freeze-test"))))) ;; Looks like an off-by-one error.
"ess--command-browser-unscoped-essr")))))
(replace 'check (replace 'check
(lambda* (#:key tests? #:allow-other-keys) (lambda* (#:key tests? #:allow-other-keys)
(when tests? (invoke "make" "test")))))))) (when tests? (invoke "make" "test"))))))))