From 5f8d93a9895b67ce89bac3b2d95ca723fe754ab4 Mon Sep 17 00:00:00 2001 From: Max Nikulin Date: Sat, 15 Jan 2022 22:54:30 +0700 Subject: [PATCH] make test: Make failure summary more verbose * mk/default.mk: By default enable verbose failure summary for Emacs-28 or newer. Set or unset EMACS_TEST_VERBOSE environment to control reporting of failure reasons in summary since ERT switches to verbose mode even by an empty string. As an extension, allow values as "0", "off", "no" to disable verbosity. --- mk/default.mk | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/mk/default.mk b/mk/default.mk index c8a15bdd2..11ddcc2e1 100644 --- a/mk/default.mk +++ b/mk/default.mk @@ -32,6 +32,24 @@ TMPDIR ?= /tmp testdir = $(TMPDIR)/tmp-orgtest # Configuration for testing +# Verbose ERT summary by default for Emacs-28 and above. +# To override: +# - Add to local.mk +# EMACS_TEST_VERBOSE = +# - Export EMACS_TEST_VERBOSE environment variable with empty value +# - Run tests as +# EMACS_TEST_VERBOSE= make test [OTHER_ARGUMENTS...] +# or as +# make test EMACS_TEST_VERBOSE= [OTHER_ARGUMENTS...] +# For convenience some other values are recognized as false by Org makefiles +# ("0", "no", "off", "false") despite any set value (including empty one) +# is considered as true by ERT. +EMACS_TEST_VERBOSE ?= yes +ifneq (,$(filter-out 0 n N no No NO f F false False FALSE off Off OFF none None NONE nil NIL,$(EMACS_TEST_VERBOSE))) +export EMACS_TEST_VERBOSE +else +unexport EMACS_TEST_VERBOSE +endif # add options before standard load-path BTEST_PRE = # add options after standard load path -- 2.25.1