From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Leake Newsgroups: gmane.emacs.devel Subject: Re: Locations of Tests Date: Thu, 05 Nov 2015 07:41:42 -0600 Message-ID: <864mh0y355.fsf@stephe-leake.org> References: <87d1vpoees.fsf@russet.org.uk> <87mvuth9d6.fsf@gmx.de> <87ziytqww6.fsf@russet.org.uk> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1446730943 23547 80.91.229.3 (5 Nov 2015 13:42:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 5 Nov 2015 13:42:23 +0000 (UTC) Cc: johnw@gnu.org, Michael Albinus , 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 Nov 05 14:42:13 2015 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 1ZuKns-0004LP-D5 for ged-emacs-devel@m.gmane.org; Thu, 05 Nov 2015 14:42:12 +0100 Original-Received: from localhost ([::1]:60716 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZuKnr-00006d-UC for ged-emacs-devel@m.gmane.org; Thu, 05 Nov 2015 08:42:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40930) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZuKnd-00006Y-R8 for emacs-devel@gnu.org; Thu, 05 Nov 2015 08:41:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZuKnZ-0001gk-N3 for emacs-devel@gnu.org; Thu, 05 Nov 2015 08:41:57 -0500 Original-Received: from gproxy8-pub.mail.unifiedlayer.com ([67.222.33.93]:57027) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1ZuKnZ-0001gU-Fa for emacs-devel@gnu.org; Thu, 05 Nov 2015 08:41:53 -0500 Original-Received: (qmail 9935 invoked by uid 0); 5 Nov 2015 13:41:49 -0000 Original-Received: from unknown (HELO cmgw3) (10.0.90.84) by gproxy8.mail.unifiedlayer.com with SMTP; 5 Nov 2015 13:41:49 -0000 Original-Received: from host114.hostmonster.com ([74.220.207.114]) by cmgw3 with id dvhk1r0032UdiVW01vhn1F; Thu, 05 Nov 2015 12:41:47 -0700 X-Authority-Analysis: v=2.1 cv=Zs1+dbLG c=1 sm=1 tr=0 a=CQdxDb2CKd3SRg4I0/XZPQ==:117 a=CQdxDb2CKd3SRg4I0/XZPQ==:17 a=DsvgjBjRAAAA:8 a=f5113yIGAAAA:8 a=9i_RQKNPAAAA:8 a=hEr_IkYJT6EA:10 a=x_XPkuGwIRMA:10 a=qtqOOiqGOCEA:10 a=vg3opETtAAAA:8 a=pGLkceISAAAA:8 a=DPz7Yj6-9ufOHNiA3zEA:9 a=0-yqf879GVtV1RbP:21 a=Ib-mYbxW8HmC2Npi:21 Original-Received: from [76.218.37.33] (port=50059 helo=TAKVER2) by host114.hostmonster.com with esmtpa (Exim 4.84) (envelope-from ) id 1ZuKnR-0004pE-Is; Thu, 05 Nov 2015 06:41:45 -0700 In-Reply-To: <87ziytqww6.fsf@russet.org.uk> (Phillip Lord's message of "Wed, 04 Nov 2015 21:26:17 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (windows-nt) X-Identified-User: {2442:host114.hostmonster.com:stephele:stephe-leake.org} {sentby:smtp auth 76.218.37.33 authed with stephen_leake@stephe-leake.org} X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 67.222.33.93 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:193294 Archived-At: phillip.lord@russet.org.uk (Phillip Lord) writes: > John Wiegley writes: > > > #+TITLE: The Location of Emacs-Lisp Tests This looks good in general; a couple minor comments below. > * Introduction > > In this document, we describe the relationship between Emacs-Lisp files and > their associated automated test files. > > > * In Emacs > > The Emacs repository contains a very large number of Emacs-Lisp files, many of > which pre-date both formal package support for Emacs and automated unit > testing. The test layout is, therefore, somewhat different than for ELPA > packages. > > All paths are relative to the Emacs root directory. > > ** Source > > Lisp files are stored in the ~lisp~ directory or its sub-directories. > Sub-directories are in many cases themed after packages (~gnus~, ~org~, > ~calc~), related functionality (~net~, ~emacs-lisp~, ~progmodes~) or status > (~obsolete~). > > C source is stored in the ~src~ directory, which is flat. > > ** Test Files > > Automated tests should be stored in the ~test/automated~ directory. Tests > should reflect the directory structure of the source tree; so tests for files > in the ~emacs-lisp~ source directory should reside in the > ~test/automated/emacs-lisp~ directory. > > Tests should normally reside in a file with an ~-test~ added to the name of > the tested source file; hence ~ert.el~ is tested in ~ert-test.el~, or > ~pcase.el~ is tested in ~pcase-test.el~. > > Where features of the C source are tested using Emacs-Lisp test files, these > should reside in ~/test/automated/c~ and be named after the C file. Since we are trying to mimic the source layout, perhaps it would be better to have: tests/automated/src ;; tests of files in the src dir tests/automated/lisp ;; tests of file in the lisp dir tests/automated/lisp/prog-modes ;; etc > ** Resource Files > > Resource files for tests (containing test data) should reside in a directory > named after the feature with a ~-resources~ suffix. Hence, tests files for > ~flymake.el~ should reside in a directory called ~flymake-resources~. > > No guidance is given for the organisation of resource files inside the > ~-resource~ directory; files can be organised at the author's discretion. > > > * In ELPA > > All paths are given relative to the package root. > > ** Source Files > > ELPA lisp files should be stored at top-level within the package. > > ** Test Files > > Test files should normally reside in the ~test~ directory, and be named after > the file being tested. With the -test suffix; it helps to be very clear, > ** Resources Files > > Resource files for tests should reside in the ~dev-resources~ directory. No > guidance is given for the organisation of resource files inside the > ~dev-resource~ directory; files can be organised at the author's discretion. -- -- Stephe