unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Shakthi Kannan <shakthimaan@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: Documenting NEWS features for 25.1
Date: Thu, 24 Dec 2015 22:19:33 +0530	[thread overview]
Message-ID: <CABG-yt3qdVehH93SYXxOAveMGKxeP93fQWEzv6r2sBXt-L4oSw@mail.gmail.com> (raw)
In-Reply-To: <8360zrsoct.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 783 bytes --]

Hi,

NEWS entry:

  ** New ERT function `ert-summarize-tests-batch-and-exit'.

I have verified the function by creating a sample test.el file whose
contents are as follows:

  (ert-deftest example-test ()
    (should (= (+ 9 2) 11)))

I was able to run the test, and capture the output using:

  $ emacs -batch -l ert -l test.el -f ert-run-tests-batch > test.log

I compiled emacs-25, and ran the following to produce the expected
summary result as shown below:

  $ ./src/emacs -batch -l ert -f ert-summarize-tests-batch-and-exit test.log

SUMMARY OF TEST RESULTS
-----------------------
Files examined: 1
Ran 1 tests, 1 results as expected

Is the attached documentation change fine? I can then send you an actual patch.

Regards,

SK

--
Shakthi Kannan
http://www.shakthimaan.com

[-- Attachment #2: ert-summarize.patch --]
[-- Type: text/x-patch, Size: 1270 bytes --]

diff --git a/doc/misc/ert.texi b/doc/misc/ert.texi
index 35d315c..d29c1d8 100644
--- a/doc/misc/ert.texi
+++ b/doc/misc/ert.texi
@@ -283,6 +283,15 @@ Running Tests in Batch Mode
 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
+@code{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
diff --git a/etc/NEWS b/etc/NEWS
index 19c9858..f1ba79f 100644
--- 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'.
 

  reply	other threads:[~2015-12-24 16:49 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20151212115202.16784.72345@vcs.savannah.gnu.org>
     [not found] ` <E1a7iiY-0004NK-Ky@vcs.savannah.gnu.org>
2015-12-15  1:36   ` [Emacs-diffs] emacs-25 3e14bad: Document new features of Prettify Mode John Wiegley
2015-12-15  3:39     ` Eli Zaretskii
2015-12-15  6:10       ` John Wiegley
2015-12-15 17:51         ` Shakthi Kannan
2015-12-15 17:58           ` Documenting NEWS features for 25.1 (was: [Emacs-diffs] emacs-25 3e14bad: Document new features of Prettify Mode) John Wiegley
2015-12-15 18:34             ` Eli Zaretskii
2015-12-16  6:09               ` Shakthi Kannan
2015-12-16  6:44                 ` Documenting NEWS features for 25.1 John Wiegley
2015-12-16  7:59                   ` Shakthi Kannan
2015-12-16 10:20                     ` Eli Zaretskii
2015-12-16 10:36                       ` Shakthi Kannan
2015-12-16 11:11                         ` Eli Zaretskii
2015-12-16 12:29                           ` Shakthi Kannan
2015-12-21 17:09                             ` Shakthi Kannan
2015-12-21 17:28                               ` Eli Zaretskii
2015-12-24 16:49                                 ` Shakthi Kannan [this message]
2015-12-25 14:24                                   ` Eli Zaretskii
2015-12-28 17:25                                     ` Shakthi Kannan
2015-12-29 16:59                                       ` Eli Zaretskii
2015-12-29 17:05                                         ` Spaces after periods (was: Documenting NEWS features for 25.1) John Wiegley
2015-12-29 17:30                                           ` Spaces after periods David Kastrup
2015-12-29 17:32                                           ` Spaces after periods (was: Documenting NEWS features for 25.1) Nikolai Weibull
2015-12-29 17:58                                             ` Ingo Lohmar
2015-12-29 19:05                                             ` Marcin Borkowski
2015-12-29 21:05                                               ` Nikolai Weibull
2015-12-30  7:46                                             ` Spaces after periods Random832
2015-12-30  7:59                                               ` Nikolai Weibull
2015-12-29 18:15                                           ` Spaces after periods (was: Documenting NEWS features for 25.1) Eli Zaretskii
2015-12-29 19:56                                             ` Spaces after periods John Wiegley
2015-12-30  5:40                                         ` Documenting NEWS features for 25.1 Shakthi Kannan
2015-12-30 17:49                                           ` Eli Zaretskii
2015-12-31  5:33                                             ` Shakthi Kannan
2016-01-11 12:02 Shakthi Kannan
2016-01-11 18:20 ` Eli Zaretskii
2016-01-12  4:28   ` Shakthi Kannan
2016-01-12 15:45     ` Eli Zaretskii
2016-01-12 15:55       ` Shakthi Kannan
2016-01-12 16:08         ` Eli Zaretskii
  -- strict thread matches above, loose matches on Subject: below --
2016-01-19 16:49 Shakthi Kannan
2016-01-19 18:39 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CABG-yt3qdVehH93SYXxOAveMGKxeP93fQWEzv6r2sBXt-L4oSw@mail.gmail.com \
    --to=shakthimaan@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).