]> git.eshelyaron.com Git - emacs.git/commitdiff
Let test summary go through even if some logs were not generated
authorNoam Postavsky <npostavs@gmail.com>
Sun, 2 Jul 2017 02:37:12 +0000 (22:37 -0400)
committerNoam Postavsky <npostavs@gmail.com>
Sun, 2 Jul 2017 03:42:30 +0000 (23:42 -0400)
* lisp/emacs-lisp/ert.el (ert-summarize-tests-batch-and-exit): Check
for existence of log files before reading.

lisp/emacs-lisp/ert.el

index 7edc40188e1280ce36798acb8ad6c3f51f97bd78..eb2b2e3e11be82b9b10f4337996f516f541e63a2 100644 (file)
@@ -1468,7 +1468,7 @@ this exits Emacs, with status as per `ert-run-tests-batch-and-exit'."
     (with-temp-buffer
       (while (setq logfile (pop command-line-args-left))
         (erase-buffer)
-        (insert-file-contents logfile)
+        (when (file-readable-p logfile) (insert-file-contents logfile))
         (if (not (re-search-forward "^Running \\([0-9]+\\) tests" nil t))
             (push logfile notests)
           (setq ntests (+ ntests (string-to-number (match-string 1))))