From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master 66db7b2 1/2: Always include the number of unexpected results here too Date: Fri, 26 Jul 2019 16:19:03 +0100 Message-ID: <87sgqs4ye0.fsf@tcd.ie> References: <20190726075902.16162.83489@vcs0.savannah.gnu.org> <20190726075904.0A44C20C06@vcs0.savannah.gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="1130"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Lars Ingebrigtsen To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 26 17:19:25 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hr20B-0018Ib-Bp for ged-emacs-devel@m.gmane.org; Fri, 26 Jul 2019 17:19:23 +0200 Original-Received: from localhost ([::1]:41056 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hr20A-0008KU-C9 for ged-emacs-devel@m.gmane.org; Fri, 26 Jul 2019 11:19:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35424) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hr200-0008J8-D9 for emacs-devel@gnu.org; Fri, 26 Jul 2019 11:19:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hr1zz-0005VD-Aw for emacs-devel@gnu.org; Fri, 26 Jul 2019 11:19:12 -0400 Original-Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:34137) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hr1zy-0005Pm-PS for emacs-devel@gnu.org; Fri, 26 Jul 2019 11:19:11 -0400 Original-Received: by mail-wr1-x42a.google.com with SMTP id 31so54884787wrm.1 for ; Fri, 26 Jul 2019 08:19:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=qpsPUuHAzncZmuX7RmK0/TrU9ThUAUIFT20R3BHBTOc=; b=Msp+SzdGrCwQSBNrJMeLFxU7tkKvk5WyWQeRIWtlh58heQNTahL/gASqd1aobMWqxo 0Sb7+a29UwTAsY4F5g8lzXf0664qKxm461/biLLTAQr1rkGmt4fBLMYkixUSJiq/cfAR JqM37Iev71rNFSM1dOoy2/VH4fyR5RkUkilw5QdhO/mDQxCXysehXmpa/FxBVfstd6Y+ 9L47QtAMHztBA5xEYfkYc63xTA+L3n+NeqYCry1utkWRYTCdXQwKKvjuK5yO9hXg5hjd aSPv1Vcax6kfndnXACcPx9l4m2dQ7kCXOm72xvRuE03T+EnHcYKJDO4ToNq0bcwIDFij gKOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=qpsPUuHAzncZmuX7RmK0/TrU9ThUAUIFT20R3BHBTOc=; b=Si/iSM49vt9R0iY6fWkL6gjZ2HOb4kmYQPShllW2lgXfKLHIfWcGekZAuvKJbawU4R D6cAv/qdVy2+e//Kp5g7vPuVG2+DU+8RPtIIc5jW9vQFzgjV4+KH2sSc/1AoIe/Dtiqw jRXQa6rAUT0vEf90bFrLjiSEue5ICX+xIh5L7t+WmnyMtYRWyIC9aJCgi9gEy/1g6Mhu 8pVoPRwhCU2VrTaWzgOHaobsCICSoGx8vB6Bk7Hyde5OZpJxSuPUKJpoQf58YHfDC60h zrzbCa2A/DGGdOfpjLcOR7qiipUQ48cgTLCph/nCc8aQYsAXArE8krWGJGwSE4vtipEm 6h5A== X-Gm-Message-State: APjAAAU4nW8b8lAMZBzr/DUCGqNChn87txjmLdT1XpOC6wf1xkL6NAb6 osq7dt3N+JbfcHMPBIPEhtrkiedcd+4= X-Google-Smtp-Source: APXvYqykUUq4n9EoQ03cVmaRSE6ULRSmYktKtGBlv/fcZwEHqjMOg0anKeBWgn++EYs3WQh6PFzUoQ== X-Received: by 2002:a5d:4090:: with SMTP id o16mr29176279wrp.292.1564154345660; Fri, 26 Jul 2019 08:19:05 -0700 (PDT) Original-Received: from localhost ([89.101.223.218]) by smtp.gmail.com with ESMTPSA id r4sm29431014wrq.82.2019.07.26.08.19.04 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 26 Jul 2019 08:19:04 -0700 (PDT) In-Reply-To: <20190726075904.0A44C20C06@vcs0.savannah.gnu.org> (Lars Ingebrigtsen's message of "Fri, 26 Jul 2019 03:59:03 -0400 (EDT)") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42a X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:238931 Archived-At: --=-=-= Content-Type: text/plain larsi@gnus.org (Lars Ingebrigtsen) writes: > branch: master > commit 66db7b2c36c9189baf6f6b3d3fd7d04b3903cab4 > Author: Lars Ingebrigtsen > Commit: Lars Ingebrigtsen > > Always include the number of unexpected results here too Doesn't this break 'make check'? AFAICT ert-summarize-tests-batch-and-exit currently uses the presence of "N unexpected" as an indication of an error, even when N is zero: (if (not (re-search-forward "^\\(Aborted: \\)?\ Ran \\([0-9]+\\) tests, \\([0-9]+\\) results as expected\ \\(?:, \\([0-9]+\\) unexpected\\)?\ \\(?:, \\([0-9]+\\) skipped\\)?" nil t)) (push logfile badtests) ... (when (match-string 4) (push logfile unexpected) (setq nunexpected (+ nunexpected (string-to-number (match-string 4))))) ...) Should this be updated as follows? --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=ert-unexpected.diff diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el index 272fd4aec2..c659e4f3fc 100644 --- a/lisp/emacs-lisp/ert.el +++ b/lisp/emacs-lisp/ert.el @@ -1496,16 +1496,16 @@ ert-summarize-tests-batch-and-exit (setq ntests (+ ntests (string-to-number (match-string 1)))) (if (not (re-search-forward "^\\(Aborted: \\)?\ Ran \\([0-9]+\\) tests, \\([0-9]+\\) results as expected\ -\\(?:, \\([0-9]+\\) unexpected\\)?\ +, \\([0-9]+\\) unexpected\ \\(?:, \\([0-9]+\\) skipped\\)?" nil t)) (push logfile badtests) (if (match-string 1) (push logfile badtests)) (setq nrun (+ nrun (string-to-number (match-string 2))) nexpected (+ nexpected (string-to-number (match-string 3)))) - (when (match-string 4) - (push logfile unexpected) - (setq nunexpected (+ nunexpected - (string-to-number (match-string 4))))) + (let ((n (string-to-number (match-string 4)))) + (setq nunexpected (+ nunexpected n)) + (unless (zerop n) + (push logfile unexpected))) (when (match-string 5) (push logfile skipped) (setq nskipped (+ nskipped --=-=-= Content-Type: text/plain What about ert-run-tests-interactively and ert--results-format-expected-unexpected? Thanks, -- Basil --=-=-=--