From: Michael Albinus Date: Thu, 1 Jul 2021 11:43:44 +0000 (+0200) Subject: Handle test environment variables X-Git-Tag: emacs-28.0.90~1990 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=527bab054f285cde9d7f792c932c40ddcce74590;p=emacs.git Handle test environment variables * lisp/emacs-lisp/ert.el (ert-summarize-tests-batch-and-exit): Check also for EMACS_EMBA_CI. * test/README (SELECTOR): Mention EMACS_TEST_VERBOSE. * test/infra/gitlab-ci.yml (variables): Set EMACS_TEST_VERBOSE. --- diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el index 50b45092ca8..92acfe7246f 100644 --- a/lisp/emacs-lisp/ert.el +++ b/lisp/emacs-lisp/ert.el @@ -1552,7 +1552,7 @@ Ran \\([0-9]+\\) tests, \\([0-9]+\\) results as expected\ (when badtests (message "%d files did not finish:" (length badtests)) (mapc (lambda (l) (message " %s" l)) badtests) - (if (getenv "EMACS_HYDRA_CI") + (if (or (getenv "EMACS_HYDRA_CI") (getenv "EMACS_EMBA_CI")) (with-temp-buffer (dolist (f badtests) (erase-buffer) @@ -1568,8 +1568,8 @@ Ran \\([0-9]+\\) tests, \\([0-9]+\\) results as expected\ (setq tests (sort tests (lambda (x y) (> (car x) (car y))))) (when (< high (length tests)) (setcdr (nthcdr (1- high) tests) nil)) (message "%s" (mapconcat #'cdr tests "\n"))) - ;; More details on hydra, where the logs are harder to get to. - (when (and (getenv "EMACS_HYDRA_CI") + ;; More details on hydra and emba, where the logs are harder to get to. + (when (and (or (getenv "EMACS_HYDRA_CI") (getenv "EMACS_EMBA_CI")) (not (zerop (+ nunexpected nskipped)))) (message "\nDETAILS") (message "-------") diff --git a/test/README b/test/README index 0c8d5a409be..97611cf8644 100644 --- a/test/README +++ b/test/README @@ -105,6 +105,11 @@ debugging. To do that, use make TEST_INTERACTIVE=yes ... +By default, ERT test failure summaries are quite brief in batch +mode--only the names of the failed tests are listed. If the +$EMACS_TEST_VERBOSE environment variable is set, the failure summaries +will also include the data from the failing test. + Some of the tests require a remote temporary directory (autorevert-tests.el, filenotify-tests.el, shadowfile-tests.el and tramp-tests.el). Per default, a mock-up connection method is used diff --git a/test/infra/gitlab-ci.yml b/test/infra/gitlab-ci.yml index fa10fa67611..6876a8b11d8 100644 --- a/test/infra/gitlab-ci.yml +++ b/test/infra/gitlab-ci.yml @@ -44,6 +44,7 @@ workflow: variables: GIT_STRATEGY: fetch EMACS_EMBA_CI: 1 + EMACS_TEST_VERBOSE: 1 # # Use TLS https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#tls-enabled # DOCKER_HOST: tcp://docker:2376 # DOCKER_TLS_CERTDIR: "/certs"