Hi all,
I'm starting from scratch the set of tests for Ada/SPARK support in Babel.
I've prepared a file with the first example:
---8<--- testing/examples/ob-ada-spark-test-org ---8<---
* Simple tests
:PROPERTIES:
:ID: 778e63c2-2644-4a6f-8e7d-f956fa3d9241
:END:
#+name: hello-world
#+begin_src ada :unit hello_world :results silent
with Ada.Text_IO;
procedure Hello_World is
begin
Ada.Text_IO.Put_Line ("Hello world");
end Hello_World;
#+end_src
---8<------8<------8<------8<------8<------8<---
Then in the file testing/test-ob-ada-spark.el I've defined the following test:
(ert-deftest ob-ada-spark/hello-world ()
"Test simple Hello world."
(org-test-at-id "778e63c2-2644-4a6f-8e7d-f956fa3d9241"
(org-babel-next-src-block)
(should (equal "Hello world\n" (org-babel-execute-src-block)))))
When I execute the test form within Emacs with:
(add-to-list ' load-path (concat (file-name-directory (buffer-file-name))))
(require 'org-test)
(ert 'ob-ada-spark/hello-world)
it works fine, but when I run the test from the command line with
$ make BTEST_RE='ob-ada-spark.*' test-dirty
it fails because (org-babel-execute-src-block) returns nil:
Test ob-ada-spark/hello-world condition:
(wrong-type-argument stringp nil)
FAILED 1/1 ob-ada-spark/hello-world (0.002933 sec) at ../lisp/test-ob-ada-spark.el:40
Everything is in place, "make compile" issues no warning and required
programs are in PATH. I've tested other languages, e.g.
$ make BTEST_RE='ob-fortran.*' test-dirty
$ make BTEST_RE='ob-java/.*' test-dirty
and everything works fine .
Any idea?? How can I debug test execution from the command line?