From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: phillip.lord@russet.org.uk Newsgroups: gmane.emacs.devel Subject: Re: so-long tests Date: Sat, 13 Jul 2019 15:40:20 +0100 Message-ID: <2a06e078be3ff5ddcc206f7e83fc2415@russet.org.uk> References: <83sgra1jn6.fsf@gnu.org> <1046d298-c0bc-a69f-39a7-011aa993c9da@orcon.net.nz> <83k1cm1h49.fsf@gnu.org> <83blxy1cdo.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="100462"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Roundcube Webmail/1.3.8 Cc: Phil Sainty , Emacs-devel , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 13 16:40:34 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 1hmJCT-000Q0i-HZ for ged-emacs-devel@m.gmane.org; Sat, 13 Jul 2019 16:40:33 +0200 Original-Received: from localhost ([::1]:56632 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hmJCS-0006Tj-DX for ged-emacs-devel@m.gmane.org; Sat, 13 Jul 2019 10:40:32 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48305) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hmJCP-0006TY-Ts for emacs-devel@gnu.org; Sat, 13 Jul 2019 10:40:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hmJCO-0004My-Su for emacs-devel@gnu.org; Sat, 13 Jul 2019 10:40:29 -0400 Original-Received: from cloud103.planethippo.com ([78.129.138.110]:36626) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hmJCL-0004G1-4p; Sat, 13 Jul 2019 10:40:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=russet.org.uk; s=default; h=Message-ID:References:In-Reply-To:Subject:Cc:To :From:Date:Content-Transfer-Encoding:Content-Type:MIME-Version:Sender: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=JzPNqlhnJ5qVnu8DrsMsMkQo7WSqAEbEO26m/0FDDZo=; b=MyiTfC5ko94hvXEwIMTISe/MNM 0LIU+epQEUDN98FhdaNUWzBs14W2Uq6t0QZ5rxLUJjdIN9N+NkSpjtlKx0k9sYYGhMw1757+i06bQ +1P8ETWRksQ39TyLOqCHEDpryh38rS0FiXWXbJzfKCUI16OO+B9vm1e8iprNZuofFkEz56IldhKa0 nq5p1ZPz7cDvEw0Xc2+kT/Z9sv3k3qBXopko7XTyONLBM3V6hH0K4ArVbuIdoTlBli5FYSSXk6Blj 2R3P/Big1PkrTqQReHM+z+8sko6bIllL1GQ6JLFe8rSdpyxKxsOYRAlU2W0B6jaMrL91lj9BZpZeK xDMsIicg==; Original-Received: from [::1] (port=37014 helo=cloud103.planethippo.com) by cloud103.planethippo.com with esmtpa (Exim 4.92) (envelope-from ) id 1hmJCG-0006CR-Kk; Sat, 13 Jul 2019 15:40:20 +0100 In-Reply-To: <83blxy1cdo.fsf@gnu.org> X-Sender: phillip.lord@russet.org.uk 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 2.2.x-3.x [generic] X-Received-From: 78.129.138.110 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:238568 Archived-At: On 2019-07-13 11:01, Eli Zaretskii wrote: >> Cc: emacs-devel@gnu.org >> From: Phil Sainty >> Date: Sat, 13 Jul 2019 21:41:10 +1200 >> >> > Why do we need the exception in this case? Exceptions should >> > be reserved for exceptional cases. >> >> The reason I used that directory structure is that I ended up >> using multiple test files. My initial tests were indeed written >> as a test/lisp/so-long-tests.el file, but I switched to the >> alternative structure when I added additional files. > > If you'd like to keep the tests on separate files, it's fine with me, > but please add a comment somewhere for why these tests are in a > subdirectory. > > The inconvenient part of this arrangement is that I at least am in the > habit of typing "make lisp/foo-tests TAB" in the test/ directory after > making any changes to lisp/foo.el, and I normally take the lack of > completion to mean there are no tests for foo.el. Having to remember > to look in subdirectories is a burden. It is up to you to decide > whether your motivation for keeping separate test files is more > important than that. There is logic in the Makefile so that "make lisp/foo-tests" or "make foo-tests" should all work, but it fails with the directory option. So make lisp/emacs-lisp/eieio ("nothing to be done") make lisp/emacs-lisp/eieio/eieio-tests (runs test) make lisp/emacs-lisp/eieio/eieio-tests.el (runs test) Improving this logic so that the first runs the test would solve the problem. Could also add logic so that: make lisp/emacs-lisp runs all the tests under emacs-lisp. I think I put that exception in original because of eieio, and because some tests have resource files associated with them. Probably having the make file support it better would make sense. Phil