bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#26337: 26.0.50; Command to run tests with latest source


From: Tino Calancha
Subject: bug#26337: 26.0.50; Command to run tests with latest source
Date: Mon, 3 Apr 2017 12:41:00 +0900 (JST)
User-agent: Alpine 2.20 (DEB 67 2015-01-07)



On Sun, 2 Apr 2017, Glenn Morris wrote:

Tino Calancha wrote:

I often while debugging follow this workflow:

1) Make some changes in one branch.
2) Compile Emacs.
3) Run one test file with:
M-& emacs -batch -l ert -l ? -f ert-run-tests-batch-and-exit RET
The test file names are completable using whatever your shell uses for
file name completion (eg alt-/ in bash). In emacs-25 they are completable
with bash TAB completion (from bash Makefile completion), which was nicer.

So personally I'm not sure I see the need to add an autoloaded ert
command to do this.
The autocomplete is not the main point of this addition.  The point is
let you run a test file (not necessarily from the official test suite),
in batch using the latest compiled source with easy.

I use make for step 3. It seems natural after using it in step 2. Eg

cd test
make lisp/vc/ediff-ptch-tests.log

(till yesterday, it used to work without ".log" as well - see emacs-devel)
You are right, that sounds pretty good. Note, it doesn't work if the test you want to run it doesn't exit in the current branch or it's not as you expect.. I use to write the test file in /tmp. Then i can run the test after
compile the sources for whatever branch.

For example, last week i copied
test/lisp/emacs-lisp/cl-lib-tests.el
from commit 1f5b4ed628
into /tmp.  Then, i checkout several earlier commits to see when
cl-lib-symbol-macrolet test fail.  It started failing with 0d112c00ba,
but in that commit all tests in
/lisp/emacs-lisp/cl-lib-tests.el pass because
'cl-lib-symbol-macrolet' test was added later.  In that branch i must run
the file copied in /tmp. In that case is handy to use the porposed command.

You can think of it as a manual bisect, but it's not exactly that.
Suppose now you are in a branch fixing this issue.  You change things,
compile and then you run the test in /tmp, which contains the 'cl-lib-symbol-macrolet' test.





reply via email to

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