Commit 5f564c2b authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

emacs config: Make C-c C-c execute the current test through ./run

* .dir-locals.el: Redefine C-c C-c in sh-mode and python-mode for
the tests/ subdirectory.c
* HACKING: Mention it.
parent e86964fe
......@@ -6,4 +6,14 @@
(c++-mode . ((c-default-style . "gnu")
(indent-tab-mode . t)
(tab-width . 8)
(fill-column . 70))))
(fill-column . 70)))
("tests" . ((nil . ((eval . (defun spot/execute-test ()
"execute the current file through ../run"
(shell-command (concat "cd ..; ./run "
" &"))))))
(sh-mode . ((eval . (local-set-key
(kbd "C-c C-c") #'spot/execute-test))))
(python-mode . ((eval . (local-set-key (kbd "C-c C-c")
......@@ -109,6 +109,7 @@ another "magic touch":
touch doc/org-stamp
Silent Building with automake
......@@ -120,6 +121,30 @@ annoying. To reduce this verbosity, just run:
make V=0
Executing a single test
All tests in subdirectories of tests/ are executed through the
tests/run script. That run script defines PATH and other environment
variables necessary so that Shell and Python scripts will use the
version of Spot under development. For instance to execute
tests/core/acc.test, do:
% cd tests
% ./run core/acc.test
A test run this way automatically executes in verbose mode. Any
temporary file generated by the script can be found in
Alternatively, if you use emacs, the .dir-locals.el configuration at
the top of the project redefines the C-c C-c key for all shell and
python scripts under the tests/ directory. So if you are working on
tests/core/acc.test under emacs, hitting C-c C-c should be all you
need to execute it.
Debugging Libtool executables
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment