* Re: [Emacs-diffs] master 81204b2: Port xref-tests to master branch
[not found] ` <E1ayjGI-00045W-L4@vcs.savannah.gnu.org>
@ 2016-05-06 17:15 ` Dmitry Gutov
2016-05-07 20:26 ` Dmitry Gutov
0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Gutov @ 2016-05-06 17:15 UTC (permalink / raw)
To: emacs-devel, Paul Eggert
Hi Paul,
On 05/06/2016 08:09 PM, Paul Eggert wrote:
> (defvar xref-tests-data-dir
> (expand-file-name "data/xref/"
> - (file-name-directory (or load-file-name (buffer-file-name)))))
> + (getenv "EMACS_TEST_DIRECTORY")))
Is this change necessary?
Up until now I've always been able to just open a test file, M-x
eval-buffer, and run the tests in the current Emacs instance with M-x ert.
This change seems like it will break that workflow.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Emacs-diffs] master 81204b2: Port xref-tests to master branch
2016-05-06 17:15 ` [Emacs-diffs] master 81204b2: Port xref-tests to master branch Dmitry Gutov
@ 2016-05-07 20:26 ` Dmitry Gutov
2016-05-07 20:32 ` Paul Eggert
0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Gutov @ 2016-05-07 20:26 UTC (permalink / raw)
To: emacs-devel, Paul Eggert; +Cc: Glenn Morris, Phillip Lord
Does anyone have better suggestions than
(defvar xref-tests-data-dir
(expand-file-name "../../data/xref/"
(file-name-directory (or load-file-name
(buffer-file-name)))))
?
'cd test && make test-file-name' is handy, but it's not a full
replacement: when running ERT interactively, you get niceties like being
able to drop into the debugger right where a test fails.
On 05/06/2016 08:15 PM, Dmitry Gutov wrote:
> Hi Paul,
>
> On 05/06/2016 08:09 PM, Paul Eggert wrote:
>> (defvar xref-tests-data-dir
>> (expand-file-name "data/xref/"
>> - (file-name-directory (or load-file-name
>> (buffer-file-name)))))
>> + (getenv "EMACS_TEST_DIRECTORY")))
>
> Is this change necessary?
>
> Up until now I've always been able to just open a test file, M-x
> eval-buffer, and run the tests in the current Emacs instance with M-x ert.
>
> This change seems like it will break that workflow.
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Emacs-diffs] master 81204b2: Port xref-tests to master branch
2016-05-07 20:26 ` Dmitry Gutov
@ 2016-05-07 20:32 ` Paul Eggert
2016-05-07 20:44 ` Dmitry Gutov
0 siblings, 1 reply; 4+ messages in thread
From: Paul Eggert @ 2016-05-07 20:32 UTC (permalink / raw)
To: Dmitry Gutov, emacs-devel; +Cc: Glenn Morris, Phillip Lord
Dmitry Gutov wrote:
> Does anyone have better suggestions than
>
> (defvar xref-tests-data-dir
> (expand-file-name "../../data/xref/"
> (file-name-directory (or load-file-name (buffer-file-name)))))
I don't know the test architecture well and don't have any better suggestion.
That being said, the master branch should use the same pattern for all the tests
that consult the data file. I adjusted the xref tests to use the pattern I saw
elsewhere; if the pattern is wrong, we should fix it everywhere. Extra points if
you can figure out how to fix it without breaking merges from the emacs-25
branch, which uses a slightly different architecture in this area.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Emacs-diffs] master 81204b2: Port xref-tests to master branch
2016-05-07 20:32 ` Paul Eggert
@ 2016-05-07 20:44 ` Dmitry Gutov
0 siblings, 0 replies; 4+ messages in thread
From: Dmitry Gutov @ 2016-05-07 20:44 UTC (permalink / raw)
To: Paul Eggert, emacs-devel; +Cc: Glenn Morris, Phillip Lord
On 05/07/2016 11:32 PM, Paul Eggert wrote:
> That being said, the master branch should use the same pattern for all the tests
> that consult the data file.
Preferably yes, but if some authors are fine with using ERT from command
line only, they could keep the current pattern if it's somehow
preferable. I just don't want to see interactive-friendly patterns
stomped out.
On a related note, most test code uses test/data and (getenv
"EMACS_TEST_DIRECTORY"), but package-tests.el use the previous pattern
(which I prefer) and test/lisp/emacs-lisp/package-resources/ (which
seems rather inconsistent).
> I adjusted the xref tests to use the pattern I saw
> elsewhere; if the pattern is wrong, we should fix it everywhere.
Yes, no blame here. I just hadn't noticed it right away.
> Extra points if
> you can figure out how to fix it without breaking merges from the emacs-25
> branch, which uses a slightly different architecture in this area.
I don't think changes to tests on emacs-25 are going to be a significant
problem much more.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-05-07 20:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20160506170958.15680.28097@vcs.savannah.gnu.org>
[not found] ` <E1ayjGI-00045W-L4@vcs.savannah.gnu.org>
2016-05-06 17:15 ` [Emacs-diffs] master 81204b2: Port xref-tests to master branch Dmitry Gutov
2016-05-07 20:26 ` Dmitry Gutov
2016-05-07 20:32 ` Paul Eggert
2016-05-07 20:44 ` Dmitry Gutov
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.