* 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.
(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)))