mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-25 23:10:47 -08:00
* test/lisp/erc/erc-fill-tests.el (erc-fill-wrap--monospace, erc-fill-wrap--merge, erc-fill-wrap-tests--merge-action, erc-fill-wrap-tests--merge-action/indicator-pre, erc-fill-wrap-tests--merge-action/indicator-post, erc-fill-line-spacing, erc-fill-wrap-visual-keys--body, erc-fill-wrap-visual-keys--prompt, erc-fill--left-hand-stamps): Tag as :erc--graphcial. * test/lisp/erc/erc-scenarios-internal.el (erc-scenarios-internal--run-interactive-all): New test to assist ERC contributors in -jN parallel runs. * test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el (erc-scenarios-scrolltobottom--relaxed): Tag as :erc--graphical. * test/lisp/erc/erc-scenarios-scrolltobottom.el (erc-scenarios-scrolltobottom--normal, erc-scenarios-scrolltobottom--all): Tag as :erc--graphical. * test/lisp/erc/erc-scenarios-status-sidebar.el (erc-scenarios-status-sidebar--nickbar): Tag as :erc--graphical. * test/lisp/erc/erc-tests.el (erc--channel-modes/graphic-p): Tag as :erc--graphical. * test/lisp/erc/resources/base/local-modules/first.eld: Timeouts. * test/lisp/erc/resources/erc-scenarios-common.el (erc-scenarios-common--graphical-p): New variable. (erc-scenarios-common--make-bindings): Don't enable `inhibit-interaction' when interactive. Set `erc-scenarios-common--graphical-p' flag when `:erc--graphical' tag present and running interactively. (erc-scenarios-common-with-cleanup): Account for variable `erc-scenarios-common--graphical-p'. (erc-scenarios-common-scrolltobottom--normal): Turn off `erc-scrolltobottom-mode' when test finishes so as not to pollute when running multiple interactive tests. ; * test/lisp/erc/resources/join/network-id/barnet.eld: Timeouts.
61 lines
2.6 KiB
EmacsLisp
61 lines
2.6 KiB
EmacsLisp
;;; erc-scenarios-internal.el --- Proxy file for erc-d tests -*- lexical-binding: t -*-
|
|
|
|
;; Copyright (C) 2022-2023 Free Software Foundation, Inc.
|
|
|
|
;; This file is part of GNU Emacs.
|
|
|
|
;; GNU Emacs is free software: you can redistribute it and/or modify
|
|
;; it under the terms of the GNU General Public License as published by
|
|
;; the Free Software Foundation, either version 3 of the License, or
|
|
;; (at your option) any later version.
|
|
|
|
;; GNU Emacs is distributed in the hope that it will be useful,
|
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
;; GNU General Public License for more details.
|
|
|
|
;; You should have received a copy of the GNU General Public License
|
|
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
;;; Code:
|
|
|
|
(require 'ert-x)
|
|
(eval-and-compile
|
|
(when (and (getenv "EMACS_TEST_DIRECTORY")
|
|
(getenv "EMACS_TEST_JUNIT_REPORT"))
|
|
(setq ert-load-file-name (or (macroexp-file-name) buffer-file-name)))
|
|
(let ((load-path (cons (expand-file-name "erc-d" (ert-resource-directory))
|
|
load-path)))
|
|
(load "erc-d-tests" nil 'silent)))
|
|
|
|
;; Run all tests tagged `:erc--graphical' in an "interactive"
|
|
;; subprocess. Time out after 90 seconds.
|
|
(ert-deftest erc-scenarios-internal--run-graphical-all ()
|
|
:tags '(:expensive-test :unstable)
|
|
(unless (and (getenv "ERC_TESTS_GRAPHICAL_ALL")
|
|
(not (getenv "ERC_TESTS_GRAPHICAL"))
|
|
(not (getenv "CI")))
|
|
(ert-skip "Environmental conditions unmet"))
|
|
|
|
(let* ((default-directory (expand-file-name "../" (ert-resource-directory)))
|
|
(libs (directory-files default-directory 'full (rx ".el" eot)))
|
|
(process-environment (cons "ERC_TESTS_GRAPHICAL=1"
|
|
process-environment))
|
|
(program '(progn (ert (quote (tag :erc--graphical)))
|
|
(with-current-buffer ert--output-buffer-name
|
|
(kill-emacs (ert--stats-failed-unexpected
|
|
ert--results-stats)))))
|
|
(args `("erc-interactive-all" ,(current-buffer)
|
|
,(concat invocation-directory invocation-name)
|
|
"-Q" "-L" "." "-l" "ert"
|
|
,@(let (o) (while libs (push (pop libs) o) (push "-l" o)) o)
|
|
"-eval" ,(format "%S" program)))
|
|
(proc (apply #'start-process args)))
|
|
(set-process-query-on-exit-flag proc nil)
|
|
|
|
(erc-d-t-wait-for 90 "interactive tests to complete"
|
|
(not (process-live-p proc)))
|
|
|
|
(should (zerop (process-exit-status proc)))))
|
|
|
|
;;; erc-scenarios-internal.el ends here
|