Subject: bug#66782: 29.1; ERT tests report test redefined depending on loading sequence

From: Xiyue Deng <[email-masked]>
Date: Sat, 28 Oct 2023 04:14:15 -0700

Eli Zaretskii <[email-masked]> writes:

>> From: Xiyue Deng <[email-masked]>
>> Cc: Mattias Engdegård <[email-masked]>,
>>   [email-masked]
>> Date: Sat, 28 Oct 2023 02:39:46 -0700
>> 
>> Eli Zaretskii <[email-masked]> writes:
>> 
>> > If test2 requires test1, why are both of them explicitly run from the
>> > command line?  Isn't that redundant, since running test2 will also run
>> > the tests defined by test1?
>> 
>> IIUC most projects just run all tests without explicit dependency
>> detection.  For example, in lsp-mode it uses eask ert-runner to run all
>> tests[1].
>
> OK, but why do that in a single Emacs session?  That is unclean for
> much more important reasons: some left-overs from previous tests could
> affect the following tests.  IMO, each test should be run in a fresh
> Emacs session, i.e. no command line should ever load more than a
> single test file.

I think one reason is that doing all test in one session gives you a
nice summary of how many tests passed and which ones failed in the end.
If you run just one test per session you'll have to inspect the results
manually which could be much more time consuming for large test suites,
and plus it may be slower.

-- 
Xiyue Deng