; Prevent ERC-induced false positive in JUnit report

* test/lisp/erc/erc-scenarios-internal.el: Mimic other test files,
like perl-mode-tests.el, in setting `ert-load-file-name' globally.
This file formerly caused a false positive in the error detection
logic of `ert-write-junit-test-summary-report'.  It affected all
scheduled pipelines, including those for the release branch, Emacs 29.
This commit is contained in:
F. Jason Park 2023-02-14 07:29:25 -08:00
parent b16965ef7e
commit 1917c51fe6

View file

@ -21,6 +21,9 @@
(require 'ert-x) (require 'ert-x)
(eval-and-compile (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)) (let ((load-path (cons (expand-file-name "erc-d" (ert-resource-directory))
load-path))) load-path)))
(load "erc-d-tests" nil 'silent))) (load "erc-d-tests" nil 'silent)))