From: Christian Ohler <ohler+emacs@fastmail.net>
To: "Stephen J. Turnbull" <stephen@xemacs.org>
Cc: Chong Yidong <cyd@stupidchicken.com>,
Sebastian Rose <sebastian_rose@gmx.de>,
Stefan Monnier <monnier@iro.umontreal.ca>,
emacs-devel Mailinglist <emacs-devel@gnu.org>
Subject: Re: testing framework and package.el
Date: Wed, 13 Oct 2010 01:19:43 +1100 [thread overview]
Message-ID: <4CB46E7F.6010104@fastmail.net> (raw)
In-Reply-To: <87d3rg6rl9.fsf@uwakimon.sk.tsukuba.ac.jp>
On 12/10/10 14:02, Stephen J. Turnbull wrote:
> Christian Ohler writes:
>
> > AIUI, XEmacs has its tests in a tests/ directory next to lisp/, in the
> > same repository. Are you saying this has proven to be a bad idea?
>
> Not bad; suboptimal. There are two kinds of tests, tests of the LISP
> language (including Emacs extensions described in the Lispref), and
> tests of the internal implementation.
>
> The former should be used for all versions of X?Emacs Lisp, and
> therefore are conceptually separate from the sources. They often need
> to be versioned, but usually a boundp or fboundp test is good enough
> for that.
>
> The latter, of course, is implementation-specific and tied to the
> sources.
>
> In XEmacs practice, the two are mixed together, and as bugs are fixed
> and features are added the tests for different versions have diverged,
> even where the features are the same. This means that, for example,
> it's possible (and not uncommon, in fact) for 21.4 to be missing
> regression tests that are present in 21.5 for 21.4 features.
I see, thanks for clarifying. Is it really mainly ELisp language
features where this applies? Any test that I write now could make sense
for the previous Emacs version, or across all Emacsen, if it's a shared
feature. Probably we don't care about compatibility or regressions of
specific UI features too much, so sharing such tests is perhaps not
worth the trouble. Still, do you think there's a strict boundary
between shared tests and implementation-specific tests, or a continuum?
If it's a continuum, perhaps `ert-deftest' should have a :since keyword
that takes some kind of structured value that specified the Emacs
versions that are supposed to support the feature being tested. OTOH,
if tests really mostly fall in one of two categories, a simpler solution
would be sufficient.
> > a way that these actions are as easy as possible. I expect that
> > running the current tests against older Emacs versions is something
> > that we will want to do much less frequently, so we should not
> > optimize for this use case at the expense of the others.
>
> What's so hard about prepending "../" to a few Makefile variables?
I'm not sure I understand your question. I was trying to say that it
would be easier to write and maintain tests if the tests for X.el were
in X-tests.el in the same directory (or perhaps in a subdirectory
tests/X.el), rather than in ../../test/*/*/X-tests.el, which is quite a
bit further removed, and clumsy to navigate to (you can provide Emacs
commands that help with this, but you really also need shell aliases,
etc., and it's never going to be as simple as having code and tests next
to each other). While browsing and editing the tests, you would benefit
from having the tests right where the source code is; and since running
them against an older Emacs version is comparatively rare, the more
complicated find expression that you need to collect the test files
makes little difference.
> You're right that changing the convention is not too hard for the
> framework, but getting tests to be backward compatible is going to be
> annoying if you don't plan for it from the beginning. In practice it
> very likely won't happen, and that's unfortunate.
I think this is a good time to discuss concrete proposals to solve this
problem.
Christian.
next prev parent reply other threads:[~2010-10-12 14:19 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-27 15:18 testing framework and package.el Sebastian Rose
2010-09-27 22:57 ` Stefan Monnier
2010-09-27 23:42 ` Sebastian Rose
2010-09-27 23:55 ` Sebastian Rose
2010-10-01 13:01 ` Christian Ohler
2010-10-02 3:53 ` Sebastian Rose
2010-10-03 10:51 ` Christian Ohler
2010-10-03 20:52 ` Sebastian Rose
2010-10-04 15:36 ` Christian Ohler
2010-10-04 16:48 ` Chong Yidong
2010-10-05 1:17 ` Christian Ohler
2010-10-05 1:38 ` Lennart Borgman
2010-10-05 1:50 ` Sebastian Rose
2010-10-05 3:31 ` Christian Ohler
2010-10-05 4:39 ` Stephen J. Turnbull
2010-10-05 16:43 ` Eric Schulte
2010-10-05 23:18 ` Stefan Monnier
2010-10-11 9:26 ` Christian Ohler
2010-10-12 3:02 ` Stephen J. Turnbull
2010-10-12 9:41 ` Lennart Borgman
2010-10-12 13:39 ` Stephen J. Turnbull
2010-10-12 16:28 ` Lennart Borgman
2010-10-12 17:37 ` Stephen J. Turnbull
2010-10-12 17:54 ` Lennart Borgman
2010-10-13 0:36 ` Stefan Monnier
2010-10-13 9:03 ` Stephen J. Turnbull
2010-10-13 10:00 ` Christian Ohler
2010-10-13 14:19 ` Stephen J. Turnbull
2010-10-17 6:37 ` Christian Ohler
2010-10-17 14:54 ` Stefan Monnier
2010-10-18 6:55 ` Stephen J. Turnbull
2010-10-12 14:36 ` Christian Ohler
2010-10-12 17:41 ` Stephen J. Turnbull
2010-10-13 10:00 ` Christian Ohler
2010-10-13 14:13 ` Stephen J. Turnbull
2010-10-17 6:37 ` Christian Ohler
2010-10-12 14:19 ` Christian Ohler [this message]
2010-10-12 17:58 ` Stephen J. Turnbull
2010-10-12 18:13 ` Lennart Borgman
2010-10-13 10:00 ` Christian Ohler
2010-10-04 17:22 ` Eric Schulte
2010-10-05 0:01 ` Sebastian Rose
2010-10-04 13:02 ` Masatake YAMATO
2010-10-05 3:29 ` Christian Ohler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4CB46E7F.6010104@fastmail.net \
--to=ohler+emacs@fastmail.net \
--cc=cyd@stupidchicken.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=sebastian_rose@gmx.de \
--cc=stephen@xemacs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.