emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: so-long tests


From: phillip . lord
Subject: Re: so-long tests
Date: Sat, 13 Jul 2019 15:40:20 +0100
User-agent: Roundcube Webmail/1.3.8

On 2019-07-13 11:01, Eli Zaretskii wrote:
Cc: address@hidden
From: Phil Sainty <address@hidden>
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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]