From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#47320: Improve failure reporting in test/lisp/electrict-tests.el Date: Tue, 23 Mar 2021 14:47:41 +0000 Message-ID: References: <87v99i5k0f.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30319"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 47320@debbugs.gnu.org, =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Mar 23 15:48:18 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lOiKQ-0007kw-99 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 23 Mar 2021 15:48:18 +0100 Original-Received: from localhost ([::1]:51560 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lOiKN-0003WN-D4 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 23 Mar 2021 10:48:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50992) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lOiKA-0003Uc-Q7 for bug-gnu-emacs@gnu.org; Tue, 23 Mar 2021 10:48:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49395) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lOiKA-0000yO-HJ for bug-gnu-emacs@gnu.org; Tue, 23 Mar 2021 10:48:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lOiKA-00076s-Fu for bug-gnu-emacs@gnu.org; Tue, 23 Mar 2021 10:48:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 23 Mar 2021 14:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47320 X-GNU-PR-Package: emacs Original-Received: via spool by 47320-submit@debbugs.gnu.org id=B47320.161651087127312 (code B ref 47320); Tue, 23 Mar 2021 14:48:02 +0000 Original-Received: (at 47320) by debbugs.gnu.org; 23 Mar 2021 14:47:51 +0000 Original-Received: from localhost ([127.0.0.1]:60941 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lOiJz-00076R-9B for submit@debbugs.gnu.org; Tue, 23 Mar 2021 10:47:51 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:57655 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1lOiJw-00076B-Ox for 47320@debbugs.gnu.org; Tue, 23 Mar 2021 10:47:50 -0400 Original-Received: (qmail 55215 invoked by uid 3782); 23 Mar 2021 14:47:42 -0000 Original-Received: from acm.muc.de (p4fe159d5.dip0.t-ipconnect.de [79.225.89.213]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 23 Mar 2021 15:47:41 +0100 Original-Received: (qmail 7296 invoked by uid 1000); 23 Mar 2021 14:47:41 -0000 Content-Disposition: inline In-Reply-To: <87v99i5k0f.fsf@gmx.de> X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:202902 Archived-At: Hello, Michael. On Tue, Mar 23, 2021 at 09:53:04 +0100, Michael Albinus wrote: > Alan Mackenzie writes: > > Hello, Emacs. > Hi Alan, > > My proposal is that on a test failure, this generated doc-string should > > be output along with the other failure stuff. It doesn't actually add > > all that much bulk to the .log file. > > Here is patch which does this. If there are no objections, I will > > commit it in a day or two. > There is the explainer functionality in ert, see > (info "(ert)Defining Explanation Functions") That description is rather terse. In fact it is incomplete - it does not say when the explanation function gets called, nor does it say what is done with any resulting explanation. It looks like a explanation function needs to duplicate the test code of the test being explained - it seems the function has no access to the internal state of the test. I only wish to print the extra information when there is a test failure. Otherwise the information in electric-tests.log would be swamped by pointless voluminous doc strings. Or am I missing something? > I recommend to use it, for better readability of the test code. Examples > are in our test files. Thanks! > Best regards, Michael. -- Alan Mackenzie (Nuremberg, Germany).