[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Locations of Tests
From: |
Stephen Leake |
Subject: |
Re: Locations of Tests |
Date: |
Thu, 05 Nov 2015 07:41:42 -0600 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (windows-nt) |
address@hidden (Phillip Lord) writes:
> John Wiegley <address@hidden> 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
Re: Locations of Tests, Michael Albinus, 2015/11/04
- Re: Locations of Tests, John Wiegley, 2015/11/04
- Re: Locations of Tests, Phillip Lord, 2015/11/04
- Re: Locations of Tests,
Stephen Leake <=
- Re: Locations of Tests, Artur Malabarba, 2015/11/05
- Re: Locations of Tests, Nicolas Petton, 2015/11/05
- Re: Locations of Tests, Artur Malabarba, 2015/11/05
- Re: Locations of Tests, Phillip Lord, 2015/11/06
Re: Locations of Tests, Juanma Barranquero, 2015/11/05
Re: Locations of Tests, Phillip Lord, 2015/11/06
Makefile-help (was Re: Locations of Tests), Phillip Lord, 2015/11/06