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 17:19:22 +0000 Message-ID: <87vb4jemat.fsf@russet.org.uk> References: <87k2l2zgre.fsf@russet.org.uk> <87h9g6xzrb.fsf@gmx.de> <87shzpxvfv.fsf@russet.org.uk> <83bn6d9iml.fsf@gnu.org> <87zitwf4pz.fsf@russet.org.uk> <87pousdp9g.fsf@gmx.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1458321757 4462 80.91.229.3 (18 Mar 2016 17:22:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 18 Mar 2016 17:22:37 +0000 (UTC) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 18 18:22:27 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 1agy6U-0007RK-Hy for ged-emacs-devel@m.gmane.org; Fri, 18 Mar 2016 18:22:26 +0100 Original-Received: from localhost ([::1]:45231 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agy6T-0006xZ-Ky for ged-emacs-devel@m.gmane.org; Fri, 18 Mar 2016 13:22:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46254) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agy3d-0000kt-RQ for emacs-devel@gnu.org; Fri, 18 Mar 2016 13:19:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1agy3c-0005CY-Tm for emacs-devel@gnu.org; Fri, 18 Mar 2016 13:19:29 -0400 Original-Received: from cloud103.planethippo.com ([31.216.48.48]:51250) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agy3X-0005Bv-U4; Fri, 18 Mar 2016 13:19:24 -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=6O8qcMlQgANDxlrkIKrEsviqEO5Osg1MTD3EyC2TSb4=; b=gxwlX5bxXyNlEEY6Uyxb4ztla1 8t6JFBGAIyuniggsC7z9ePRih4ny2/SavtkHZqqf0SBjjEQzu01yTVKtFbprz56TXQRz2kidgbmE0 fWrs5l1r7JP19bRzbz0fXNA79MyWxVVlEGPVILbXC1BSIO8n2HUfwI21KDVBZZqv5MbM1JkuPggf0 kgT7JoXUql9PoDwOJPAiHQvGCsJ+5Y6mngV/KP2n5C/OrinHyn2Mi4oAqkKW5hyN+26EEkSNeHgmR Kj4W80DSQpYEyFirs80FV5nyqSWM4T7x5J7vO1QBxnaLZohqIE/w6yv4QvHwA42PP4IjvCPKzemWm YjSMYGuw==; Original-Received: from janus-nat-128-240-225-60.ncl.ac.uk ([128.240.225.60]:56320 helo=russet.org.uk) by cloud103.planethippo.com with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.86_1) (envelope-from ) id 1agy3W-002Gzg-Ra; Fri, 18 Mar 2016 17:19:22 +0000 In-Reply-To: <87pousdp9g.fsf@gmx.de> (Michael Albinus's message of "Fri, 18 Mar 2016 12:00:43 +0100") 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:201834 Archived-At: Michael Albinus writes: > phillip.lord@russet.org.uk (Phillip Lord) writes: > > Hi Philip, > >> 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" > > That does not exist for everything. For example, in the file > notification case there are 5 different possible "conditional features", > all of them valid: > > - inotify enabled > - kqueue enabled > - gfilenotify enabled > - w32notify enable > - file notification disabled. > > How does a test library shall know what is intended by the user? Good point, although, if I understand the notification correctly, you have an abstraction layer over these? >> >> 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. > > This would require for all optional packages to provide such a > standardized form. We don't have it. > > One way would be to test (skip-unless (featurep 'package)). But even > this is not possible in general, packages like xml.c miss > > Fprovide (intern_c_string ("libxml"), Qnil); > > Maybe this is an error in xml.c, which should be fixed? Having a standard list of compile conditional features would be nice. Phil