[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] feature/gnus-select 08b32c9 105/218: Print test timings un
From: |
Andrew G Cohen |
Subject: |
[Emacs-diffs] feature/gnus-select 08b32c9 105/218: Print test timings unconditionally |
Date: |
Fri, 14 Dec 2018 03:35:11 -0500 (EST) |
branch: feature/gnus-select
commit 08b32c91fc01d0754a52ae0020647c88e1cf1fd6
Author: Michael Albinus <address@hidden>
Commit: Andrew G Cohen <address@hidden>
Print test timings unconditionally
* lisp/emacs-lisp/ert.el (ert-batch-print-duration): Remove.
(ert-run-tests-batch): Adapt accordingly.
* test/Makefile.in:
* test/README: Remove TEST_PRINT_TEST_DURATION.
---
lisp/emacs-lisp/ert.el | 26 ++++++++------------------
test/Makefile.in | 5 -----
test/README | 5 -----
3 files changed, 8 insertions(+), 28 deletions(-)
diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el
index a1545073..e4e166a 100644
--- a/lisp/emacs-lisp/ert.el
+++ b/lisp/emacs-lisp/ert.el
@@ -1342,9 +1342,6 @@ RESULT must be an `ert-test-result-with-condition'."
(defvar ert-quiet nil
"Non-nil makes ERT only print important information in batch mode.")
-(defvar ert-batch-print-duration nil
- "Non-nil makes ERT print duration time of single tests in batch mode.")
-
;;;###autoload
(defun ert-run-tests-batch (&optional selector)
"Run the tests specified by SELECTOR, printing results to the terminal.
@@ -1371,7 +1368,7 @@ Returns the stats object."
(let ((unexpected (ert-stats-completed-unexpected stats))
(skipped (ert-stats-skipped stats))
(expected-failures (ert--stats-failed-expected stats)))
- (message "\n%sRan %s tests, %s results as expected%s%s (%s)%s\n"
+ (message "\n%sRan %s tests, %s results as expected%s%s (%s, %f
sec)%s\n"
(if (not abortedp)
""
"Aborted: ")
@@ -1383,15 +1380,11 @@ Returns the stats object."
(if (zerop skipped)
""
(format ", %s skipped" skipped))
- (if ert-batch-print-duration
- (format
- "%s, %f sec"
- (ert--format-time-iso8601 (ert--stats-end-time
stats))
- (float-time
- (time-subtract
- (ert--stats-end-time stats)
- (ert--stats-start-time stats))))
- (ert--format-time-iso8601 (ert--stats-end-time stats)))
+ (ert--format-time-iso8601 (ert--stats-end-time stats))
+ (float-time
+ (time-subtract
+ (ert--stats-end-time stats)
+ (ert--stats-start-time stats)))
(if (zerop expected-failures)
""
(format "\n%s expected failures" expected-failures)))
@@ -1463,17 +1456,14 @@ Returns the stats object."
(let* ((max (prin1-to-string (length (ert--stats-tests stats))))
(format-string (concat "%9s %"
(prin1-to-string (length max))
- "s/" max " %S"
- (if ert-batch-print-duration
- " (%f sec)"))))
+ "s/" max " %S (%f sec)")))
(message format-string
(ert-string-for-test-result result
(ert-test-result-expected-p
test result))
(1+ (ert--stats-test-pos stats test))
(ert-test-name test)
- (if ert-batch-print-duration
- (ert-test-result-duration result)))))))))
+ (ert-test-result-duration result))))))))
nil))
;;;###autoload
diff --git a/test/Makefile.in b/test/Makefile.in
index 426d22d..20e90c6 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -111,11 +111,6 @@ ifneq (${TEST_BACKTRACE_LINE_LENGTH},)
ert_opts += --eval '(setq ert-batch-backtrace-right-margin
${TEST_BACKTRACE_LINE_LENGTH})'
endif
-# Whether the tests shall also report their duration.
-ifdef TEST_PRINT_TEST_DURATION
-ert_opts += --eval '(setq ert-batch-print-duration t)'
-endif
-
ifeq (@HAVE_MODULES@, yes)
MODULES_EMACSOPT := --module-assertions
else
diff --git a/test/README b/test/README
index 37156c6..36307e3 100644
--- a/test/README
+++ b/test/README
@@ -65,11 +65,6 @@ compiled version of a test use
make TEST_LOAD_EL=no ...
-Sometimes, it is necessary to trace the duration time for single tests.
-This is controlled by the environment variable TEST_PRINT_TEST_DURATION
-
- make TEST_PRINT_TEST_DURATION=1 ...
-
(Also, see etc/compilation.txt for compilation mode font lock tests.)
- [Emacs-diffs] feature/gnus-select a381e7e 002/218: Define if-let* and derivatives as aliases for if-let etc, (continued)
- [Emacs-diffs] feature/gnus-select a381e7e 002/218: Define if-let* and derivatives as aliases for if-let etc, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select a8e5163 070/218: Minor changes in mule.texi, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 03e7331 089/218: * lisp/pcomplete.el (pcomplete-here): Move before first reference., Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 040f725 093/218: * lisp/emulation/cua-base.el (cua-paste): Quieten compilation., Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select f5219ae 094/218: Replace some obsolete uses of filter-buffer-substring-functions, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 25950c1 095/218: Suppress warnings about obsolete generics (bug#25556), Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 965f4ec 100/218: * lisp/gnus/gnus-registry.el: Add missing compile-time requirement., Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select e2aebb9 090/218: * test/lisp/ses-tests.el: Quieten compilation., Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select c52e2e2 099/218: Fix 'posn-at-point' when line numbers are displayed, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select e907e4a 102/218: Improve word motion docs (Bug#30815), Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 08b32c9 105/218: Print test timings unconditionally,
Andrew G Cohen <=
- [Emacs-diffs] feature/gnus-select 58da563 110/218: * lisp/url/url-handlers.el: Require subr-x., Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 513b7fc 111/218: Fix compilation warnings in subr-x-tests.el, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select aceb821 047/218: Remove many items obsolete since Emacs 22.1, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select ec18ff5 118/218: Followup to last change in browse-url.el, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 10794c8 119/218: Print top time consuming tests if advised, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 1ac0958 123/218: Fix recently-added POP doc glitch, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 0f8f94d 121/218: Fix frame resize flicker on macOS (bug#30699), Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select b3c36c4 122/218: Revert move of interactive `transpose-regions' to Lisp, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 24e07c4 129/218: Tune time zone 0, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select a3605b6 130/218: * test/lisp/info-xref-tests.el (info-xref-test-emacs-manuals): New., Andrew G Cohen, 2018/12/14