]> code.delx.au - gnu-emacs/commitdiff
Document 'ert-summarize-tests-batch-and-exit'
authorShakthi Kannan <shakthimaan@gmail.com>
Sat, 26 Dec 2015 11:05:06 +0000 (13:05 +0200)
committerEli Zaretskii <eliz@gnu.org>
Sat, 26 Dec 2015 11:05:06 +0000 (13:05 +0200)
* doc/misc/ert.texi (Running Tests in Batch Mode): Document
'ert-summarize-tests-batch-and-exit'.

doc/misc/ert.texi
etc/NEWS

index 35d315c64b804ef51994da21dc9015f1d9874bc5..c2363237b97e01f101da0a4b4aede9248e617233 100644 (file)
@@ -283,6 +283,15 @@ with a zero exit status if all tests passed, or nonzero if any tests
 failed or if anything else went wrong.  It will also print progress
 messages and error diagnostics to standard output.
 
+You can also redirect the above output to a log file, say
+@file{output.log}, and use the
+@code{ert-summarize-tests-batch-and-exit} function to produce a neat
+summary as shown below:
+
+@example
+emacs -batch -l ert -f ert-summarize-tests-batch-and-exit output.log
+@end example
+
 If ERT is not part of your Emacs distribution, you may need to use
 @code{-L /path/to/ert/} so that Emacs can find it.  You may need
 additional @code{-L} flags to ensure that @code{my-tests.el} and all the
index 19c9858b80d58c1adaa3d9a63fb31c93d612cac0..f1ba79f5b03a4d8472461881e718ea536a9093f3 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -696,7 +696,11 @@ The remainder were:
 
 **** The nil and list forms of `diary-display-function'.
 
++++
 ** New ERT function `ert-summarize-tests-batch-and-exit'.
+If the output of ERT tests in batch mode execution can be saved to a
+log file, then it can be passed as an argument to the above function
+to produce a neat summary.
 
 ** New js.el option `js-indent-first-init'.