From 72f31a9be665f85828cbdc4b95c31af43831a1a0 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 19 Jan 2024 09:47:23 -0500 Subject: gnu: emacs-ess: Disable flaky "command-without-trailing-newline-test" test. * gnu/packages/statistics.scm [arguments]: Add new disable-etests syntax in 'skip-failing-tests phase, and use it to disable the 'command-without-trailing-newline-test' test. Change-Id: I99f52685691d86dc633fe6061f9ef3332159eb4e --- gnu/packages/statistics.scm | 51 ++++++++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 21 deletions(-) diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm index 512be4e9f0..3e55bcb5b9 100644 --- a/gnu/packages/statistics.scm +++ b/gnu/packages/statistics.scm @@ -12,7 +12,7 @@ ;;; Copyright © 2017 Alex Kost ;;; Copyright © 2018 Alex Branham ;;; Copyright © 2020 Tim Howes -;;; Copyright © 2021, 2022 Maxim Cournoyer +;;; Copyright © 2021, 2022, 2024 Maxim Cournoyer ;;; Copyright © 2021 Bonface Munyoki Kilyungi ;;; Copyright © 2021 Lars-Dominik Braun ;;; Copyright © 2021 Frank Pursel @@ -6819,7 +6819,9 @@ (define-public emacs-ess #~(modify-phases %standard-phases (delete 'configure) (add-before 'check 'skip-failing-tests - ;; XXX: Skip 10 failing tests (out of 187). + ;; The command-without-trailing-newline-test and other + ;; tests fail for unknown reasons (see: + ;; https://github.com/emacs-ess/ESS/issues/1272). (lambda _ (let-syntax ((disable-tests @@ -6831,7 +6833,22 @@ (define-public emacs-ess (((string-append "^\\(ert-deftest " test-name ".*") all) (string-append all "(skip-unless nil)\n")) - ...))))) + ...)))) + (disable-etests ;different test syntax + (syntax-rules () + ((_ file ()) + (syntax-error "test names list must not be empty")) + ((_ file (test-name ...)) + (emacs-batch-edit-file file + '(progn + (mapc (lambda (test) + (goto-char (point-min)) + (search-forward + (format "etest-deftest %s " test)) + (beginning-of-line) + (kill-sexp)) + (list test-name ...)) + (basic-save-buffer))))))) (disable-tests (list "test/ess-test-inf.el" "test/ess-test-r.el") ("ess--derive-connection-path" @@ -6841,26 +6858,18 @@ (define-public emacs-ess "ess-r-load-ESSR-github-fetch-no" "ess-r-load-ESSR-github-fetch-yes" "ess-set-working-directory-test" - "ess-test-r-startup-directory"))) - ;; The two tests below use a different syntax. - (emacs-batch-edit-file "test/ess-test-r-eval.el" - '(progn - (mapc (lambda (test) - (goto-char (point-min)) - (search-forward (format "etest-deftest %s " test)) - (beginning-of-line) - (kill-sexp)) - '("ess-r-eval-ns-env-roxy-tracebug-test" - "ess-r-eval-sink-freeze-test")) - (basic-save-buffer))))) + "ess-test-r-startup-directory")) + (disable-etests "test/ess-test-r-eval.el" + ("ess-r-eval-ns-env-roxy-tracebug-test" + "ess-r-eval-sink-freeze-test")) + (disable-etests + "test/ess-test-inf.el" + ("command-without-trailing-newline-test"))))) (replace 'check (lambda _ (invoke "make" "test"))))))) - (native-inputs - (list perl r-roxygen2 texinfo)) - (inputs - (list emacs-minimal r-minimal)) - (propagated-inputs - (list emacs-julia-mode)) + (native-inputs (list perl r-roxygen2 texinfo)) + (inputs (list emacs-minimal r-minimal)) + (propagated-inputs (list emacs-julia-mode)) (home-page "https://ess.r-project.org/") (synopsis "Emacs mode for statistical analysis programs") (description -- cgit v1.2.3