]> git.eshelyaron.com Git - emacs.git/commitdiff
; Prevent ERC-induced false positive in JUnit report
authorF. Jason Park <jp@neverwas.me>
Tue, 14 Feb 2023 15:29:25 +0000 (07:29 -0800)
committerF. Jason Park <jp@neverwas.me>
Wed, 15 Feb 2023 16:34:04 +0000 (08:34 -0800)
* 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.

test/lisp/erc/erc-scenarios-internal.el

index 8d38c2dde49a557151ade87606d9c4ad63b39a3e..18eb94e24b04cade4406f4280fbdad057a6f3618 100644 (file)
@@ -21,6 +21,9 @@
 
 (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)))