From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: phillip.lord@russet.org.uk (Phillip Lord) Newsgroups: gmane.emacs.devel Subject: Re: Tests, Emacs-25 and Conditional Features Date: Fri, 18 Mar 2016 10:41:28 +0000 Message-ID: <87zitwf4pz.fsf@russet.org.uk> References: <87k2l2zgre.fsf@russet.org.uk> <87h9g6xzrb.fsf@gmx.de> <87shzpxvfv.fsf@russet.org.uk> <83bn6d9iml.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1458297753 19460 80.91.229.3 (18 Mar 2016 10:42:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 18 Mar 2016 10:42:33 +0000 (UTC) Cc: michael.albinus@gmx.de, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 18 11:42:23 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 1agrrH-0002Mq-MD for ged-emacs-devel@m.gmane.org; Fri, 18 Mar 2016 11:42:19 +0100 Original-Received: from localhost ([::1]:42835 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agrrH-0000Iw-7R for ged-emacs-devel@m.gmane.org; Fri, 18 Mar 2016 06:42:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33014) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agrrD-0000Ew-Ge for emacs-devel@gnu.org; Fri, 18 Mar 2016 06:42:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1agrrC-0003rs-Jx for emacs-devel@gnu.org; Fri, 18 Mar 2016 06:42:15 -0400 Original-Received: from cloud103.planethippo.com ([31.216.48.48]:53292) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agrr8-0003bR-I7; Fri, 18 Mar 2016 06:42:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=russet.org.uk; s=default; h=Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:References:Subject:Cc:To:From; bh=GHnK78Zgl6JH9yrgRFtsh0Ng1SuWpABIucXc3UHgeBs=; b=ZLUNuyT/dY/tZwlJAZVMUIKeUk zRAaD7keRim7VdRMq3YkDUo1i5UlQW/5NFQ6YYIX1HjL8uFZUJMpokPmwRb+zgLJWLo7b5FoymI5V lAPAhL6ZW/d+4ShBz1s077iXadMuY6B/Gjwh5z/xw/LLipbXSRsK3T22ICTd7NYBEraVtHXBNqjLH AUGl6NU2ESxOVs81sG/3srC+z/JL92EIX5v3ViMV6lmP5S6fDvJ71EypBj3CNsKKcCvaxf9hjJKMi 6Z7BJX5Cx9F0mJTceeIqVDLkBHedTpexNxRZOweFCAnt4UJV1ojwRG793qtXt0KMqHTdahccyJNfb 4BgMsS6g==; Original-Received: from janus-nat-128-240-225-60.ncl.ac.uk ([128.240.225.60]:32281 helo=russet.org.uk) by cloud103.planethippo.com with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.86_1) (envelope-from ) id 1agrqS-0014yQ-Mx; Fri, 18 Mar 2016 10:41:28 +0000 In-Reply-To: <83bn6d9iml.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 17 Mar 2016 18:25:22 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cloud103.planethippo.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - russet.org.uk X-Get-Message-Sender-Via: cloud103.planethippo.com: authenticated_id: phillip.lord@russet.org.uk X-Authenticated-Sender: cloud103.planethippo.com: phillip.lord@russet.org.uk X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 31.216.48.48 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:201819 Archived-At: Eli Zaretskii writes: >> 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. Something like (skip-unless (or (gnutls-available-p) conditional-feature-force)) So, we pick have a standard test selector which means "all the conditional features should be expected to be on". Probably, you would want "all the conditional features that are supposed to be on by default, should be expected to be on" > 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. It would be nice if there were a standard way of detecting this. As Michael's example shows, we have a gnutls-available-p function which is defined if gnutls is not available, but for libxml, we check for non-definition of functions. Phil