From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Tests, Emacs-25 and Conditional Features Date: Thu, 17 Mar 2016 18:25:22 +0200 Message-ID: <83bn6d9iml.fsf@gnu.org> References: <87k2l2zgre.fsf@russet.org.uk> <87h9g6xzrb.fsf@gmx.de> <87shzpxvfv.fsf@russet.org.uk> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1458231962 14356 80.91.229.3 (17 Mar 2016 16:26:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 17 Mar 2016 16:26:02 +0000 (UTC) Cc: michael.albinus@gmx.de, emacs-devel@gnu.org To: phillip.lord@russet.org.uk (Phillip Lord) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 17 17:26:02 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1agakL-0006dW-Eb for ged-emacs-devel@m.gmane.org; Thu, 17 Mar 2016 17:26:01 +0100 Original-Received: from localhost ([::1]:36593 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agakK-0007QF-Lf for ged-emacs-devel@m.gmane.org; Thu, 17 Mar 2016 12:26:00 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46533) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agak6-0007Q0-JD for emacs-devel@gnu.org; Thu, 17 Mar 2016 12:25:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1agak3-0003YR-RO for emacs-devel@gnu.org; Thu, 17 Mar 2016 12:25:46 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:34054) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agak3-0003YN-OA; Thu, 17 Mar 2016 12:25:43 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1931 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1agak0-00016k-T9; Thu, 17 Mar 2016 12:25:41 -0400 In-reply-to: <87shzpxvfv.fsf@russet.org.uk> (phillip.lord@russet.org.uk) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:201814 Archived-At: > From: phillip.lord@russet.org.uk (Phillip Lord) > Date: Thu, 17 Mar 2016 10:14:44 +0000 > Cc: emacs-devel@gnu.org > > > (skip-unless (gnutls-available-p)) > > (skip-unless (functionp 'libxml-parse-xml-region)) > > Yeah, thought about that. But then the test is skipped if > gnutls-available-p returns nil. What happens if I believe that I have > configured and build Emacs to include gnutls, but, for some reason it > isn't. The test will be skipped when it should succeed. Tests that are skipped are indicated in the test log file, so if you see there a feature being skipped that you thought should be available, you can investigate. More generally, I don't see how Emacs could know what you believe. We need to define the meaning of that first, and then find a way to communicate that to Emacs. For example, one possible interpretation of "believe" is the report displayed by 'configure' near its end. A similar interpretation is the value of system-configuration-features. However, it might happen that the user expects her build to support feature X, but that feature is not in any of these, in which case the only way I see is to ask the user. Then there's the issue of how do you test this. An API that was not compiled into Emacs cannot be invoked, so what do we want to show the user? a "void function" error? ert error messages are not so easy to interpret. IOW, I think you are talking about a kind of testing we don't yet have, and it should be designed first. The current test suite aims at testing the code, using the available Emacs binary as best it can. It does NOT test user assumptions about the build -- that is a separate and different issue, which requires rather different approach, IMO.